zhoutg 3 gadi atpakaļ
vecāks
revīzija
96c52a7780

+ 18 - 0
doc/017.20210823vte量表提示结果/med2021_init.sql

@@ -0,0 +1,18 @@
+USE `med_2021`;
+
+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 ('331', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '机械医嘱', '足底静脉泵(气压治疗)', '1', '0', 'VTE医嘱数据');
+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 ('332', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '机械医嘱', '间歇充气加压(气压治疗)', '1', '0', 'VTE医嘱数据');
+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 ('333', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '机械医嘱', '医用压力弹力袜', '1', '0', 'VTE医嘱数据');
+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 ('334', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '机械医嘱', '气压治疗(肢体正负压治疗>=3部位', '1', '0', 'VTE医嘱数据');
+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 ('335', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '普通肝素', '1', '0', 'VTE医嘱数据');
+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 ('336', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '进口依诺肝素', '1', '0', 'VTE医嘱数据');
+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 ('337', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '国产依诺肝素', '1', '0', 'VTE医嘱数据');
+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 ('338', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '利伐沙班', '1', '0', 'VTE医嘱数据');
+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 ('339', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '低分子肝素', '1', '0', 'VTE医嘱数据');
+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 ('340', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '速碧林', '1', '0', 'VTE医嘱数据');
+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 ('341', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '达肝素', '1', '0', 'VTE医嘱数据');
+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 ('342', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '磺达肝癸钠', '1', '0', 'VTE医嘱数据');
+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 ('343', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '达比加群酯', '1', '0', 'VTE医嘱数据');
+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 ('344', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '阿加曲班', '1', '0', 'VTE医嘱数据');
+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 ('345', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '比伐卢定', '1', '0', 'VTE医嘱数据');
+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 ('346', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '100', '药物医嘱', '华法林1', '1', '0', 'VTE医嘱数据');

+ 5 - 5
src/main/java/com/diagbot/config/CacheDeleteInit.java

