Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
e8b012a0b1
@ -398,7 +398,39 @@ public class InspectPatientController {
|
|||||||
}
|
}
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/getUSTj")
|
||||||
|
@Operation(summary = "获取超声报告")
|
||||||
|
public CommonResult<Boolean> GetApiPacsInfo(@RequestParam("medicalSn") String medicalSn)
|
||||||
|
{
|
||||||
|
ConfigDO config = configService.getConfigByKey("url.ustj");
|
||||||
|
String url = config.getValue();
|
||||||
|
String response = HttpUtils.get(url+"?"+"examid="+medicalSn+"&"+"orgSN="+"1001");
|
||||||
|
if(response!=null)
|
||||||
|
{
|
||||||
|
// 解析 JSON 响应
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
try {
|
||||||
|
Map<String, Object> responseMap = objectMapper.readValue(response, Map.class);
|
||||||
|
Map<String, Object> dataMap = (Map<String, Object>) responseMap.get("data");
|
||||||
|
// 获取 pdfurl 和 pname
|
||||||
|
String pdfurl = (String) dataMap.get("pdfurl");
|
||||||
|
String pname = (String) dataMap.get("pname");
|
||||||
|
// 检查 pdfurl 和 pname 是否为空
|
||||||
|
if (pdfurl != null && !pdfurl.isEmpty() && pname != null && !pname.isEmpty()) {
|
||||||
|
InspectPacsDataSaveReqVO inspectPacs = new InspectPacsDataSaveReqVO();
|
||||||
|
inspectPacs.setCode(medicalSn);
|
||||||
|
inspectPacs.setData(pdfurl);
|
||||||
|
inspectPacs.setType("US");
|
||||||
|
inspectPacs.setPersonName(pname);
|
||||||
|
pacsDataService.createPacsData(inspectPacs);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return success(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新患者信息")
|
@Operation(summary = "更新患者信息")
|
||||||
public CommonResult<Boolean> updatePatient(@Valid @RequestBody InspectPatientSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updatePatient(@Valid @RequestBody InspectPatientSaveReqVO updateReqVO) {
|
||||||
|
Loading…
Reference in New Issue
Block a user