Bladeren bron

自动化测试

zhaops 4 jaren geleden
bovenliggende
commit
3479885468

+ 3 - 5
cdssman-service/src/main/java/com/diagbot/aggregate/RuleTestAggregate.java

@@ -188,10 +188,8 @@ public class RuleTestAggregate {
     public Boolean billRuleTestExe(BillRuleVO billRuleVO) {
         Long hospitalId = billRuleVO.getHospitalId();
 
-        //List<BillItem> billRules = billManRepository.getAllRules();
         //生成测试规则
-        //List<ResultBill> resultList = ruleConvertFacade.billRuleConvert(billRules, hospitalId);
-        List<ResultBill> resultList = medRuleConvertFacade.billCommonConvert(hospitalId);
+        List<ResultBill> resultList = medRuleConvertFacade.billConvert(hospitalId, 1);
         if (ListUtil.isEmpty(resultList)) {
             return true;
         }
@@ -226,9 +224,9 @@ public class RuleTestAggregate {
 
     public Boolean billTransfusionRuleTestExe(BillRuleVO billRuleVO) {
         Long hospitalId = billRuleVO.getHospitalId();
-        List<TransfusionRemind> billRules_transfusion = transfusionRemindRepository.findByStatus(StatusEnum.Enable.getKey());
+
         //生成测试规则
-        List<ResultBill> resultList = ruleConvertFacade.billRuleConvert_transfusion(billRules_transfusion, hospitalId);
+        List<ResultBill> resultList = medRuleConvertFacade.billConvert(hospitalId, 2);
         if (ListUtil.isEmpty(resultList)) {
             return true;
         }

+ 2 - 0
cdssman-service/src/main/java/com/diagbot/dto/BillMsg.java

@@ -14,6 +14,8 @@ public class BillMsg {
     private String msg;
     // 开单名称
     private String orderName;
+    // 明细名称
+    private String orderDetailName;
     // 开单标准名称
     private String orderStandName;
     // 匹配的内容

+ 281 - 50
cdssman-service/src/main/java/com/diagbot/facade/MedRuleConvertFacade.java

@@ -1,11 +1,16 @@
 package com.diagbot.facade;
 
+import com.diagbot.dto.BillMsg;
 import com.diagbot.dto.MedClassMedDTO;
 import com.diagbot.dto.RuleDTO;
 import com.diagbot.entity.ResultBill;
+import com.diagbot.enums.GraphLabelEnum;
 import com.diagbot.enums.LexiconEnum;
+import com.diagbot.enums.RuleBaseTypeEnum;
+import com.diagbot.enums.TypeEnum;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.MsgUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.RuleVO;
 import com.google.common.collect.Lists;
@@ -15,7 +20,6 @@ import org.springframework.stereotype.Component;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -47,7 +51,13 @@ public class MedRuleConvertFacade {
     @Autowired
     private TransfusionConfigFacade transfusionConfigFacade;
 
-    public List<ResultBill> billCommonConvert(Long hospitalId) {
+    /**
+     * 开单规则处理
+     * @param hospitalId
+     * @param billType 1:通用开单,2:输血开单
+     * @return
+     */
+    public List<ResultBill> billConvert(Long hospitalId,Integer billType) {
         List<ResultBill> retList = Lists.newLinkedList();
         List<ResultBill> inputList = Lists.newLinkedList();
         List<ResultBill> medicineList = Lists.newLinkedList();
@@ -56,12 +66,17 @@ public class MedRuleConvertFacade {
 
         RuleVO ruleVO = new RuleVO();
         ruleVO.setRuleType(1);
-        ruleVO.setLibTypes(Arrays.asList(new Integer[] { LexiconEnum.Medicine.getKey(),
-                LexiconEnum.Operation.getKey(),
-                LexiconEnum.LisName.getKey(),
-                LexiconEnum.PacsName.getKey(),
-                LexiconEnum.PacsSubName.getKey() }));
-
+        if (billType != null) {
+            if (billType.equals(1)) {
+                ruleVO.setLibTypes(Arrays.asList(new Integer[] { LexiconEnum.Medicine.getKey(),
+                        LexiconEnum.Operation.getKey(),
+                        LexiconEnum.LisName.getKey(),
+                        LexiconEnum.PacsName.getKey(),
+                        LexiconEnum.PacsSubName.getKey() }));
+            } else if (billType.equals(2)) {
+                ruleVO.setLibTypes(Arrays.asList(new Integer[] { LexiconEnum.Transfusion.getKey() }));
+            }
+        }
         List<RuleDTO> list = klRuleFacade.getRules(ruleVO);
 
         if (ListUtil.isEmpty(list)) {
@@ -73,6 +88,7 @@ public class MedRuleConvertFacade {
         Map<String, Map<String, Map<String, List<Long>>>> drugConfigMap = drugConfigFacade.getUniqueConfigMap(hospitalId, null, null);
         Map<String, Map<String, List<Long>>> diseaseConfigMap = diseaseConfigFacade.getUniqueConfigMap(hospitalId, null, null);
         Map<String, Map<String, List<Long>>> operationConfigMap = operationConfigFacade.getUniqueConfigMap(hospitalId, null, null);
+        Map<String, Map<String, List<Long>>> transfusionConfigMap = transfusionConfigFacade.getUniqueConfigMap(hospitalId, null, null);
 
         for (RuleDTO record : list) {
             ResultBill resultBill = new ResultBill();
@@ -101,6 +117,8 @@ public class MedRuleConvertFacade {
                 if (record.getRuleBaseMaxValue() >= record.getRuleBaseMinValue()) {
                     ResultBill valResult = new ResultBill();
                     BeanUtil.copyProperties(resultBill, valResult);
+                    valResult.setMinValue(new BigDecimal(record.getRuleBaseMinValue()));
+                    valResult.setMaxValue(new BigDecimal(record.getRuleBaseMaxValue()));
                     valResult.setInputValue(random(new BigDecimal(record.getRuleBaseMinValue()),
                             new BigDecimal(record.getRuleBaseMaxValue()),
                             (record.getRuleBaseMaxOperator().equals("<=") ? true : false),
@@ -109,47 +127,54 @@ public class MedRuleConvertFacade {
                             : (StringUtil.isNotBlank(record.getRuleBaseMaxUnit()) ? record.getRuleBaseMaxUnit() : ""));
                     inputList.add(valResult);
                 } else {
-                    ResultBill minResult = new ResultBill();
-                    BeanUtil.copyProperties(resultBill, minResult);
-                    minResult.setConflictItemRange(1);
-                    minResult.setInputValue(random(null,
-                            new BigDecimal(record.getRuleBaseMinValue()),
-                            false,
-                            (record.getRuleBaseMinOperator().equals(">=") ? true : false)).toString());
-                    minResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMinUnit()) ? record.getRuleBaseMinUnit() : "");
-                    inputList.add(minResult);
-
-                    ResultBill maxResult = new ResultBill();
-                    BeanUtil.copyProperties(resultBill, maxResult);
-                    maxResult.setConflictItemRange(1);
-                    maxResult.setInputValue(random(new BigDecimal(record.getRuleBaseMaxValue()),
+                    //大于最小值inputValue>minValue
+                    ResultBill gtResult = new ResultBill();
+                    BeanUtil.copyProperties(resultBill, gtResult);
+                    gtResult.setMinValue(new BigDecimal(record.getRuleBaseMinValue()));
+                    gtResult.setInputValue(random(new BigDecimal(record.getRuleBaseMinValue()),
                             null,
-                            (record.getRuleBaseMaxOperator().equals("<=") ? true : false),
+                            (record.getRuleBaseMinOperator().equals(">=") ? true : false),
                             false).toString());
-                    maxResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMaxUnit()) ? record.getRuleBaseMaxUnit() : "");
-                    inputList.add(maxResult);
+                    gtResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMinUnit()) ? record.getRuleBaseMinUnit() : "");
+                    inputList.add(gtResult);
+
+                    //小于最大值inputValue<maxValue
+                    ResultBill ltResult = new ResultBill();
+                    BeanUtil.copyProperties(resultBill, ltResult);
+                    //inputValue>minValue
+                    ltResult.setMaxValue(new BigDecimal(record.getRuleBaseMaxValue()));
+                    ltResult.setInputValue(random(null,
+                            new BigDecimal(record.getRuleBaseMaxValue()),
+                            false,
+                            (record.getRuleBaseMaxOperator().equals("<=") ? true : false)).toString());
+                    ltResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMaxUnit()) ? record.getRuleBaseMaxUnit() : "");
+                    inputList.add(ltResult);
                 }
             } else if (StringUtil.isNotBlank(record.getRuleBaseMinOperator())
                     && StringUtil.isBlank(record.getRuleBaseMaxOperator())) {
-                ResultBill minResult = new ResultBill();
-                BeanUtil.copyProperties(resultBill, minResult);
-                minResult.setInputValue(random(null,
-                        new BigDecimal(record.getRuleBaseMinValue()),
-                        false,
-                        (record.getRuleBaseMinOperator().equals(">=") ? true : false)).toString());
-                minResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMinUnit()) ? record.getRuleBaseMinUnit() : "");
-                inputList.add(minResult);
-            } else if (StringUtil.isBlank(record.getRuleBaseMinOperator())
-                    && StringUtil.isNotBlank(record.getRuleBaseMaxOperator())) {
-                ResultBill maxResult = new ResultBill();
-                BeanUtil.copyProperties(resultBill, maxResult);
-                maxResult.setInputValue(random(new BigDecimal(record.getRuleBaseMaxValue()),
+                ResultBill gtResult = new ResultBill();
+                BeanUtil.copyProperties(resultBill, gtResult);
+                gtResult.setMinValue(new BigDecimal(record.getRuleBaseMinValue()));
+                gtResult.setInputValue(random(new BigDecimal(record.getRuleBaseMinValue()),
                         null,
-                        (record.getRuleBaseMaxOperator().equals("<=") ? true : false),
+                        (record.getRuleBaseMinOperator().equals(">=") ? true : false),
                         false).toString());
-                maxResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMaxUnit()) ? record.getRuleBaseMaxUnit() : "");
-                inputList.add(maxResult);
+                gtResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMinUnit()) ? record.getRuleBaseMinUnit() : "");
+                inputList.add(gtResult);
+            } else if (StringUtil.isBlank(record.getRuleBaseMinOperator())
+                    && StringUtil.isNotBlank(record.getRuleBaseMaxOperator())) {
+                ResultBill ltResult = new ResultBill();
+                BeanUtil.copyProperties(resultBill, ltResult);
+                //inputValue>minValue
+                ltResult.setMaxValue(new BigDecimal(record.getRuleBaseMaxValue()));
+                ltResult.setInputValue(random(null,
+                        new BigDecimal(record.getRuleBaseMaxValue()),
+                        false,
+                        (record.getRuleBaseMaxOperator().equals("<=") ? true : false)).toString());
+                ltResult.setUnit(StringUtil.isNotBlank(record.getRuleBaseMaxUnit()) ? record.getRuleBaseMaxUnit() : "");
+                inputList.add(ltResult);
             } else if (StringUtil.isNotBlank(record.getRuleBaseEqOperator())) {
+                resultBill.setReferenceValue(record.getRuleBaseEqValue().toString());
                 resultBill.setInputValue(new BigDecimal(record.getRuleBaseEqValue()).toString());
                 resultBill.setUnit(StringUtil.isNotBlank(record.getRuleBaseEqUnit()) ? record.getRuleBaseEqUnit() : "");
                 inputList.add(resultBill);
@@ -201,6 +226,8 @@ public class MedRuleConvertFacade {
                 billMappingList.addAll(getMappingResult(result, pacsConfigMap, 1));
             } else if (result.getBillItemTypeCode().equals(LexiconEnum.PacsSubName.getKey())) {
                 billMappingList.addAll(getMappingResult(result, pacsConfigMap, 1));
+            } else if (result.getBillItemTypeCode().equals(LexiconEnum.Transfusion.getKey())) {
+                billMappingList.addAll(getMappingResult(result, transfusionConfigMap, 1));
             }
         }
 
@@ -210,24 +237,31 @@ public class MedRuleConvertFacade {
                 conflictMappingList.addAll(getMappingResult(result, diseaseConfigMap, 2));
             } else if (result.getConflictItemTypeCode().equals(LexiconEnum.Medicine.getKey())) {
                 conflictMappingList.addAll(getMappingResult_medicine(result, drugConfigMap, 2));
-            } else if (result.getConflictItemTypeCode().equals(LexiconEnum.LisName.getKey())) {
+            } else if (result.getConflictItemTypeCode().equals(LexiconEnum.LisSubName.getKey())) {
                 conflictMappingList.addAll(getMappingResult_lis(result, lisConfigMap, 2));
             } else if (result.getConflictItemTypeCode().equals(LexiconEnum.PacsName.getKey())) {
                 conflictMappingList.addAll(getMappingResult(result, pacsConfigMap, 2));
+            } else if (result.getConflictItemTypeCode().equals(LexiconEnum.Operation.getKey())) {
+                conflictMappingList.addAll(getMappingResult(result, operationConfigMap, 2));
             }
         }
 
-        retList = BeanUtil.listCopyTo(conflictMappingList, ResultBill.class);
+        //生成预期结果
+        for (ResultBill result : conflictMappingList) {
+            if (result.getSuccess() != null && result.getSuccess() == 0) {
+                retList.add(result);
+                continue;
+            }
+            BillMsg billMsg = getBillMsg(result);
+            if (billMsg != null) {
+                result.setExpectedOutput(billMsg.getMsg());
+            }
+            retList.add(result);
+        }
+
         return retList;
     }
 
-    public void billTransfusionConvert() {
-        RuleVO ruleVO = new RuleVO();
-        ruleVO.setRuleType(1);
-        ruleVO.setLibTypes(Arrays.asList(new Integer[] { LexiconEnum.Transfusion.getKey() }));
-
-        List<RuleDTO> list = klRuleFacade.getRules(ruleVO);
-    }
 
     /**
      *
@@ -390,6 +424,152 @@ public class MedRuleConvertFacade {
         return retList;
     }
 
+    /**
+     * 模拟提示信息
+     *
+     * @param resultBill
+     * @return
+     */
+    public BillMsg getBillMsg(ResultBill resultBill) {
+        BillMsg billMsg = new BillMsg();
+        String orderType = getOrderType(resultBill.getBillItemType());
+        //输血开单
+        if (resultBill.getBillItemTypeCode().equals(LexiconEnum.Transfusion.getKey())) {
+            if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.LisSubName.getKey())) {
+                String content = resultBill.getConflictItemHisName();
+                if (StringUtil.isNotBlank(resultBill.getConflictItemHisDetailName())
+                        && !resultBill.getConflictItemHisName().equals(resultBill.getConflictItemHisDetailName())) {
+                    content += resultBill.getConflictItemHisDetailName();
+                }
+                if (StringUtil.isNotBlank(resultBill.getInputValue())) {
+                    content += trimZero(resultBill.getInputValue());
+                }
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        content,
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType
+                );
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Operation.getKey())) {
+                billMsg = MsgUtil.getCommonSurgeryMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemHisName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType
+                );
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Disease.getKey())) {
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemHisName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType
+                );
+            } else {
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType
+                );
+            }
+        } else {
+            if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.PacsName.getKey())) {
+                //互斥项
+                if(resultBill.getConflictType().equals(RuleBaseTypeEnum.BillItem.getKey())) {
+                    billMsg = MsgUtil.getBillExclusionMsg(resultBill.getBillItemHisName(),
+                            resultBill.getConflictItemHisName(),
+                            resultBill.getConflictItemHisName(),
+                            "禁忌" + resultBill.getConflictItemType());
+                }
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Device.getKey())) {
+                //禁忌医疗器械及物品提示信息
+                billMsg = MsgUtil.getBillMedEquMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Operation.getKey())) {
+                //禁忌手术
+                billMsg = MsgUtil.getCommonSurgeryMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemHisName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Medicine.getKey())) {
+                //禁忌服用药品
+                if(resultBill.getConflictType().equals(RuleBaseTypeEnum.Eq.getKey())) {
+                    billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                            resultBill.getBillItemName(),
+                            "可能正在用药" + resultBill.getConflictItemHisName(),
+                            "禁忌" + resultBill.getConflictItemType(),
+                            orderType);
+                }else if(resultBill.getConflictType().equals(RuleBaseTypeEnum.Allergen.getKey())){
+                    billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                            resultBill.getBillItemName(),
+                            (StringUtil.isNotBlank(resultBill.getConflictItemHisName())
+                                    ? resultBill.getConflictItemHisName()
+                                    : resultBill.getConflictItemName())
+                                    + "过敏",
+                            "禁忌" + resultBill.getConflictItemType(),
+                            orderType);
+                }
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Allergen.getKey())) {
+                //禁忌药物过敏原/食物过敏原/过敏原
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        (StringUtil.isNotBlank(resultBill.getConflictItemHisName())
+                                ? resultBill.getConflictItemHisName()
+                                : resultBill.getConflictItemName())
+                                + "过敏",
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.Group.getName())) {
+                //禁忌禁忌人群
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            } else if (resultBill.getConflictItemTypeCode().equals(LexiconEnum.LisSubName.getName())) {
+                //禁忌实验室检查
+                String content = "";
+                if (StringUtil.isNotBlank(resultBill.getConflictItemHisName())) {
+                    content = resultBill.getConflictItemHisName();
+                }
+                if (StringUtil.isNotBlank(resultBill.getConflictItemHisDetailName())
+                        && !resultBill.getConflictItemHisName().equals(resultBill.getConflictItemHisDetailName())) {
+                    content += resultBill.getConflictItemHisDetailName();
+                }
+                if (StringUtil.isNotBlank(resultBill.getInputValue())) {
+                    content += trimZero(resultBill.getInputValue());
+                }
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        content,
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            } else if (resultBill.getConflictItemType().equals(GraphLabelEnum.Disease.getName())) {
+                //禁忌疾病
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        resultBill.getConflictItemHisName(),
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            } else {
+                //通用
+                String content = resultBill.getConflictItemName();
+                if (StringUtil.isNotBlank(resultBill.getInputValue())) {
+                    content += trimZero(resultBill.getInputValue());
+                }
+                billMsg = MsgUtil.getCommonBillMsg(resultBill.getBillItemHisName(),
+                        resultBill.getBillItemName(),
+                        content,
+                        "禁忌" + resultBill.getConflictItemType(),
+                        orderType);
+            }
+        }
+        return billMsg;
+    }
 
     /**
      * 生成随机数
@@ -440,4 +620,55 @@ public class MedRuleConvertFacade {
         }
         return random_int;
     }
+
+    /**
+     * 开单类型转换
+     *
+     * @param type
+     * @return
+     */
+    public String getOrderType(String type) {
+        String orderType = "";
+        if (type.equals(LexiconEnum.LisName.getName())) {
+            orderType = TypeEnum.lis.getName();
+        }
+        if (type.equals(LexiconEnum.PacsName.getName())
+                || type.equals(LexiconEnum.PacsSubName.getName())) {
+            orderType = TypeEnum.pacs.getName();
+        }
+        if (type.equals(LexiconEnum.Disease.getName())) {
+            orderType = TypeEnum.disease.getName();
+        }
+        if (type.equals(LexiconEnum.Medicine.getName())) {
+            orderType = TypeEnum.drug.getName();
+        }
+        if (type.equals(LexiconEnum.Operation.getName())) {
+            orderType = TypeEnum.operation.getName();
+        }
+        if (type.equals(LexiconEnum.Vital.getName())) {
+            orderType = TypeEnum.vital.getName();
+        }
+        if (type.equals(LexiconEnum.Transfusion.getName())) {
+            orderType = TypeEnum.transfusion.getName();
+        }
+        if (type.equals(LexiconEnum.Age.getName())) {
+            orderType = TypeEnum.age.getName();
+        }
+        return orderType;
+    }
+
+    /**
+     * 去除小数点末位的0,如果都是0同时去除小数点
+     *
+     * @param s
+     * @return
+     */
+    public String trimZero(String s) {
+        if (s.indexOf(".") > 0) {
+            //正则表达
+            s = s.replaceAll("0+?$", "");//去掉后面无用的零
+            s = s.replaceAll("[.]$", "");//如小数点后面全是零则去掉小数点
+        }
+        return s;
+    }
 }

