Quellcode durchsuchen

化验提示语

zhoutg vor 3 Jahren
Ursprung
Commit
4efb8392a5

+ 6 - 0
doc/019.20210913其他值提醒化验提示语/med2021_init.sql

@@ -0,0 +1,6 @@
+INSERT INTO `med_2021`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('347', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '42', '化验_药品', '该患者[化验结果],可能正在服用[匹配内容],请留意[原因及建议]', '1', '0', '其他值提醒化验提示语');
+INSERT INTO `med_2021`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('348', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '42', '化验_诊断', '该患者[化验结果],患有[匹配内容],请留意[原因及建议]', '1', '0', '其他值提醒化验提示语');
+INSERT INTO `med_2021`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('349', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '42', '化验_人群', '该患者[化验结果],[匹配内容],请留意[原因及建议]', '1', '0', '其他值提醒化验提示语');
+INSERT INTO `med_2021`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('350', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '42', '化验_化验', '该患者[化验结果],[匹配内容],请留意[原因及建议]', '1', '0', '其他值提醒化验提示语');
+INSERT INTO `med_2021`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('351', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '42', '化验_化验本身', '该患者[化验结果],请留意[原因及建议]', '1', '0', '其他值提醒化验提示语');
+INSERT INTO `med_2021`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('352', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '21', '其他指标提醒-实验室检查子项目', '4-108-0', '1', '0', '附加信息特殊处理(非必填)');

+ 0 - 2
src/main/java/com/diagbot/process/OtherTipProcess.java

@@ -74,8 +74,6 @@ public class OtherTipProcess {
                 for (RuleConditionDTO ruleConditionDTO : ruleConditionDTOList) {
                     List<RuleBaseDTO> ruleBaseDTOList = ruleConditionDTO.getRuleBaseDTOList();
                     // 2、规则匹配
-                    // TODO 测试数据
-                    ruleConditionDTO.setMsg("请留意");
                     lisRule.otherLis(lis, ruleBaseDTOList, otherList, wordCrfDTO, ruleConditionDTO.getMsg());
                 }
             }

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

@@ -150,14 +150,14 @@ public class LisRule {
                 if (i == 1) {
                     BillMsg billMsg = msgNewUtil.getCommonOtherMsg(TypeEnum.lis.getName(),
                             lisOtherDTO.getName(), "", TypeEnum.lisSelf.getName(), lisBean, msg);
-                    otherList.add(billMsg);
+                    CoreUtil.addBeanToList(otherList, billMsg);
                 } else { // 有其他条件符合
                     // 诊断
                     if (ListUtil.isNotEmpty(lisOtherDTO.getDiseaseMsg())) {
                         for (String str : lisOtherDTO.getDiseaseMsg()) {
                             BillMsg billMsg = msgNewUtil.getCommonOtherMsg(TypeEnum.lis.getName(), lisOtherDTO.getName(),
                                     str, TypeEnum.disease.getName(), lisBean, msg);
-                            otherList.add(billMsg);
+                            CoreUtil.addBeanToList(otherList, billMsg);
                         }
                     }
                     // 药品
@@ -165,7 +165,7 @@ public class LisRule {
                         for (String str : lisOtherDTO.getDrugMsg()) {
                             BillMsg billMsg = msgNewUtil.getCommonOtherMsg(TypeEnum.lis.getName(), lisOtherDTO.getName(),
                                     str, TypeEnum.drug.getName(), lisBean, msg);
-                            otherList.add(billMsg);
+                            CoreUtil.addBeanToList(otherList, billMsg);
                         }
                     }
                     // 人群
@@ -173,7 +173,7 @@ public class LisRule {
                         for (String str : lisOtherDTO.getGroupMsg()) {
                             BillMsg billMsg = msgNewUtil.getCommonOtherMsg(TypeEnum.lis.getName(), lisOtherDTO.getName(),
                                     str, TypeEnum.group.getName(), lisBean, msg);
-                            otherList.add(billMsg);
+                            CoreUtil.addBeanToList(otherList, billMsg);
                         }
                     }
                     // 化验——暂无数据
@@ -181,7 +181,7 @@ public class LisRule {
                         for (String str : lisOtherDTO.getLisMsg()) {
                             BillMsg billMsg = msgNewUtil.getCommonOtherMsg(TypeEnum.lis.getName(), lisOtherDTO.getName(),
                                     str, TypeEnum.lis.getName(), lisBean, msg);
-                            otherList.add(billMsg);
+                            CoreUtil.addBeanToList(otherList, billMsg);
                         }
                     }
                 }

+ 3 - 7
src/main/java/com/diagbot/util/MsgNewUtil.java

@@ -87,13 +87,9 @@ public class MsgNewUtil {
         String msg = "";
         switch (TypeEnum.getEnum(otherType)) {
             case lis: // 其他值提醒——化验
-                switch (TypeEnum.getEnum(type)) {
-                    case disease: // 诊断
-                    case drug: // 药品
-                    case group: // 人群
-                    case lisSelf: // 就化验本身一个条件
-                        msg = redisUtil.getByKeyAndField(RedisEnum.otherMsg.getName(), otherType + "_" + type);
-                        break;
+                msg = redisUtil.getByKeyAndField(RedisEnum.otherMsg.getName(), otherType + "_1" + type);
+                if (StringUtil.isBlank(msg)) { // 防止报空指针
+                    return null;
                 }
                 if (StringUtil.isNotBlank(suggestMsg)) {
                     msg = msg.replaceAll("\\[原因及建议]", "," + suggestMsg);