Selaa lähdekoodia

禁忌医疗器械及物品

zhoutg 4 vuotta sitten
vanhempi
commit
e17a4998ac

+ 1 - 1
src/main/java/com/diagbot/dto/BillNeoMaxDTO.java

@@ -42,7 +42,7 @@ public class BillNeoMaxDTO {
     // 禁忌手术
     private List<NodeNeoDTO> operations = new ArrayList<>();
 
-    // 禁忌操作
+    // 禁忌操作(禁忌医疗器械及物品)
     private List<NodeNeoDTO> procedures = new ArrayList<>();
 
     // 禁忌实验室检查

+ 2 - 1
src/main/java/com/diagbot/enums/NeoEnum.java

@@ -24,7 +24,8 @@ public enum NeoEnum implements KeyedNamed {
     group(11, "禁用人群"),
     conflictmeds(12, "配伍禁忌"),
     vitals(13, "禁忌查体"),
-    pacsDesc(14, "禁忌辅助检查描述");
+    pacsDesc(14, "禁忌辅助检查描述"),
+    medEqu(15, "禁忌医疗器械及物品");
 
     @Setter
     private int key;

+ 3 - 0
src/main/java/com/diagbot/facade/TestFacade.java

@@ -248,6 +248,9 @@ public class TestFacade {
                             indicationPushVO.setVital(sbVital.toString());
                         }
                         break;
+                    case "13": // 禁忌医疗器械及物品
+                        indicationPushVO.setPasts(bean.getNeoName());
+                        break;
                     case "14": // 年龄
                         String[] splitAge = bean.getNeoName().split(",|,");
                         indicationPushVO.setAge((int) getValueNum(splitAge));

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

@@ -22,6 +22,7 @@ import com.diagbot.rule.CommonRule;
 import com.diagbot.rule.DrugRule;
 import com.diagbot.rule.GroupRule;
 import com.diagbot.rule.LisRule;
+import com.diagbot.rule.MedEquRule;
 import com.diagbot.rule.PacsRule;
 import com.diagbot.rule.SexRule;
 import com.diagbot.rule.VitalRule;
@@ -60,6 +61,8 @@ public class BillProcess {
     VitalRule vitalRule;
     @Autowired
     GroupRule groupRule;
+    @Autowired
+    MedEquRule medEquRule;
 
 
     public void process(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, IndicationDTO res) {
@@ -256,6 +259,9 @@ public class BillProcess {
 
             // 禁用辅助检查描述
             commonRule.compareItemWithBill(bill.getPacsDesc(), pacsDescList, bill, billMsgList, NeoEnum.pacsDesc.getName());
+
+            // 禁忌医疗器械及物品
+            medEquRule.bill(wordCrfDTO.getPastLabel().getText(), bill, billMsgList, NeoEnum.medEqu.getName());
         }
 
         // 24小时重复开单项

+ 1 - 1
src/main/java/com/diagbot/repository/YiBaoOperationNameNode.java

@@ -130,7 +130,7 @@ public class YiBaoOperationNameNode {
             nodeInfo = new NodeInfo();
             nodeInfo.setName(device.getName());
             nodeInfo.setTypeval(Constants.conflictdevice);
-            opBillNeoDTO.getMedallegen().add(NeoUtil.updateNodeInfo(nodeInfo));
+            opBillNeoDTO.getProcedures().add(NeoUtil.updateNodeInfo(nodeInfo));
         }
 
         return opBillNeoDTO;

+ 44 - 0
src/main/java/com/diagbot/rule/MedEquRule.java

@@ -0,0 +1,44 @@
+package com.diagbot.rule;
+
+import com.diagbot.dto.BillMsg;
+import com.diagbot.dto.BillNeoMaxDTO;
+import com.diagbot.dto.NodeNeoDTO;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.MsgUtil;
+import com.diagbot.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @description: 禁忌医疗器械及物品规则
+ * @author: zhoutg
+ * @time: 2020/8/3 14:47
+ */
+@Component
+public class MedEquRule {
+
+    /**
+     * 比较文本内容是否存在
+     *
+     * @param text
+     * @param billNeoMaxDTO
+     * @param billMsgList
+     * @param type
+     */
+    public void bill(String text, BillNeoMaxDTO billNeoMaxDTO, List<BillMsg> billMsgList, String type) {
+        if (StringUtil.isNotBlank(text)) {
+            List<NodeNeoDTO> medEquList = billNeoMaxDTO.getProcedures();
+            if (ListUtil.isNotEmpty(medEquList)) {
+                for (NodeNeoDTO node : medEquList) {
+                    if (text.contains(node.getName())) {
+                        BillMsg billMsg = MsgUtil.getBillMedEquMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
+                                node.getName(), type, billNeoMaxDTO.getType());
+                        billMsgList.add(billMsg);
+                    }
+                }
+            }
+        }
+    }
+
+}

+ 24 - 0
src/main/java/com/diagbot/util/MsgUtil.java

@@ -179,6 +179,30 @@ public class MsgUtil {
         return billMsg;
     }
 
+    /**
+     * 开单合理性禁忌医疗器械及物品提示信息
+     *
+     * @param orderName 原开单项
+     * @param orderStandName 标准开单项
+     * @param content 匹配内容
+     * @param type 类型
+     * @return
+     */
+    public static BillMsg getBillMedEquMsg(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);
+        billMsg.setContent(content);
+        billMsg.setType(type);
+        return billMsg;
+    }
+
     /**
      * 开单合理性手术提示信息
      *