Merge remote-tracking branch 'origin/main'

This commit is contained in:
Euni4U 2025-04-19 18:33:47 +08:00
commit 3ead66e969
4 changed files with 115 additions and 34 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,15 +1890,16 @@ 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) {
// 获取指定日期范围内的所有患者补充信息 // 获取指定日期范围内的所有患者补充信息
List<PatientSupplementVO> supplements = patientService.getPatientSupplementsByDates(dates); List<PatientSupplementVO> supplements = patientService.getPatientSupplementsByDates(dates);
// 使用Map来存储统计结果key为卫生院名称+行政村名称 // 使用Map来存储统计结果key为卫生院名称+行政村名称
Map<String, WorkloadStatisticsVO> statisticsMap = new HashMap<>(); Map<String, WorkloadStatisticsVO> statisticsMap = new HashMap<>();
// 遍历所有补充信息进行统计 // 遍历所有补充信息进行统计
for (PatientSupplementVO supplement : supplements) { for (PatientSupplementVO supplement : supplements) {
String key = supplement.getOrgname() + "_" + supplement.getDistrictname(); String key = supplement.getOrgname() + "_" + supplement.getDistrictname();
@ -1853,7 +1915,7 @@ public class InspectPatientController {
vo.setSum(0); vo.setSum(0);
return vo; return vo;
}); });
// 统计各项数量 // 统计各项数量
if ("1".equals(supplement.getOldmanflag())) { if ("1".equals(supplement.getOldmanflag())) {
statistics.setOldmanflag(statistics.getOldmanflag() + 1); statistics.setOldmanflag(statistics.getOldmanflag() + 1);
@ -1870,13 +1932,13 @@ public class InspectPatientController {
if ("1".equals(supplement.getPulflag())) { if ("1".equals(supplement.getPulflag())) {
statistics.setPulflag(statistics.getPulflag() + 1); statistics.setPulflag(statistics.getPulflag() + 1);
} }
// 计算总数 // 计算总数
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并返回
return success(new ArrayList<>(statisticsMap.values())); return success(new ArrayList<>(statisticsMap.values()));
} }

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

@ -3,7 +3,7 @@ spring:
name: yudao-server name: yudao-server
profiles: profiles:
active: local active: 222
main: main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
@ -375,6 +375,6 @@ yudao:
debug: false debug: false
#别名 需要的配置 项目名称:/admin #别名 需要的配置 项目名称:/admin
#server: server:
# servlet: servlet:
# context-path: /adminInspect context-path: /adminInspect