Merge branch 'main' of http://123.57.244.246:3000/Flow/inspect-backend
This commit is contained in:
commit
19be5ab20d
@ -999,15 +999,15 @@ public class InspectPatientController {
|
|||||||
@GetMapping("/getUSTj")
|
@GetMapping("/getUSTj")
|
||||||
@Operation(summary = "获取超声报告")
|
@Operation(summary = "获取超声报告")
|
||||||
public CommonResult<Boolean> GetApiPacsInfo(@RequestParam("medicalSn") String medicalSn) {
|
public CommonResult<Boolean> GetApiPacsInfo(@RequestParam("medicalSn") String medicalSn) {
|
||||||
// 获取患者信息
|
// 只获取shortid字段,提高查询性能
|
||||||
InspectPatientDO patientDO = patientService.getPatientInfo(medicalSn);
|
String shortid = patientService.getPatientShortid(medicalSn);
|
||||||
if (patientDO == null) {
|
if (shortid == null) {
|
||||||
return success(false);
|
return success(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigDO config = configService.getConfigByKey("url.ustj");
|
ConfigDO config = configService.getConfigByKey("url.ustj");
|
||||||
String url = config.getValue();
|
String url = config.getValue();
|
||||||
String response = HttpUtils.get(url + "?" + "examid=" + medicalSn + "&" + "orgSN=" + patientDO.getShortid());
|
String response = HttpUtils.get(url + "?" + "examid=" + medicalSn + "&" + "orgSN=" + shortid);
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
// 解析 JSON 响应
|
// 解析 JSON 响应
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
@ -82,6 +82,11 @@ public interface InspectPatientService {
|
|||||||
* 根据体检编号获取患者信息的json
|
* 根据体检编号获取患者信息的json
|
||||||
* */
|
* */
|
||||||
InspectPatientDO getPatientInfo(String medicalSn);
|
InspectPatientDO getPatientInfo(String medicalSn);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 根据体检编号只获取shortid字段
|
||||||
|
* */
|
||||||
|
String getPatientShortid(String medicalSn);
|
||||||
/*
|
/*
|
||||||
* 更新患者的基本信息里的补充信息 高血压、老年人、行政村、卫生院、糖尿病、精神病
|
* 更新患者的基本信息里的补充信息 高血压、老年人、行政村、卫生院、糖尿病、精神病
|
||||||
* */
|
* */
|
||||||
|
@ -174,6 +174,15 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
|||||||
|
|
||||||
return patientDO;
|
return patientDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPatientShortid(String medicalSn) {
|
||||||
|
LambdaQueryWrapper<InspectPatientDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(InspectPatientDO::getMedicalSn, medicalSn)
|
||||||
|
.select(InspectPatientDO::getShortid);
|
||||||
|
InspectPatientDO patientDO = patientMapper.selectOne(queryWrapper);
|
||||||
|
return patientDO != null ? patientDO.getShortid() : null;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<InspectPatientDO> getPatientdetails(PatientDetailsVO detailsVO) {
|
public List<InspectPatientDO> getPatientdetails(PatientDetailsVO detailsVO) {
|
||||||
LambdaQueryWrapper<InspectPatientDO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<InspectPatientDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user