|
@@ -1,6 +1,7 @@
|
|
package com.diagbot.facade;
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.diagbot.client.CdssCoreClient;
|
|
import com.diagbot.client.CdssCoreClient;
|
|
|
|
+import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
import com.diagbot.dto.PushDTO;
|
|
import com.diagbot.dto.PushDTO;
|
|
@@ -62,104 +63,9 @@ public class PushFacade {
|
|
RespDTO<PushDTO> resp = cdssCoreClient.push(pushVO);
|
|
RespDTO<PushDTO> resp = cdssCoreClient.push(pushVO);
|
|
// RespDTOUtil.respNGDeal(resp, "远程调用推理接口失败");
|
|
// RespDTOUtil.respNGDeal(resp, "远程调用推理接口失败");
|
|
// PushDTO data = resp.data;
|
|
// PushDTO data = resp.data;
|
|
- PushDTO data = new PushDTO();
|
|
|
|
- //症状
|
|
|
|
- if (ListUtil.isEmpty(data.getSymptom())) {
|
|
|
|
- List<PushBaseDTO> symptom = Lists.newArrayList();
|
|
|
|
- PushBaseDTO sympItem1 = new PushBaseDTO();
|
|
|
|
- sympItem1.setName("发热");
|
|
|
|
- symptom.add(sympItem1);
|
|
|
|
- PushBaseDTO sympItem2 = new PushBaseDTO();
|
|
|
|
- sympItem2.setName("咳嗽");
|
|
|
|
- symptom.add(sympItem2);
|
|
|
|
- data.setSymptom(symptom);
|
|
|
|
- }
|
|
|
|
- //体格检查
|
|
|
|
- if (ListUtil.isEmpty(data.getVital())) {
|
|
|
|
- List<PushBaseDTO> vital = Lists.newArrayList();
|
|
|
|
- PushBaseDTO vital1 = new PushBaseDTO();
|
|
|
|
- vital1.setName("肾区叩痛阳性");
|
|
|
|
- vital.add(vital1);
|
|
|
|
- PushBaseDTO vital2 = new PushBaseDTO();
|
|
|
|
- vital2.setName("血压升高");
|
|
|
|
- vital.add(vital2);
|
|
|
|
- data.setVital(vital);
|
|
|
|
- }
|
|
|
|
- //检验
|
|
|
|
- if (ListUtil.isEmpty(data.getLis())) {
|
|
|
|
- List<PushBaseDTO> lis = Lists.newArrayList();
|
|
|
|
- PushBaseDTO lis1 = new PushBaseDTO();
|
|
|
|
- lis1.setName("血常规");
|
|
|
|
- lis.add(lis1);
|
|
|
|
- PushBaseDTO lis2 = new PushBaseDTO();
|
|
|
|
- lis2.setName("尿常规");
|
|
|
|
- lis.add(lis2);
|
|
|
|
- PushBaseDTO lis3 = new PushBaseDTO();
|
|
|
|
- lis3.setName("幽门螺杆菌抗体测定");
|
|
|
|
- lis.add(lis3);
|
|
|
|
- data.setLis(lis);
|
|
|
|
- }
|
|
|
|
- //检查
|
|
|
|
- if (ListUtil.isEmpty(data.getPacs())) {
|
|
|
|
- List<PushBaseDTO> pacs = Lists.newArrayList();
|
|
|
|
- PushBaseDTO pacs1 = new PushBaseDTO();
|
|
|
|
- pacs1.setName("普通胃镜检查");
|
|
|
|
- pacs.add(pacs1);
|
|
|
|
- PushBaseDTO pacs2 = new PushBaseDTO();
|
|
|
|
- pacs2.setName("经直肠前列腺彩超检查");
|
|
|
|
- pacs.add(pacs2);
|
|
|
|
- data.setPacs(pacs);
|
|
|
|
- }
|
|
|
|
- //药品
|
|
|
|
- if (ListUtil.isEmpty(data.getMedicines())) {
|
|
|
|
- List<PushBaseDTO> medicines = Lists.newArrayList();
|
|
|
|
- PushBaseDTO medicines1 = new PushBaseDTO();
|
|
|
|
- medicines1.setName("钙通道阻滞剂");
|
|
|
|
- medicines.add(medicines1);
|
|
|
|
- PushBaseDTO medicines2 = new PushBaseDTO();
|
|
|
|
- medicines2.setName("盐酸肾上腺素注射液");
|
|
|
|
- medicines.add(medicines2);
|
|
|
|
- data.setMedicines(medicines);
|
|
|
|
- }
|
|
|
|
- //手术和操作
|
|
|
|
- if (ListUtil.isEmpty(data.getOperations())) {
|
|
|
|
- List<PushBaseDTO> operations = Lists.newArrayList();
|
|
|
|
- PushBaseDTO operations1 = new PushBaseDTO();
|
|
|
|
- operations1.setName("前列腺按摩");
|
|
|
|
- operations.add(operations1);
|
|
|
|
- PushBaseDTO operations2 = new PushBaseDTO();
|
|
|
|
- operations2.setName("经皮冠状动脉介入治疗(PCI)");
|
|
|
|
- operations.add(operations2);
|
|
|
|
- data.setOperations(operations);
|
|
|
|
- }
|
|
|
|
- //诊断
|
|
|
|
- if (MapUtils.isEmpty(data.getDis())) {
|
|
|
|
- List<PushBaseDTO> dis = Lists.newArrayList();
|
|
|
|
- PushBaseDTO disItem1 = new PushBaseDTO();
|
|
|
|
- disItem1.setName("急性胰腺炎");
|
|
|
|
- dis.add(disItem1);
|
|
|
|
- PushBaseDTO disItem2 = new PushBaseDTO();
|
|
|
|
- disItem2.setName("无晶状体眼");
|
|
|
|
- dis.add(disItem2);
|
|
|
|
- Map<String, List<PushBaseDTO>> disMap = new HashMap<>();
|
|
|
|
- disMap.put("可能诊断", dis);
|
|
|
|
- List<PushBaseDTO> dis2 = Lists.newArrayList();
|
|
|
|
- dis2.addAll(dis);
|
|
|
|
- PushBaseDTO disItem3 = new PushBaseDTO();
|
|
|
|
- disItem3.setName("糖尿病");
|
|
|
|
- dis2.add(disItem3);
|
|
|
|
- disMap.put("鉴别诊断", dis2);
|
|
|
|
- data.setDis(disMap);
|
|
|
|
- }
|
|
|
|
- //一般治疗
|
|
|
|
- if (ListUtil.isEmpty(data.getTreat())) {
|
|
|
|
- List<TreatDTO> treat = new ArrayList<>();
|
|
|
|
- TreatDTO treatDTO1 = new TreatDTO();
|
|
|
|
- treatDTO1.setName("无晶状体眼");
|
|
|
|
- treatDTO1.setUniqueName("无晶状体眼");
|
|
|
|
- treat.add(treatDTO1);
|
|
|
|
- data.setTreat(treat);
|
|
|
|
- }
|
|
|
|
|
|
+ //------------------测试数据开始------------------
|
|
|
|
+ PushDTO data = testDataPush();
|
|
|
|
+ //------------------测试数据结束------------------
|
|
//出参映射
|
|
//出参映射
|
|
data = assembleFacade.assemblePushDTO(data, pushVO.getHospitalId());
|
|
data = assembleFacade.assemblePushDTO(data, pushVO.getHospitalId());
|
|
//是否有静态信息
|
|
//是否有静态信息
|
|
@@ -188,49 +94,6 @@ public class PushFacade {
|
|
RespDTO<IndicationDTO> resp = cdssCoreClient.indication(indicationPushVO);
|
|
RespDTO<IndicationDTO> resp = cdssCoreClient.indication(indicationPushVO);
|
|
RespDTOUtil.respNGDeal(resp, "远程调用推理接口失败");
|
|
RespDTOUtil.respNGDeal(resp, "远程调用推理接口失败");
|
|
IndicationDTO indicationDTO = resp.data;
|
|
IndicationDTO indicationDTO = resp.data;
|
|
- // IndicationDTO indicationDTO = new IndicationDTO();
|
|
|
|
- // List<BillMsg> billMsgList = Lists.newArrayList();
|
|
|
|
- // BillMsg item1 = new BillMsg();
|
|
|
|
- // item1.setMsg("该患者年龄15,不宜开左氧氟沙星");
|
|
|
|
- // item1.setOrderName("左氧氟沙星");
|
|
|
|
- // item1.setOrderStandName("左氧氟沙星");
|
|
|
|
- // item1.setContent("年龄15");
|
|
|
|
- // item1.setType("禁忌年龄");
|
|
|
|
- // billMsgList.add(item1);
|
|
|
|
- // indicationDTO.setBillMsgList(billMsgList);
|
|
|
|
- // List<BillMsg> criticalValList = Lists.newArrayList();
|
|
|
|
- // BillMsg item2 = new BillMsg();
|
|
|
|
- // item2.setMsg("该患者血常规血小板计数30,请留意");
|
|
|
|
- // item2.setOrderName("");
|
|
|
|
- // item2.setOrderStandName("");
|
|
|
|
- // item2.setContent("血常规血小板计数30");
|
|
|
|
- // item2.setType("血常规血小板计数30");
|
|
|
|
- // criticalValList.add(item2);
|
|
|
|
- // indicationDTO.setCriticalValList(criticalValList);
|
|
|
|
- // //加入高危假数据
|
|
|
|
- // if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
|
|
|
|
- // List<BillMsg> highRiskList = Lists.newArrayList();
|
|
|
|
- // BillMsg item3 = new BillMsg();
|
|
|
|
- // item3.setMsg("盐酸肾上腺素注射液为高风险药品,请留意(假数据)");
|
|
|
|
- // item3.setOrderName("盐酸肾上腺素注射液");
|
|
|
|
- // item3.setOrderStandName("盐酸肾上腺素注射液");
|
|
|
|
- // item3.setContent("");
|
|
|
|
- // item3.setType("药品");
|
|
|
|
- // highRiskList.add(item3);
|
|
|
|
- // indicationDTO.setHighRiskList(highRiskList);
|
|
|
|
- // }
|
|
|
|
- // //加入其他提醒假数据
|
|
|
|
- // if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
|
|
|
|
- // List<BillMsg> otherList = new ArrayList<>();
|
|
|
|
- // BillMsg other = new BillMsg();
|
|
|
|
- // other.setMsg("该患者血小板计数<10×10^9/L,建议输注血小板。(假数据)");
|
|
|
|
- // other.setOrderName("血小板");
|
|
|
|
- // other.setOrderStandName("血小板");
|
|
|
|
- // other.setContent("");
|
|
|
|
- // other.setType("输血");
|
|
|
|
- // otherList.add(other);
|
|
|
|
- // indicationDTO.setOtherList(otherList);
|
|
|
|
- // }
|
|
|
|
return indicationDTO;
|
|
return indicationDTO;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -363,4 +226,164 @@ public class PushFacade {
|
|
}
|
|
}
|
|
return retGeneraTreat;
|
|
return retGeneraTreat;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 推理测试数据设置
|
|
|
|
+ *
|
|
|
|
+ * @return 推理测试数据
|
|
|
|
+ */
|
|
|
|
+ private PushDTO testDataPush() {
|
|
|
|
+ PushDTO data = new PushDTO();
|
|
|
|
+ //症状
|
|
|
|
+ if (ListUtil.isEmpty(data.getSymptom())) {
|
|
|
|
+ List<PushBaseDTO> symptom = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO sympItem1 = new PushBaseDTO();
|
|
|
|
+ sympItem1.setName("发热");
|
|
|
|
+ symptom.add(sympItem1);
|
|
|
|
+ PushBaseDTO sympItem2 = new PushBaseDTO();
|
|
|
|
+ sympItem2.setName("咳嗽");
|
|
|
|
+ symptom.add(sympItem2);
|
|
|
|
+ data.setSymptom(symptom);
|
|
|
|
+ }
|
|
|
|
+ //体格检查
|
|
|
|
+ if (ListUtil.isEmpty(data.getVital())) {
|
|
|
|
+ List<PushBaseDTO> vital = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO vital1 = new PushBaseDTO();
|
|
|
|
+ vital1.setName("肾区叩痛阳性");
|
|
|
|
+ vital.add(vital1);
|
|
|
|
+ PushBaseDTO vital2 = new PushBaseDTO();
|
|
|
|
+ vital2.setName("血压升高");
|
|
|
|
+ vital.add(vital2);
|
|
|
|
+ data.setVital(vital);
|
|
|
|
+ }
|
|
|
|
+ //检验
|
|
|
|
+ if (ListUtil.isEmpty(data.getLis())) {
|
|
|
|
+ List<PushBaseDTO> lis = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO lis1 = new PushBaseDTO();
|
|
|
|
+ lis1.setName("血常规");
|
|
|
|
+ lis.add(lis1);
|
|
|
|
+ PushBaseDTO lis2 = new PushBaseDTO();
|
|
|
|
+ lis2.setName("尿常规");
|
|
|
|
+ lis.add(lis2);
|
|
|
|
+ PushBaseDTO lis3 = new PushBaseDTO();
|
|
|
|
+ lis3.setName("幽门螺杆菌抗体测定");
|
|
|
|
+ lis.add(lis3);
|
|
|
|
+ data.setLis(lis);
|
|
|
|
+ }
|
|
|
|
+ //检查
|
|
|
|
+ if (ListUtil.isEmpty(data.getPacs())) {
|
|
|
|
+ List<PushBaseDTO> pacs = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO pacs1 = new PushBaseDTO();
|
|
|
|
+ pacs1.setName("普通胃镜检查");
|
|
|
|
+ pacs.add(pacs1);
|
|
|
|
+ PushBaseDTO pacs2 = new PushBaseDTO();
|
|
|
|
+ pacs2.setName("经直肠前列腺彩超检查");
|
|
|
|
+ pacs.add(pacs2);
|
|
|
|
+ data.setPacs(pacs);
|
|
|
|
+ }
|
|
|
|
+ //药品
|
|
|
|
+ if (ListUtil.isEmpty(data.getMedicines())) {
|
|
|
|
+ List<PushBaseDTO> medicines = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO medicines1 = new PushBaseDTO();
|
|
|
|
+ medicines1.setName("钙通道阻滞剂");
|
|
|
|
+ medicines.add(medicines1);
|
|
|
|
+ PushBaseDTO medicines2 = new PushBaseDTO();
|
|
|
|
+ medicines2.setName("盐酸肾上腺素注射液");
|
|
|
|
+ medicines.add(medicines2);
|
|
|
|
+ data.setMedicines(medicines);
|
|
|
|
+ }
|
|
|
|
+ //手术和操作
|
|
|
|
+ if (ListUtil.isEmpty(data.getOperations())) {
|
|
|
|
+ List<PushBaseDTO> operations = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO operations1 = new PushBaseDTO();
|
|
|
|
+ operations1.setName("前列腺按摩");
|
|
|
|
+ operations.add(operations1);
|
|
|
|
+ PushBaseDTO operations2 = new PushBaseDTO();
|
|
|
|
+ operations2.setName("经皮冠状动脉介入治疗(PCI)");
|
|
|
|
+ operations.add(operations2);
|
|
|
|
+ data.setOperations(operations);
|
|
|
|
+ }
|
|
|
|
+ //诊断
|
|
|
|
+ if (MapUtils.isEmpty(data.getDis())) {
|
|
|
|
+ List<PushBaseDTO> dis = Lists.newArrayList();
|
|
|
|
+ PushBaseDTO disItem1 = new PushBaseDTO();
|
|
|
|
+ disItem1.setName("急性胰腺炎");
|
|
|
|
+ dis.add(disItem1);
|
|
|
|
+ PushBaseDTO disItem2 = new PushBaseDTO();
|
|
|
|
+ disItem2.setName("无晶状体眼");
|
|
|
|
+ dis.add(disItem2);
|
|
|
|
+ Map<String, List<PushBaseDTO>> disMap = new HashMap<>();
|
|
|
|
+ disMap.put("可能诊断", dis);
|
|
|
|
+ List<PushBaseDTO> dis2 = Lists.newArrayList();
|
|
|
|
+ dis2.addAll(dis);
|
|
|
|
+ PushBaseDTO disItem3 = new PushBaseDTO();
|
|
|
|
+ disItem3.setName("糖尿病");
|
|
|
|
+ dis2.add(disItem3);
|
|
|
|
+ disMap.put("鉴别诊断", dis2);
|
|
|
|
+ data.setDis(disMap);
|
|
|
|
+ }
|
|
|
|
+ //一般治疗
|
|
|
|
+ if (ListUtil.isEmpty(data.getTreat())) {
|
|
|
|
+ List<TreatDTO> treat = new ArrayList<>();
|
|
|
|
+ TreatDTO treatDTO1 = new TreatDTO();
|
|
|
|
+ treatDTO1.setName("无晶状体眼");
|
|
|
|
+ treatDTO1.setUniqueName("无晶状体眼");
|
|
|
|
+ treat.add(treatDTO1);
|
|
|
|
+ data.setTreat(treat);
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 提醒测试数据
|
|
|
|
+ *
|
|
|
|
+ * @return 提醒测试数据
|
|
|
|
+ */
|
|
|
|
+ private IndicationDTO indicationTestData() {
|
|
|
|
+ IndicationDTO indicationDTO = new IndicationDTO();
|
|
|
|
+ List<BillMsg> billMsgList = Lists.newArrayList();
|
|
|
|
+ BillMsg item1 = new BillMsg();
|
|
|
|
+ item1.setMsg("该患者年龄15,不宜开左氧氟沙星");
|
|
|
|
+ item1.setOrderName("左氧氟沙星");
|
|
|
|
+ item1.setOrderStandName("左氧氟沙星");
|
|
|
|
+ item1.setContent("年龄15");
|
|
|
|
+ item1.setType("禁忌年龄");
|
|
|
|
+ billMsgList.add(item1);
|
|
|
|
+ indicationDTO.setBillMsgList(billMsgList);
|
|
|
|
+ List<BillMsg> criticalValList = Lists.newArrayList();
|
|
|
|
+ BillMsg item2 = new BillMsg();
|
|
|
|
+ item2.setMsg("该患者血常规血小板计数30,请留意");
|
|
|
|
+ item2.setOrderName("");
|
|
|
|
+ item2.setOrderStandName("");
|
|
|
|
+ item2.setContent("血常规血小板计数30");
|
|
|
|
+ item2.setType("血常规血小板计数30");
|
|
|
|
+ criticalValList.add(item2);
|
|
|
|
+ indicationDTO.setCriticalValList(criticalValList);
|
|
|
|
+ //加入高危假数据
|
|
|
|
+ if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
|
|
|
|
+ List<BillMsg> highRiskList = Lists.newArrayList();
|
|
|
|
+ BillMsg item3 = new BillMsg();
|
|
|
|
+ item3.setMsg("盐酸肾上腺素注射液为高风险药品,请留意(假数据)");
|
|
|
|
+ item3.setOrderName("盐酸肾上腺素注射液");
|
|
|
|
+ item3.setOrderStandName("盐酸肾上腺素注射液");
|
|
|
|
+ item3.setContent("");
|
|
|
|
+ item3.setType("药品");
|
|
|
|
+ highRiskList.add(item3);
|
|
|
|
+ indicationDTO.setHighRiskList(highRiskList);
|
|
|
|
+ }
|
|
|
|
+ //加入其他提醒假数据
|
|
|
|
+ if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
|
|
|
|
+ List<BillMsg> otherList = new ArrayList<>();
|
|
|
|
+ BillMsg other = new BillMsg();
|
|
|
|
+ other.setMsg("该患者血小板计数<10×10^9/L,建议输注血小板。(假数据)");
|
|
|
|
+ other.setOrderName("血小板");
|
|
|
|
+ other.setOrderStandName("血小板");
|
|
|
|
+ other.setContent("");
|
|
|
|
+ other.setType("输血");
|
|
|
|
+ otherList.add(other);
|
|
|
|
+ indicationDTO.setOtherList(otherList);
|
|
|
|
+ }
|
|
|
|
+ return indicationDTO;
|
|
|
|
+ }
|
|
}
|
|
}
|