+ 3 - 3
cdssman-service/src/main/java/com/diagbot/facade/RuleConvertFacade.java

@@ -1934,11 +1934,11 @@ public class RuleConvertFacade {
             content += trimZero(result.getInputValue());
         }
         if (result.getRemindItemType().equals(GraphLabelEnum.Medicine.getName())) {
-            billMsg = MsgUtil.getCommonOtherTipLisMsg(content, result.getRemindItemHisName(), TypeEnum.drug.getName());
+            //billMsg = MsgUtil.getCommonOtherTipLisMsg(content, result.getRemindItemHisName(), TypeEnum.drug.getName());
         } else if (result.getRemindItemType().equals(GraphLabelEnum.YiBaoDiseaseName.getName())) {
-            billMsg = MsgUtil.getCommonOtherTipLisMsg(content, result.getRemindItemHisName(), TypeEnum.disease.getName());
+            //billMsg = MsgUtil.getCommonOtherTipLisMsg(content, result.getRemindItemHisName(), TypeEnum.disease.getName());
         } else if (result.getRemindItemType().equals(GraphLabelEnum.Group.getName())) {
-            billMsg = MsgUtil.getCommonOtherTipLisMsg(content, result.getRemindItemName(), NeoEnum.group.getName());
+            //billMsg = MsgUtil.getCommonOtherTipLisMsg(content, result.getRemindItemName(), NeoEnum.group.getName());
         }
         return billMsg;
     }

