修改回传公卫体检信息接口 以及对外暴露

This commit is contained in:
lxd 2025-04-19 18:28:16 +08:00
parent 6fc4de5eaf
commit b8bb77b137
4 changed files with 114 additions and 30 deletions

View File

@ -734,6 +734,7 @@ public class InspectPatientController {
} }
return success(true); return success(true);
} }
@GetMapping("/PushJYPatientInfo") @GetMapping("/PushJYPatientInfo")
@Operation(summary = "回传体检相关信息") @Operation(summary = "回传体检相关信息")
public CommonResult<Boolean> PushJYPatientInfo(@RequestParam("medicalSn") String medicalSn) throws JsonProcessingException { public CommonResult<Boolean> PushJYPatientInfo(@RequestParam("medicalSn") String medicalSn) throws JsonProcessingException {
@ -754,17 +755,14 @@ public class InspectPatientController {
//先添加基本信息 //先添加基本信息
patientJYInfoVO.setPatientname(patientDO.getPName()); patientJYInfoVO.setPatientname(patientDO.getPName());
patientJYInfoVO.setIdcard(patientDO.getCardId()); patientJYInfoVO.setIdcard(patientDO.getCardId());
if(patientDO.getMedicalDateTime()!=null) if (patientDO.getMedicalDateTime() != null) {
{
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
patientJYInfoVO.setExamindate(patientDO.getMedicalDateTime().format(formatter)); patientJYInfoVO.setExamindate(patientDO.getMedicalDateTime().format(formatter));
} }
//心电图信息 //心电图信息
InspectPacsDataDO ecg = pacsDataService.getPacsDataByCode(medicalSn,"ecg"); InspectPacsDataDO ecg = pacsDataService.getPacsDataByCode(medicalSn, "ecg");
if(ecg!=null) if (ecg != null) {
{ if (ecg.getData() != null) {
if(ecg.getData()!=null)
{
patientJYInfoVO.setElectrokardiagramtypeid(1); patientJYInfoVO.setElectrokardiagramtypeid(1);
patientJYInfoVO.setElectrocardiogramimg(ecg.getData()); patientJYInfoVO.setElectrocardiogramimg(ecg.getData());
} }
@ -812,25 +810,34 @@ public class InspectPatientController {
} }
break; break;
case "PRO"://尿常规尿蛋白 case "PRO"://尿常规尿蛋白
if (result.getItemValue() != null) if (result.getItemValue() != null) {
{
patientJYInfoVO.setUrineprotein(result.getItemValue()); patientJYInfoVO.setUrineprotein(result.getItemValue());
} }
break; break;
case "GLU"://尿常规尿糖 case "GLU"://尿常规尿糖
if (result.getItemValue() != null) if(barCode.equals(patientDO.getShqx()))
{ {
patientJYInfoVO.setUrinesugar(result.getItemValue()); if (result.getItemValue() != null) {
if (NumberUtils.isNumeric(result.getItemValue())) {
double value = Double.parseDouble(result.getItemValue());
patientJYInfoVO.setFastplasmaglucoseml(value);
}
}
} }
case "KET"://尿常规尿酮体 else
if (result.getItemValue() != null)
{ {
if (result.getItemValue() != null) {
patientJYInfoVO.setUrinesugar(result.getItemValue());
}
}
break;
case "KET"://尿常规尿酮体
if (result.getItemValue() != null) {
patientJYInfoVO.setUnrineketone(result.getItemValue()); patientJYInfoVO.setUnrineketone(result.getItemValue());
} }
break; break;
case "BLD"://尿常规潜血 case "BLD"://尿常规潜血
if (result.getItemValue() != null) if (result.getItemValue() != null) {
{
patientJYInfoVO.setUnrineoccultblood(result.getItemValue()); patientJYInfoVO.setUnrineoccultblood(result.getItemValue());
} }
break; break;
@ -874,6 +881,53 @@ public class InspectPatientController {
} }
} }
break; break;
case "AST"://谷丙转氨酶
if (result.getItemValue() != null) {
if (NumberUtils.isNumeric(result.getItemValue())) {
double value = Double.parseDouble(result.getItemValue());
patientJYInfoVO.setSgpt(value);
}
}
break;
case "UREA"://尿素
if (result.getItemValue() != null) {
if (NumberUtils.isNumeric(result.getItemValue())) {
double value = Double.parseDouble(result.getItemValue());
patientJYInfoVO.setBun(value);
}
}
break;
case "ALT"://谷草转氨酶
if (result.getItemValue() != null) {
if (NumberUtils.isNumeric(result.getItemValue())) {
double value = Double.parseDouble(result.getItemValue());
patientJYInfoVO.setSgot(value);
}
}
break;
case "TBLL":
if(barCode.equals(patientDO.getShqx()))
{
if (result.getItemValue() != null) {
if (NumberUtils.isNumeric(result.getItemValue())) {
double value = Double.parseDouble(result.getItemValue());
patientJYInfoVO.setTotalbilirubin(value);
}
}
}
break;
case "CREA":
if(barCode.equals(patientDO.getShqx()))
{
if (result.getItemValue() != null) {
if (NumberUtils.isNumeric(result.getItemValue())) {
double value = Double.parseDouble(result.getItemValue());
patientJYInfoVO.setSerumcreatinine(value);
}
}
}
break;
} }
} }
@ -890,7 +944,11 @@ public class InspectPatientController {
} }
} }
} }
//添加超声数据
String usitemresult = patientitemsService.GetItemResult(medicalSn, "US001");
if (usitemresult != null&&usitemresult!="") {
patientJYInfoVO.setBultrasound(usitemresult);
}
//获取配置项地址 //获取配置项地址
ConfigDO configDO = configService.getConfigByKey("url.tjhc"); ConfigDO configDO = configService.getConfigByKey("url.tjhc");
// 发送 POST 请求 // 发送 POST 请求
@ -915,9 +973,10 @@ public class InspectPatientController {
responseLogVO1.setIdcard(patientDO.getCardId()); responseLogVO1.setIdcard(patientDO.getCardId());
responseLogVO1.setJson(response); responseLogVO1.setJson(response);
applylogService.createApplylog(responseLogVO1); applylogService.createApplylog(responseLogVO1);
} else {
return success(true, "未查询到患者样本码");
} }
} }
return success(true); return success(true);
} }
@ -960,8 +1019,8 @@ public class InspectPatientController {
InspectPatientitemsSaveReqVO saveReqVO = new InspectPatientitemsSaveReqVO(); InspectPatientitemsSaveReqVO saveReqVO = new InspectPatientitemsSaveReqVO();
saveReqVO.setMedicalSn(medicalSn); saveReqVO.setMedicalSn(medicalSn);
saveReqVO.setItemCode("US001"); saveReqVO.setItemCode("US001");
saveReqVO.setExamDescription(examDescription.replace('\n',' ')); saveReqVO.setExamDescription(examDescription.replace('\n', ' '));
saveReqVO.setItemResult(diagResults.replace('\n',' ')); saveReqVO.setItemResult(diagResults.replace('\n', ' '));
patientitemsService.updateitemUSinference(saveReqVO); patientitemsService.updateitemUSinference(saveReqVO);
} }
@ -1465,13 +1524,14 @@ public class InspectPatientController {
} }
return success(inspectApiInfoVO); return success(inspectApiInfoVO);
} }
@GetMapping("/updatePatientSupplement") @GetMapping("/updatePatientSupplement")
@Operation(summary = "更新公卫患者扩展信息") @Operation(summary = "更新公卫患者扩展信息")
public CommonResult<Boolean> updatePatientSupplement(@RequestParam("medicalSn") String medicalSn,@RequestParam("idCard") String idCard) throws JsonProcessingException { public CommonResult<Boolean> updatePatientSupplement(@RequestParam("medicalSn") String medicalSn, @RequestParam("idCard") String idCard) throws JsonProcessingException {
ConfigDO config = configService.getConfigByKey("url.patientinfo"); ConfigDO config = configService.getConfigByKey("url.patientinfo");
String url = config.getValue(); String url = config.getValue();
PatientSupplementVO patientSupplementVO = new PatientSupplementVO(); PatientSupplementVO patientSupplementVO = new PatientSupplementVO();
patientSupplementVO.setMedicalSn(medicalSn); patientSupplementVO.setMedicalSn(medicalSn);
if (url != null) { if (url != null) {
String response = HttpUtils.post(url + "?" + "idCard=" + idCard); String response = HttpUtils.post(url + "?" + "idCard=" + idCard);
@ -1502,7 +1562,7 @@ public class InspectPatientController {
if (dataMap.get("pulflag") != null) { if (dataMap.get("pulflag") != null) {
patientSupplementVO.setPulflag(dataMap.get("pulflag").toString()); patientSupplementVO.setPulflag(dataMap.get("pulflag").toString());
} }
patientService. updatePatientsupplement(patientSupplementVO); patientService.updatePatientsupplement(patientSupplementVO);
} else { } else {
return success("没有查询到相关信息"); return success("没有查询到相关信息");
} }
@ -1511,6 +1571,7 @@ public class InspectPatientController {
return success(true); return success(true);
} }
@PutMapping("/syncPatientZyInfo") @PutMapping("/syncPatientZyInfo")
@Operation(summary = "同步中医体质结果项") @Operation(summary = "同步中医体质结果项")
public CommonResult<Boolean> syncPatientZyInfo(@RequestParam("medicalSn") String medicalSn, @RequestParam("cardId") String cardId) throws JsonProcessingException { public CommonResult<Boolean> syncPatientZyInfo(@RequestParam("medicalSn") String medicalSn, @RequestParam("cardId") String cardId) throws JsonProcessingException {
@ -1829,6 +1890,7 @@ public class InspectPatientController {
return success(barcodeInfoVO); return success(barcodeInfoVO);
} }
@GetMapping("/getworkload") @GetMapping("/getworkload")
@Operation(summary = "根据日期获取卫生院体检统计") @Operation(summary = "根据日期获取卫生院体检统计")
public CommonResult<List<WorkloadStatisticsVO>> getWorkload(@RequestParam("dates") @DateTimeFormat(pattern = "yyyy-MM-dd") List<LocalDate> dates) { public CommonResult<List<WorkloadStatisticsVO>> getWorkload(@RequestParam("dates") @DateTimeFormat(pattern = "yyyy-MM-dd") List<LocalDate> dates) {
@ -1873,8 +1935,8 @@ public class InspectPatientController {
// 计算总数 // 计算总数
statistics.setSum(statistics.getOldmanflag() + statistics.getHtnflag() + statistics.setSum(statistics.getOldmanflag() + statistics.getHtnflag() +
statistics.getDiaflag() + statistics.getSmiflag() + statistics.getDiaflag() + statistics.getSmiflag() +
statistics.getPulflag()); statistics.getPulflag());
} }
// 将Map转换为List并返回 // 将Map转换为List并返回

View File

@ -70,6 +70,10 @@ public interface InspectPatientitemsService {
* 根据体检编号和项目编号查询指定项目 * 根据体检编号和项目编号查询指定项目
* */ * */
String Getanalyse(String medicalSn, String itemCode); String Getanalyse(String medicalSn, String itemCode);
/*
* 根据体检编号和项目编号查询所得
* */
String GetItemResult(String medicalSn, String itemCode);
/* /*
* 根据体检编号和项目编号更新结论和所见 * 根据体检编号和项目编号更新结论和所见

View File

@ -135,6 +135,21 @@ public class InspectPatientitemsServiceImpl implements InspectPatientitemsServic
} }
return msg; return msg;
} }
@Override
public String GetItemResult(String medicalSn, String itemCode)
{
String msg="";
QueryWrapper<InspectPatientitemsDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("medicalSn", medicalSn);
queryWrapper.eq("itemCode", itemCode);
InspectPatientitemsDO patientitemsDO= patientitemsMapper.selectOne(queryWrapper);
if(patientitemsDO!=null)
{
msg = patientitemsDO.getItemResult();
}
return msg;
}
private void validatePatientitemsExists(Integer id) { private void validatePatientitemsExists(Integer id) {
if (patientitemsMapper.selectById(id) == null) { if (patientitemsMapper.selectById(id) == null) {

View File

@ -233,6 +233,7 @@ yudao:
- /admin-api/inspect/patient/getUSTj #同步超声 - /admin-api/inspect/patient/getUSTj #同步超声
- /admin-api/inspect/patient/generateReport # pdf生成 - /admin-api/inspect/patient/generateReport # pdf生成
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展 - /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
- /admin-api/inspect/patient/PushJYPatientInfo #回传公卫体检信息
websocket: websocket:
enable: true # websocket的开关 enable: true # websocket的开关
path: /infra/ws # 路径 path: /infra/ws # 路径
@ -281,6 +282,7 @@ yudao:
- /admin-api/inspect/patient/getUSTj #同步超声 - /admin-api/inspect/patient/getUSTj #同步超声
- /admin-api/inspect/patient/generateReport # pdf生成存放 - /admin-api/inspect/patient/generateReport # pdf生成存放
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展 - /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
- /admin-api/inspect/patient/PushJYPatientInfo #回传公卫体检信息
- /adminInspect/admin-api/inspect/department/getList - /adminInspect/admin-api/inspect/department/getList
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo - /adminInspect/admin-api/inspect/patient/getUSPatientInfo
- /adminInspect/admin-api/system/captcha/get - /adminInspect/admin-api/system/captcha/get
@ -296,6 +298,7 @@ yudao:
- /adminInspect/admin-api/inspect/patient/getUSTj #同步超声 - /adminInspect/admin-api/inspect/patient/getUSTj #同步超声
- /adminInspect/admin-api/inspect/patient/generateReport #pdf生成存放 - /adminInspect/admin-api/inspect/patient/generateReport #pdf生成存放
- /adminInspect/admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展 - /adminInspect/admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
- /adminInspect/admin-api/inspect/patient/PushJYPatientInfo #回传公卫体检信息
ignore-tables: ignore-tables:
- system_tenant - system_tenant
- system_tenant_package - system_tenant_package