浏览代码

修改提示语

zhoutg 4 年之前
父节点
当前提交
33b48db30c

+ 0 - 15
src/main/java/com/diagbot/facade/HighRiskFacade.java

@@ -36,21 +36,6 @@ public class HighRiskFacade {
         // 高风险图谱接口调用
         HighRiskNeoVO highRiskNeoVO = fillHighRiskNeo(wordCrfDTO);
         List<HighRiskNeoDTO> highRiskNeoDTOList = neoFacade.getHighRiskNeo(highRiskNeoVO);
-        // TODO 测试数据开始
-//        List<HighRiskNeoDTO> highRiskNeoDTOList = new ArrayList<>();
-        HighRiskNeoDTO highRiskNeoDTO = new HighRiskNeoDTO();
-        highRiskNeoDTO.setName("安眠药");
-        highRiskNeoDTO.setStandname("安眠药");
-        highRiskNeoDTO.setType("药品");
-        highRiskNeoDTOList.add(highRiskNeoDTO);
-
-        HighRiskNeoDTO highRiskNeoDTO2 = new HighRiskNeoDTO();
-        highRiskNeoDTO2.setName("切除手术");
-        highRiskNeoDTO2.setStandname("切除手术");
-        highRiskNeoDTO2.setType("手术");
-        highRiskNeoDTOList.add(highRiskNeoDTO2);
-        // TODO 测试数据结束
-
         // 规则处理
         highRiskProcess.process(highRiskNeoDTOList, res);
     }

+ 1 - 1
src/main/java/com/diagbot/process/BillProcess.java

@@ -63,7 +63,7 @@ public class BillProcess {
             // TODO 测试数据开始
             if (billNeoDTO.getName().equals("普通胃镜检查")) {
                 NodeNeoDTO sexNeo = new NodeNeoDTO();
-                sexNeo.setName("男");
+                sexNeo.setName("男");
                 billNeoMaxDTO.setGender(sexNeo);
 
                 NodeNeoDTO nodeNeoDTO = new NodeNeoDTO();

+ 1 - 1
src/main/java/com/diagbot/rule/AgeRule.java

@@ -31,7 +31,7 @@ public class AgeRule {
         }
         if (flag) {
             // String message = CoreUtil.getStrMsgWithRange(ageNeoDTO, "年龄", String.valueOf(wordCrfDTO.getAge()));
-            String message = "该患者年龄" + wordCrfDTO.getAge();
+            String message = "年龄" + wordCrfDTO.getAge();
             BillMsg billMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
                     message, message, type);
             billMsgList.add(billMsg);

+ 3 - 1
src/main/java/com/diagbot/rule/CommonRule.java

@@ -43,7 +43,9 @@ public class CommonRule {
             }
             if (old_stand.size() > 0) {
                 for (Map.Entry<String, String> d : old_stand.entrySet()) {
-                    BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(), d.getKey(), d.getValue(), type);
+                    BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(
+                            billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
+                            d.getKey(), d.getKey(), type);
                     billMsgList.add(commonBillMsg);
                 }
             }

+ 9 - 1
src/main/java/com/diagbot/rule/DrugRule.java

@@ -51,7 +51,15 @@ public class DrugRule {
             }
             if (old_stand.size() > 0) {
                 for (Map.Entry<String, String> d : old_stand.entrySet()) {
-                    BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(), d.getKey(), d.getValue(), type);
+                    String message = "";
+                    if ("禁忌过敏药品".equals(type)) {
+                        message = d.getKey() + "过敏";
+                    } else {
+                        message = "已开" + d.getKey();
+                    }
+                    BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(
+                            billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
+                            message, message, type);
                     billMsgList.add(commonBillMsg);
                 }
             }

+ 7 - 4
src/main/java/com/diagbot/rule/LisRule.java

@@ -35,15 +35,18 @@ public class LisRule {
                         // 如果有结果数据,就不用比较数值
                         String message = "";
                         boolean flag = false;
-                        if (StringUtil.isNotBlank(lis.getResult())) {
-                            flag = CoreUtil.compareStr(neo, lis.getResult());
+                        String otherValue = lis.getOtherValue();
+                        if (StringUtil.isNotBlank(otherValue)) {
+                            flag = CoreUtil.compareStr(neo, otherValue);
                             if (flag) {
-                                message = CoreUtil.getStrMsg(neo, val_name, lis.getResult());
+                                // message = CoreUtil.getStrMsg(neo, val_name, lis.getResult());
+                                message = lis.getName() + val_name + otherValue;
                             }
                         } else if (lis.getValue() != null) {
                             flag = CoreUtil.compareNum(neo, lis.getValue());
                             if (flag) {
-                                message = CoreUtil.getNumMsg(neo, val_name, lis.getValue(), lis.getUnits());
+                                // message = CoreUtil.getNumMsg(neo, val_name, lis.getValue(), lis.getUnits());
+                                message = lis.getName() + val_name + lis.getValue();
                             }
                         }
                         if (flag) {

+ 3 - 1
src/main/java/com/diagbot/rule/PacsRule.java

@@ -39,7 +39,9 @@ public class PacsRule {
         }
         if(old_stand.size() > 0){
             for (Map.Entry<String,String> d: old_stand.entrySet()) {
-                BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),d.getKey(),d.getValue(), type);
+                BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(
+                        billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),
+                        "已开" + d.getKey(),"已开" + d.getKey(), type);
                 billMsgList.add(commonBillMsg);
             }
         }

+ 1 - 1
src/main/java/com/diagbot/util/CoreUtil.java

@@ -263,7 +263,7 @@ public class CoreUtil {
     public static BillMsg getCommonBillMsg(String orderName, String orderStandName, String compareName,
                                            String compareStandName, String type) {
         BillMsg billMsg = new BillMsg();
-        String msg = String.format(compareName + ",不宜开%s", orderName);
+        String msg = String.format("该患者" + compareName + ",不宜开%s", orderName);
         billMsg.setMsg(msg);
         billMsg.setCompareName(compareName);
         billMsg.setCompareStandName(compareStandName);