Kaynağa Gözat

结构调整

zhoutg 4 yıl önce
ebeveyn
işleme
0f721a125c

+ 6 - 2
src/main/java/com/diagbot/process/BillProcess.java

@@ -5,11 +5,10 @@ import com.diagbot.dto.BillMsg;
 import com.diagbot.dto.BillNeoDTO;
 import com.diagbot.dto.BillNeoMaxDTO;
 import com.diagbot.dto.IndicationDTO;
-import com.diagbot.dto.NodeNeoDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.enums.NeoEnum;
+import com.diagbot.enums.TypeEnum;
 import com.diagbot.facade.NeoFacade;
-import com.diagbot.model.entity.AllergyMedicine;
 import com.diagbot.model.entity.Clinical;
 import com.diagbot.model.entity.Medicine;
 import com.diagbot.model.entity.Operation;
@@ -71,14 +70,19 @@ public class BillProcess {
             BillNeoMaxDTO billNeoMaxDTO =  new BillNeoMaxDTO();
             if (billNeoDTO.getDrugBillNeoDTO() != null) {
                 BeanUtil.copyProperties(billNeoDTO.getDrugBillNeoDTO(), billNeoMaxDTO);
+                billNeoMaxDTO.setType(TypeEnum.drug.getName());
             } else if (billNeoDTO.getLisBillNeoDTO() != null) {
                 BeanUtil.copyProperties(billNeoDTO.getLisBillNeoDTO(), billNeoMaxDTO);
+                billNeoMaxDTO.setType(TypeEnum.lis.getName());
             } else if (billNeoDTO.getPacsBillNeoDTO() != null) {
                 BeanUtil.copyProperties(billNeoDTO.getPacsBillNeoDTO(), billNeoMaxDTO);
+                billNeoMaxDTO.setType(TypeEnum.pacs.getName());
             } else if (billNeoDTO.getOperationBillNeoDTO() != null) {
                 BeanUtil.copyProperties(billNeoDTO.getOperationBillNeoDTO(), billNeoMaxDTO);
+                billNeoMaxDTO.setType(TypeEnum.operation.getName());
             } else if (billNeoDTO.getTransfusionBillNeoDTO() != null) {
                 BeanUtil.copyProperties(billNeoDTO.getTransfusionBillNeoDTO(), billNeoMaxDTO);
+                billNeoMaxDTO.setType(TypeEnum.transfusion.getName());
             }
             billNeoMaxDTO.setOrderName(billNeoDTO.getName()); // 开单名称
             billNeoMaxDTO.setOrderStandName(billNeoDTO.getStandname()); // 开单标准名称

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

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

+ 2 - 2
src/main/java/com/diagbot/rule/CommonRule.java

@@ -58,7 +58,7 @@ public class CommonRule {
                 for (Map.Entry<String, String> d : old_stand.entrySet()) {
                     BillMsg commonBillMsg = MsgUtil.getCommonSurgeryMsg(
                             billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
-                            d.getKey(), type);
+                            d.getKey(), type, billNeoMaxDTO.getType());
                     billMsgList.add(commonBillMsg);
                 }
             }
@@ -88,7 +88,7 @@ public class CommonRule {
                 for (String key : old_stand.keySet()) {
                     BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
                             billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
-                            key, type);
+                            key, type, billNeoMaxDTO.getType());
                     billMsgList.add(commonBillMsg);
                 }
             }

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

@@ -72,7 +72,7 @@ public class DrugRule {
                     }
                     BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
                             billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
-                            message, type);
+                            message, type, billNeoMaxDTO.getType());
                     billMsgList.add(commonBillMsg);
                 }
             }

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

@@ -35,7 +35,7 @@ public class GroupRule {
                     if (item.getUniqueName().contains("妊娠")) {
                         BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
                                 billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
-                                item.getUniqueName(), type);
+                                item.getUniqueName(), type, billNeoMaxDTO.getType());
                         billMsgList.add(commonBillMsg);
                     }
                 }

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

@@ -38,7 +38,7 @@ public class LisRule {
                         Map<String, Object> map = CoreUtil.compareLis(neo, lis);
                         if ((Boolean) map.get("flag") == true) {
                             BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),
-                                    billNeoMaxDTO.getOrderStandName(), (String)map.get("msg"), type);
+                                    billNeoMaxDTO.getOrderStandName(), (String)map.get("msg"), type, billNeoMaxDTO.getType());
                             billMsgList.add(commonBillMsg);
                         }
                     }

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