@@ -33,8 +33,8 @@ public class CacheDeleteInit implements CommandLineRunner {
         cacheFacade.clear();
         log.info("CDSS-CORE服务启动清除redis缓存成功!");
 
-//        cacheFacade.loadDrugTypeCache();
-//        log.info("CDSS-CORE服务启动加载药品类型对应关系缓存成功!");
+       // cacheFacade.loadDrugTypeCache();
+       // log.info("CDSS-CORE服务启动加载药品类型对应关系缓存成功!");
 
         cacheFacade.getDiseaseCorrespondCache();
         log.info("CDSS-CORE服务启动加载疾病对应ICD10缓存成功!");
@@ -54,12 +54,12 @@ public class CacheDeleteInit implements CommandLineRunner {
         cacheFacade.loadMsg();
         log.info("CDSS-CORE服务启动加载开单提示语成功!");
 
-        conceptInfoFacade.loadCustomDictionary();
-        log.info("CDSS-CORE服务启动加载NLP分词字典成功!");
-
         cacheFacade.loadVteAdviceCache();
         log.info("CDSS-CORE服务启动加载vte医嘱数据成功!");
 
+        conceptInfoFacade.loadCustomDictionary();
+        log.info("CDSS-CORE服务启动加载NLP分词字典成功!");
+
         cacheFacade.loadAllBaseDiagnoseCache();
         log.info("CDSS-CORE服务启动加载诊断依据缓存成功!");
 

+ 1 - 1
src/main/java/com/diagbot/enums/RedisEnum.java

@@ -28,7 +28,7 @@ public enum RedisEnum implements KeyedNamed {
     deptPush(15, "deptPush"),
     frequency(20, "frequency"),
     msg(21, "msg"),
-    vteAdvice(22, "vteAdvice");
+    vteAdvice(22, "vteAdvice:");
 
     @Setter
     private int key;

+ 3 - 2
src/main/java/com/diagbot/facade/CacheFacade.java

@@ -12,6 +12,7 @@ import com.diagbot.enums.StandConvertEnum;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.RedisUtil;
+import com.diagbot.util.StringUtil;
 import org.apache.commons.collections4.map.LinkedMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
@@ -78,7 +79,6 @@ public class CacheFacade {
     public void loadDrugTypeCache() {
         redisUtil.deleteByPrex(RedisEnum.drugType.getName());
         neoFacade.getDrugCache();
-
     }
 
     /**
@@ -134,7 +134,8 @@ public class CacheFacade {
             // 提示语
             Map<String, List<DictionaryInfoDTO>> map = EntityUtil.makeEntityListMap(dictionaryInfoDTOList, "name");
             for (String key : map.keySet()) {
-                redisUtil.set(RedisEnum.vteAdvice.getName() + "::" + key, map.get(key).stream().map(r -> r.getVal()).distinct().collect(Collectors.toList()));
+                redisUtil.set(RedisEnum.vteAdvice.getName() + key, map.get(key).stream().map(r -> r.getVal())
+                        .filter(r -> StringUtil.isNotBlank(r)).distinct().collect(Collectors.toList()));
             }
         }
     }

+ 11 - 9
src/main/java/com/diagbot/process/OtherTipProcess.java

@@ -10,6 +10,7 @@ import com.diagbot.dto.RuleConditionDTO;
 import com.diagbot.dto.RuleExtDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.enums.LexiconEnum;
+import com.diagbot.enums.RedisEnum;
 import com.diagbot.enums.RuleTypeEnum;
 import com.diagbot.enums.TypeEnum;
 import com.diagbot.facade.CommonFacade;
@@ -22,13 +23,12 @@ import com.diagbot.util.CoreUtil;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.MsgUtil;
+import com.diagbot.util.RedisUtil;
 import com.diagbot.util.ReflectUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.RuleVO;
-import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-
 import java.util.Date;
 import java.util.List;
 
@@ -50,6 +50,8 @@ public class OtherTipProcess {
     LisRule lisRule;
     @Autowired
     PacsRule pacsRule;
+    @Autowired
+    RedisUtil redisUtil;
 
     /**
      * 处理业务——化验
@@ -166,14 +168,13 @@ public class OtherTipProcess {
             Boolean drugAdviceFlag = false;
             // 是否有机械医嘱
             Boolean mechanicalAdviceFlag = false;
-            List<String> drugNameList = Lists.newArrayList("普通肝素");
-            List<String> mechanicalNameList = Lists.newArrayList("普通肝素");
-
             // 获取药品医嘱
-            drugAdviceFlag = hasAdvice(wordCrfDTO.getDrug(), drugNameList);
-            // 获取机械医嘱
+            List<String> drugAdviceList = redisUtil.get(RedisEnum.vteAdvice.getName() + "药物医嘱");
+            drugAdviceFlag = hasAdvice(wordCrfDTO.getDrug(), drugAdviceList);
             if (!drugAdviceFlag) {
-                mechanicalAdviceFlag = hasAdvice(wordCrfDTO.getOtherAdvice(), mechanicalNameList);
+                // 获取机械医嘱
+                List<String> mechanicalAdviceList = redisUtil.get(RedisEnum.vteAdvice.getName() + "机械医嘱");
+                mechanicalAdviceFlag = hasAdvice(wordCrfDTO.getOtherAdvice(), mechanicalAdviceList);
             }
             // 无药物医嘱且无机械医嘱,拼接提示语
             if (!drugAdviceFlag && !mechanicalAdviceFlag) {
@@ -189,7 +190,7 @@ public class OtherTipProcess {
     }
 
     /**
-     * 是否有效医嘱
+     * 是否有效医嘱(6天)
      *
      * @param tList
      * @param nameList
@@ -209,6 +210,7 @@ public class OtherTipProcess {
                     String dateValue = ReflectUtil.getProperty(item, "dateValue");
                     // 当前时间
                     String curDate = DateUtil.formatDateTime(new Date());
+                    // 6天有效医嘱
                     int flag = CoreUtil.compareTime(dateValue, curDate, 60L * 24 * 6, true, false);
                     if (flag == 1) {
                         hasAdviceFlag = true;

+ 2 - 2
src/main/java/com/diagbot/web/CacheController.java

@@ -45,10 +45,10 @@ public class CacheController {
         cacheFacade.loadDeptPush(); // 重新加载标准科室和推送类型的映射关系
         cacheFacade.loadFrequency(); // 重新加载频次
         conceptInfoFacade.loadCustomDictionary(); // 重新加载NLP分词字典
-        cacheFacade.loadMsg();
+        cacheFacade.loadMsg(); // 加载开单提示语
+        cacheFacade.loadVteAdviceCache(); // 重新加载vte医嘱数据
         cacheFacade.loadAllBaseDiagnoseCache(); // 重新加载诊断依据
         cacheFacade.loadAllRuleCache(); // 重新加载开单规则
-        cacheFacade.loadVteAdviceCache(); // 重新加载vte医嘱数据
         return RespDTO.onSuc(true);
     }