Selaa lähdekoodia

2021/6/24 李晶需求 增加开单合理 药品 葡萄糖、禁忌条件:脑梗死

gaodm 4 vuotta sitten
vanhempi
commit
7ee8dcec66

+ 1 - 0
src/main/java/com/diagbot/facade/BillFacade.java

@@ -52,6 +52,7 @@ public class BillFacade {
         // 特殊规则
         // otherRule.ecgRule(wordCrfDTO, res);
         otherRule.qjssxsRule(wordCrfDTO, res);
+        otherRule.pttRule(wordCrfDTO, res);
 
         // 结果去重处理
         commonFacade.dealMsg(res.getBillMsgList());

+ 34 - 0
src/main/java/com/diagbot/rule/OtherRule.java

@@ -125,4 +125,38 @@ public class OtherRule {
             }
         }
     }
+
+    /**
+     * 药品开单:【葡萄糖】
+     * 1、禁忌疾病:脑梗死
+     *
+     * @param wordCrfDTO
+     * @param res
+     */
+    public void pttRule(WordCrfDTO wordCrfDTO, IndicationDTO res) {
+        // 特殊值处理
+        // List<String> drugNameList = CoreUtil.getPropertyList(wordCrfDTO.getDrugOrder(), "uniqueName");
+        List<Drug> drugOrderList = wordCrfDTO.getDrugOrder();
+        for (Drug drug : drugOrderList) {
+            String drugOrderName = "葡萄糖";
+            if (drugOrderName.equals(drug.getUniqueName())) {
+                // 开单项信息
+                BillNeoMaxDTO billNeoMaxDTO = new BillNeoMaxDTO();
+                billNeoMaxDTO.setOrderName(drug.getName());
+                billNeoMaxDTO.setOrderStandName(drugOrderName);
+
+                // 禁忌疾病
+                List<NodeNeoDTO> diseaseNode = new ArrayList<>();
+                List<String> diseaseList = Lists.newArrayList("脑梗死");
+                for (String str : diseaseList) {
+                    NodeNeoDTO nodeNeoDTO = new NodeNeoDTO();
+                    nodeNeoDTO.setName(str);
+                    nodeNeoDTO.setTermtype(NeoEnum.disease.getName());
+                    diseaseNode.add(nodeNeoDTO);
+                }
+                billNeoMaxDTO.setDisease(diseaseNode);
+                commonRule.compareItemWithBill(diseaseNode, wordCrfDTO.getDiagSource(), billNeoMaxDTO, res.getBillMsgList(), NeoEnum.disease.getName());
+            }
+        }
+    }
 }