修改回传公卫体检信息接口 以及对外暴露
This commit is contained in:
parent
6fc4de5eaf
commit
b8bb77b137
@ -734,6 +734,7 @@ public class InspectPatientController {
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/PushJYPatientInfo")
|
||||
@Operation(summary = "回传体检相关信息")
|
||||
public CommonResult<Boolean> PushJYPatientInfo(@RequestParam("medicalSn") String medicalSn) throws JsonProcessingException {
|
||||
@ -754,17 +755,14 @@ public class InspectPatientController {
|
||||
//先添加基本信息
|
||||
patientJYInfoVO.setPatientname(patientDO.getPName());
|
||||
patientJYInfoVO.setIdcard(patientDO.getCardId());
|
||||
if(patientDO.getMedicalDateTime()!=null)
|
||||
{
|
||||
if (patientDO.getMedicalDateTime() != null) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
patientJYInfoVO.setExamindate(patientDO.getMedicalDateTime().format(formatter));
|
||||
}
|
||||
//心电图信息
|
||||
InspectPacsDataDO ecg = pacsDataService.getPacsDataByCode(medicalSn,"ecg");
|
||||
if(ecg!=null)
|
||||
{
|
||||
if(ecg.getData()!=null)
|
||||
{
|
||||
InspectPacsDataDO ecg = pacsDataService.getPacsDataByCode(medicalSn, "ecg");
|
||||
if (ecg != null) {
|
||||
if (ecg.getData() != null) {
|
||||
patientJYInfoVO.setElectrokardiagramtypeid(1);
|
||||
patientJYInfoVO.setElectrocardiogramimg(ecg.getData());
|
||||
}
|
||||
@ -812,25 +810,34 @@ public class InspectPatientController {
|
||||
}
|
||||
break;
|
||||
case "PRO"://尿常规尿蛋白
|
||||
if (result.getItemValue() != null)
|
||||
{
|
||||
if (result.getItemValue() != null) {
|
||||
patientJYInfoVO.setUrineprotein(result.getItemValue());
|
||||
}
|
||||
break;
|
||||
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"://尿常规尿酮体
|
||||
if (result.getItemValue() != null)
|
||||
else
|
||||
{
|
||||
if (result.getItemValue() != null) {
|
||||
patientJYInfoVO.setUrinesugar(result.getItemValue());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "KET"://尿常规尿酮体
|
||||
if (result.getItemValue() != null) {
|
||||
patientJYInfoVO.setUnrineketone(result.getItemValue());
|
||||
}
|
||||
break;
|
||||
case "BLD"://尿常规潜血
|
||||
if (result.getItemValue() != null)
|
||||
{
|
||||
if (result.getItemValue() != null) {
|
||||
patientJYInfoVO.setUnrineoccultblood(result.getItemValue());
|
||||
}
|
||||
break;
|
||||
@ -874,6 +881,53 @@ public class InspectPatientController {
|
||||
}
|
||||
}
|
||||
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");
|
||||
// 发送 POST 请求
|
||||
@ -915,9 +973,10 @@ public class InspectPatientController {
|
||||
responseLogVO1.setIdcard(patientDO.getCardId());
|
||||
responseLogVO1.setJson(response);
|
||||
applylogService.createApplylog(responseLogVO1);
|
||||
} else {
|
||||
return success(true, "未查询到患者样本码");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
@ -960,8 +1019,8 @@ public class InspectPatientController {
|
||||
InspectPatientitemsSaveReqVO saveReqVO = new InspectPatientitemsSaveReqVO();
|
||||
saveReqVO.setMedicalSn(medicalSn);
|
||||
saveReqVO.setItemCode("US001");
|
||||
saveReqVO.setExamDescription(examDescription.replace('\n',' '));
|
||||
saveReqVO.setItemResult(diagResults.replace('\n',' '));
|
||||
saveReqVO.setExamDescription(examDescription.replace('\n', ' '));
|
||||
saveReqVO.setItemResult(diagResults.replace('\n', ' '));
|
||||
patientitemsService.updateitemUSinference(saveReqVO);
|
||||
}
|
||||
|
||||
@ -1465,13 +1524,14 @@ public class InspectPatientController {
|
||||
}
|
||||
return success(inspectApiInfoVO);
|
||||
}
|
||||
|
||||
@GetMapping("/updatePatientSupplement")
|
||||
@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");
|
||||
String url = config.getValue();
|
||||
PatientSupplementVO patientSupplementVO = new PatientSupplementVO();
|
||||
PatientSupplementVO patientSupplementVO = new PatientSupplementVO();
|
||||
patientSupplementVO.setMedicalSn(medicalSn);
|
||||
if (url != null) {
|
||||
String response = HttpUtils.post(url + "?" + "idCard=" + idCard);
|
||||
@ -1502,7 +1562,7 @@ public class InspectPatientController {
|
||||
if (dataMap.get("pulflag") != null) {
|
||||
patientSupplementVO.setPulflag(dataMap.get("pulflag").toString());
|
||||
}
|
||||
patientService. updatePatientsupplement(patientSupplementVO);
|
||||
patientService.updatePatientsupplement(patientSupplementVO);
|
||||
} else {
|
||||
return success("没有查询到相关信息");
|
||||
}
|
||||
@ -1511,6 +1571,7 @@ public class InspectPatientController {
|
||||
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/syncPatientZyInfo")
|
||||
@Operation(summary = "同步中医体质结果项")
|
||||
public CommonResult<Boolean> syncPatientZyInfo(@RequestParam("medicalSn") String medicalSn, @RequestParam("cardId") String cardId) throws JsonProcessingException {
|
||||
@ -1829,15 +1890,16 @@ public class InspectPatientController {
|
||||
|
||||
return success(barcodeInfoVO);
|
||||
}
|
||||
|
||||
@GetMapping("/getworkload")
|
||||
@Operation(summary = "根据日期获取卫生院体检统计")
|
||||
public CommonResult<List<WorkloadStatisticsVO>> getWorkload(@RequestParam("dates") @DateTimeFormat(pattern = "yyyy-MM-dd") List<LocalDate> dates) {
|
||||
// 获取指定日期范围内的所有患者补充信息
|
||||
List<PatientSupplementVO> supplements = patientService.getPatientSupplementsByDates(dates);
|
||||
|
||||
|
||||
// 使用Map来存储统计结果,key为卫生院名称+行政村名称
|
||||
Map<String, WorkloadStatisticsVO> statisticsMap = new HashMap<>();
|
||||
|
||||
|
||||
// 遍历所有补充信息进行统计
|
||||
for (PatientSupplementVO supplement : supplements) {
|
||||
String key = supplement.getOrgname() + "_" + supplement.getDistrictname();
|
||||
@ -1853,7 +1915,7 @@ public class InspectPatientController {
|
||||
vo.setSum(0);
|
||||
return vo;
|
||||
});
|
||||
|
||||
|
||||
// 统计各项数量
|
||||
if ("1".equals(supplement.getOldmanflag())) {
|
||||
statistics.setOldmanflag(statistics.getOldmanflag() + 1);
|
||||
@ -1870,13 +1932,13 @@ public class InspectPatientController {
|
||||
if ("1".equals(supplement.getPulflag())) {
|
||||
statistics.setPulflag(statistics.getPulflag() + 1);
|
||||
}
|
||||
|
||||
|
||||
// 计算总数
|
||||
statistics.setSum(statistics.getOldmanflag() + statistics.getHtnflag() +
|
||||
statistics.getDiaflag() + statistics.getSmiflag() +
|
||||
statistics.getPulflag());
|
||||
statistics.setSum(statistics.getOldmanflag() + statistics.getHtnflag() +
|
||||
statistics.getDiaflag() + statistics.getSmiflag() +
|
||||
statistics.getPulflag());
|
||||
}
|
||||
|
||||
|
||||
// 将Map转换为List并返回
|
||||
return success(new ArrayList<>(statisticsMap.values()));
|
||||
}
|
||||
|
@ -70,6 +70,10 @@ public interface InspectPatientitemsService {
|
||||
* 根据体检编号和项目编号查询指定项目
|
||||
* */
|
||||
String Getanalyse(String medicalSn, String itemCode);
|
||||
/*
|
||||
* 根据体检编号和项目编号查询所得
|
||||
* */
|
||||
String GetItemResult(String medicalSn, String itemCode);
|
||||
|
||||
/*
|
||||
* 根据体检编号和项目编号更新结论和所见
|
||||
|
@ -135,6 +135,21 @@ public class InspectPatientitemsServiceImpl implements InspectPatientitemsServic
|
||||
}
|
||||
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) {
|
||||
if (patientitemsMapper.selectById(id) == null) {
|
||||
|
||||
|
@ -233,6 +233,7 @@ yudao:
|
||||
- /admin-api/inspect/patient/getUSTj #同步超声
|
||||
- /admin-api/inspect/patient/generateReport # pdf生成
|
||||
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
|
||||
- /admin-api/inspect/patient/PushJYPatientInfo #回传公卫体检信息
|
||||
websocket:
|
||||
enable: true # websocket的开关
|
||||
path: /infra/ws # 路径
|
||||
@ -281,6 +282,7 @@ yudao:
|
||||
- /admin-api/inspect/patient/getUSTj #同步超声
|
||||
- /admin-api/inspect/patient/generateReport # pdf生成存放
|
||||
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
|
||||
- /admin-api/inspect/patient/PushJYPatientInfo #回传公卫体检信息
|
||||
- /adminInspect/admin-api/inspect/department/getList
|
||||
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo
|
||||
- /adminInspect/admin-api/system/captcha/get
|
||||
@ -296,6 +298,7 @@ yudao:
|
||||
- /adminInspect/admin-api/inspect/patient/getUSTj #同步超声
|
||||
- /adminInspect/admin-api/inspect/patient/generateReport #pdf生成存放
|
||||
- /adminInspect/admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
|
||||
- /adminInspect/admin-api/inspect/patient/PushJYPatientInfo #回传公卫体检信息
|
||||
ignore-tables:
|
||||
- system_tenant
|
||||
- system_tenant_package
|
||||
|
Loading…
Reference in New Issue
Block a user