@@ -44,7 +44,7 @@ public class PacsRule {
             for (Map.Entry<String,String> d: old_stand.entrySet()) {
                 BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
                         billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),
-                        "已开" + d.getKey(), type);
+                        "已开" + d.getKey(), type, billNeoMaxDTO.getType());
                 billMsgList.add(commonBillMsg);
             }
         }

+ 2 - 2
src/main/java/com/diagbot/rule/SexRule.java

@@ -38,11 +38,11 @@ public class SexRule {
             if (sex.equals(sexStr)) {
                 if ("男性".equals(sexStr)) {
                     BillMsg billMsg = MsgUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
-                            "男性", type);
+                            "男性", type, billNeoMaxDTO.getType());
                     billMsgList.add(billMsg);
                 } else if ("女性".equals(sexStr)) {
                     BillMsg billMsg = MsgUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
-                            "女性", type);
+                            "女性", type, billNeoMaxDTO.getType());
                     billMsgList.add(billMsg);
                 }
             }

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

@@ -36,7 +36,7 @@ public class VitalRule {
                 Map<String, Object> map = CoreUtil.compareVital(neo, vitalLabel);
                 if ((Boolean) map.get("flag") == true) {
                     BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),
-                            billNeoMaxDTO.getOrderStandName(), (String) map.get("msg"), type);
+                            billNeoMaxDTO.getOrderStandName(), (String) map.get("msg"), type, billNeoMaxDTO.getType());
                     billMsgList.add(commonBillMsg);
                 }
             }

+ 31 - 2
src/main/java/com/diagbot/util/MsgUtil.java

@@ -25,6 +25,26 @@ public class MsgUtil {
         return billMsg;
     }
 
+    // /**
+    //  * 开单合理性通用提示信息
+    //  *
+    //  * @param orderName 原开单项
+    //  * @param orderStandName 标准开单项
+    //  * @param content 匹配内容
+    //  * @param type 类型
+    //  * @return
+    //  */
+    // public static BillMsg getCommonBillMsg(String orderName, String orderStandName, String content, String type) {
+    //     BillMsg billMsg = new BillMsg();
+    //     String msg = String.format("该患者%s,不宜开%s", content, orderName);
+    //     billMsg.setMsg(msg);
+    //     billMsg.setOrderName(orderName);
+    //     billMsg.setOrderStandName(orderStandName);
+    //     billMsg.setContent(content);
+    //     billMsg.setType(type);
+    //     return billMsg;
+    // }
+
     /**
      * 开单合理性通用提示信息
      *
@@ -32,11 +52,16 @@ public class MsgUtil {
      * @param orderStandName 标准开单项
      * @param content 匹配内容
      * @param type 类型
+     * @param type 开单项类型
      * @return
      */
-    public static BillMsg getCommonBillMsg(String orderName, String orderStandName, String content, String type) {
+    public static BillMsg getCommonBillMsg(String orderName, String orderStandName, String content, String type, String orderType) {
         BillMsg billMsg = new BillMsg();
         String msg = String.format("该患者%s,不宜开%s", content, orderName);
+        // 输血提示语是另一种写法
+        if (TypeEnum.transfusion.getName().equals(orderType)) {
+            msg = String.format("该患者%s,谨慎输注%s", content, orderName);
+        }
         billMsg.setMsg(msg);
         billMsg.setOrderName(orderName);
         billMsg.setOrderStandName(orderStandName);
@@ -128,9 +153,13 @@ public class MsgUtil {
      * @param type 类型
      * @return
      */
-    public static BillMsg getCommonSurgeryMsg(String orderName, String orderStandName, String content, String type) {
+    public static BillMsg getCommonSurgeryMsg(String orderName, String orderStandName, String content, String type, String orderType) {
         BillMsg billMsg = new BillMsg();
         String msg = String.format("该患者有%s史,不宜开%s", content, orderName);
+        // 输血提示语是另一种写法
+        if (TypeEnum.transfusion.getName().equals(orderType)) {
+            msg = String.format("该患者有%s史,谨慎输注%s", content, orderName);
+        }
         billMsg.setMsg(msg);
         billMsg.setOrderName(orderName);
         billMsg.setOrderStandName(orderStandName);