+ 48 - 3
cdssman-service/src/main/java/com/diagbot/util/MsgUtil.java

@@ -1,4 +1,5 @@
 package com.diagbot.util;
+import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.dto.BillMsg;
 import com.diagbot.enums.NeoEnum;
 import com.diagbot.enums.TypeEnum;
@@ -73,6 +74,26 @@ public class MsgUtil {
         return billMsg;
     }
 
+    /**
+     * 开单合理性通用提示信息
+     *
+     * @param orderName 原开单项
+     * @param orderStandName 标准开单项
+     * @param content 匹配内容
+     * @param type 类型
+     * @return
+     */
+    public static BillMsg getBillLisOrderMsg(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;
+    }
+
     /**
      * 开单合理性——互斥提示信息
      *
@@ -115,21 +136,24 @@ public class MsgUtil {
      * @param content
      * @param name
      * @param type
+     * @param lis
      * @return
      */
-    public static BillMsg getCommonOtherTipLisMsg(String content, String name, String type) {
+    public static BillMsg getCommonOtherTipLisMsg(String content, String name, String type, Lis lis) {
         BillMsg billMsg = new BillMsg();
         String msg = "";
         if (TypeEnum.disease.getName().equals(type)) {
             msg = String.format("该患者%s,患有%s,请留意", content, name);
         } else if (TypeEnum.drug.getName().equals(type)) {
-            msg = String.format("该患者%s,已开%s,请留意", content, name);
+            msg = String.format("该患者%s,可能正在服用%s,请留意", content, name);
         } else if (NeoEnum.group.getName().equals(type)) {
             msg = String.format("该患者%s,%s,请留意", content, name);
         }
         billMsg.setMsg(msg);
         billMsg.setContent(content);
         billMsg.setType(type);
+        billMsg.setOrderName(lis.getName());
+        billMsg.setOrderDetailName(lis.getDetailName());
         return billMsg;
     }
 
@@ -170,7 +194,7 @@ public class MsgUtil {
      * @param type 类型
      * @return
      */
-    public static BillMsg getBillMsg24Repeat(String orderName, String orderStandName, String content, String type) {
+    public static BillMsg getBill24RepeatMsg(String orderName, String orderStandName, String content, String type) {
         BillMsg billMsg = new BillMsg();
         String msg = String.format("%s重复开立", orderName);
         billMsg.setMsg(msg);
@@ -181,6 +205,27 @@ public class MsgUtil {
         return billMsg;
     }
 
+    /**
+     * 无需重复辅检开单项
+     *
+     * @param orderName 原开单项
+     * @param orderStandName 标准开单项
+     * @param content 匹配内容
+     * @param type 类型
+     * @return
+     */
+    public static BillMsg getNeedlessRepeatOrderMsg(String orderName, String orderStandName, String content, String type) {
+        BillMsg billMsg = new BillMsg();
+        String msg = String.format("重复开立:该患者近期做过%s,且结果无异常", content);
+        billMsg.setMsg(msg);
+        billMsg.setOrderName(orderName);
+        billMsg.setOrderStandName(orderStandName);
+        billMsg.setContent(content);
+        billMsg.setType(type);
+        return billMsg;
+    }
+
+
     /**
      * 开单合理性禁忌医疗器械及物品提示信息
      *