Переглянути джерело

Merge branch 'develop' into dev/cdssman20200727_init

gaodm 4 роки тому
батько
коміт
a1f8b1d8c3
23 змінених файлів з 1220 додано та 25 видалено
  1. 13 1
      aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java
  2. 14 1
      aipt-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java
  3. 14 1
      aipt-service/src/main/java/com/diagbot/enums/StaticSearchTypeEnum.java
  4. 62 0
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  5. 8 0
      aipt-service/src/main/java/com/diagbot/mapper/ConceptMapper.java
  6. 8 0
      aipt-service/src/main/java/com/diagbot/service/ConceptService.java
  7. 22 0
      aipt-service/src/main/java/com/diagbot/service/impl/ConceptServiceImpl.java
  8. 72 1
      aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java
  9. 1 1
      aipt-service/src/main/java/com/diagbot/vo/GetStaticKnowledgeVO.java
  10. 13 0
      aipt-service/src/main/java/com/diagbot/web/ConceptController.java
  11. 727 0
      aipt-service/src/main/resources/mapper/ConceptMapper.xml
  12. 9 2
      data-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  13. 7 3
      data-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  14. 14 2
      data-service/src/main/java/com/diagbot/facade/SearchFacade.java
  15. 17 5
      data-service/src/main/java/com/diagbot/web/SearchController.java
  16. 163 0
      docs/038.20200723海南静态知识检索/med_20200723.sql
  17. 2 2
      knowledgeman-service/src/main/java/com/diagbot/config/MultipartConfigurer.java
  18. 1 0
      knowledgeman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  19. 1 0
      knowledgeman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  20. 1 0
      knowledgeman-service/src/main/java/com/diagbot/dto/FileDTO.java
  21. 13 1
      knowledgeman-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java
  22. 9 1
      knowledgeman-service/src/main/java/com/diagbot/service/impl/EnumsDataServiceImpl.java
  23. 29 4
      knowledgeman-service/src/main/java/com/diagbot/service/impl/UploadServiceImpl.java

+ 13 - 1
aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -25,7 +25,19 @@ public enum ConceptTypeEnum implements KeyedNamed {
     Scale(21, "量表"),
     Indication(22, "指标"),
     OPERATION(25, "手术"),
-    LisDetail(51, "化验明细");
+    LisDetail(51, "化验明细"),
+    // GUIDELINES_OUTPATIENT(72,"诊疗指南(门诊)"),
+    // GUIDELINES_HOS(73,"诊疗指南(住院)"),
+    NURSE(74,"护理"),
+    CLINICAL_PATHWAY(75,"临床路径"),
+    BLOOD(76,"血液"),
+    ANESTHESIA(77,"麻醉"),
+    TUTELAGE(78,"监护"),
+    TCM(79,"中医"),
+    THE_DIVISION_PROCESS(80,"入科流程"),
+    CENSORSHIP_RULES(81,"审查规则"),
+    E_BOOK (82,"电子书"),
+    VIDEO(83,"视频");
 
 
     @Setter

+ 14 - 1
aipt-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java

@@ -79,7 +79,20 @@ public enum LexiconTypeEnum implements KeyedNamed {
     FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY(67, "家族相关传染病史"),
     FURTHER_CONSULTATION(68, "复诊"),
     DIAGNOSTIC_CRITERIA(69, "诊断依据条件"),
-    OTHER_DIAGNOSTIC_CRITERIA(70, "诊断依据其他");
+    OTHER_DIAGNOSTIC_CRITERIA(70, "诊断依据其他"),
+    PACS_ROOT_DIRECTORY(71,"辅检根目录"),
+    // GUIDELINES_OUTPATIENT(72,"诊疗指南(门诊)"),
+    // GUIDELINES_HOS(73,"诊疗指南(住院)"),
+    NURSE(74,"护理"),
+    CLINICAL_PATHWAY(75,"临床路径"),
+    BLOOD(76,"血液"),
+    ANESTHESIA(77,"麻醉"),
+    TUTELAGE(78,"监护"),
+    TCM(79,"中医"),
+    THE_DIVISION_PROCESS(80,"入科流程"),
+    CENSORSHIP_RULES(81,"审查规则"),
+    E_BOOK (82,"电子书"),
+    VIDEO(83,"视频");
 
 
     @Setter

+ 14 - 1
aipt-service/src/main/java/com/diagbot/enums/StaticSearchTypeEnum.java

@@ -15,7 +15,20 @@ public enum StaticSearchTypeEnum implements KeyedNamed {
     PACS_ITEMS(16, "辅检"),
     DIAGNOSIS(18, "诊断"),
     OPERATION(25, "手术"),
-    GAUGE(48, "量表");
+    GAUGE(48, "量表"),
+    // GUIDELINES_OUTPATIENT(72,"诊疗指南(门诊)"),
+    // GUIDELINES_HOS(73,"诊疗指南(住院)"),
+    NURSE(74,"护理"),
+    CLINICAL_PATHWAY(75,"临床路径"),
+    VITAL_INDEX(33, "体征指标"),
+    BLOOD(76,"血液"),
+    ANESTHESIA(77,"麻醉"),
+    TUTELAGE(78,"监护"),
+    TCM(79,"中医"),
+    THE_DIVISION_PROCESS(80,"入科流程"),
+    CENSORSHIP_RULES(81,"审查规则"),
+    E_BOOK (82,"电子书"),
+    VIDEO(83,"视频");
 
     @Setter
     private int key;

+ 62 - 0
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -489,6 +489,68 @@ public class ConceptFacade extends ConceptServiceImpl {
         return staticRetrievalList;
     }
 
+    /**
+     * 静态知识标签检索【海南】
+     *
+     * @param getStaticKnowledgeVO
+     * @return
+     */
+    public List<RetrievalDTO> getStaticKnowledgeHaiNan(GetStaticKnowledgeVO getStaticKnowledgeVO) {
+        RetrievalVO retrievalVO = new RetrievalVO();
+        BeanUtil.copyProperties(getStaticKnowledgeVO, retrievalVO);
+        List<Integer> types = retrievalVO.getTypes();
+        if (ListUtil.isEmpty(types)) {
+            // 添加词库搜索类型
+            types.add(StaticSearchTypeEnum.DIAGNOSIS.getKey());
+            types.add(StaticSearchTypeEnum.DRUGS.getKey());
+            types.add(StaticSearchTypeEnum.SYMPTOM.getKey());
+            types.add(StaticSearchTypeEnum.LIS_PACKAGE.getKey());
+            types.add(StaticSearchTypeEnum.PACS_ITEMS.getKey());
+            types.add(StaticSearchTypeEnum.OPERATION.getKey());
+            // types.add(StaticSearchTypeEnum.GAUGE.getKey()); // 量表不需要
+            // types.add(StaticSearchTypeEnum.GUIDELINES_OUTPATIENT.getKey()); // 已删除
+            // types.add(StaticSearchTypeEnum.GUIDELINES_HOS.getKey()); // 已删除
+            types.add(StaticSearchTypeEnum.NURSE.getKey());
+            types.add(StaticSearchTypeEnum.CLINICAL_PATHWAY.getKey());
+            types.add(StaticSearchTypeEnum.VITAL_INDEX.getKey());
+            types.add(StaticSearchTypeEnum.BLOOD.getKey());
+            types.add(StaticSearchTypeEnum.ANESTHESIA.getKey());
+            types.add(StaticSearchTypeEnum.TUTELAGE.getKey());
+            types.add(StaticSearchTypeEnum.TCM.getKey());
+            types.add(StaticSearchTypeEnum.THE_DIVISION_PROCESS.getKey());
+            types.add(StaticSearchTypeEnum.CENSORSHIP_RULES.getKey());
+            types.add(StaticSearchTypeEnum.E_BOOK.getKey());
+            types.add(StaticSearchTypeEnum.VIDEO.getKey());
+            getStaticKnowledgeVO.setTypes(types);
+        }
+        List<Integer> typesIn = new ArrayList<>();
+        // 是否包含化验
+        if (types.contains(LexiconTypeEnum.LIS_PACKAGE.getKey())) {
+            retrievalVO.setHasLis(true); //
+        }
+        // 是否包含量表
+        // if (types.contains(LexiconTypeEnum.GAUGE.getKey())) {
+        //     retrievalVO.setHasGauge(true); // 包含量表
+        // }
+        for (Integer type : types) {
+            // 化验单独处理,不需要遍历
+            if (LexiconTypeEnum.LIS_PACKAGE.getKey() != type.intValue()) {
+                typesIn.add(type);
+            }
+        }
+        retrievalVO.setTypesIn(typesIn);
+
+        List<RetrievalDTO> staticRetrievalList = this.staticKnowledgeHaiNan(retrievalVO);
+        for (RetrievalDTO retrievalDTO : staticRetrievalList) {
+            retrievalDTO.setType(ParamConvertUtil.libConvert2Concept(retrievalDTO.getLibTypeId().intValue()));
+            if ((retrievalDTO.getShowType().intValue() == 1)
+                    || (retrievalDTO.getShowType().intValue() == 21)) {//去除本体retrivalName和(父项--子项)组合的retrivalName
+                retrievalDTO.setRetrievalName(null);
+            }
+        }
+        return staticRetrievalList;
+    }
+
 
     /**
      * 检索词库获取标准词

+ 8 - 0
aipt-service/src/main/java/com/diagbot/mapper/ConceptMapper.java

@@ -58,6 +58,14 @@ public interface ConceptMapper extends BaseMapper<Concept> {
      */
     List<RetrievalDTO> staticKnowledge(RetrievalVO retrievalVO);
 
+    /**
+     * 静态知识检索【海南】
+     *
+     * @param retrievalVO
+     * @return
+     */
+    List<RetrievalDTO> staticKnowledgeHaiNan(RetrievalVO retrievalVO);
+
     List<ConceptBaseDTO> getConceptConMap(ConceptFindVO conceptFindVO);
 
     /**

+ 8 - 0
aipt-service/src/main/java/com/diagbot/service/ConceptService.java

@@ -58,6 +58,14 @@ public interface ConceptService extends IService<Concept> {
      */
     List<RetrievalDTO> staticKnowledge(RetrievalVO retrievalVO);
 
+    /**
+     * 静态知识检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    List<RetrievalDTO> staticKnowledgeHaiNan(RetrievalVO retrievalVO);
+
     List<ConceptBaseDTO> getConceptConMap(ConceptFindVO conceptFindVO);
 
     /**

+ 22 - 0
aipt-service/src/main/java/com/diagbot/service/impl/ConceptServiceImpl.java

@@ -76,6 +76,28 @@ public class ConceptServiceImpl extends ServiceImpl<ConceptMapper, Concept> impl
         return res;
     }
 
+    /**
+     * 静态知识检索【海南】
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @Override
+    public List<RetrievalDTO> staticKnowledgeHaiNan(RetrievalVO retrievalVO){
+        List<RetrievalDTO> staticList = baseMapper.staticKnowledgeHaiNan(retrievalVO);
+        List<RetrievalDTO> res = new ArrayList<>();
+        if (ListUtil.isNotEmpty(staticList)){
+            List<Long> ids = new ArrayList<>();
+            for (RetrievalDTO retrievalDTO : staticList){
+                if (!ids.contains(retrievalDTO.getConceptId())){
+                    ids.add(retrievalDTO.getConceptId());
+                    res.add(retrievalDTO);
+                }
+            }
+        }
+        return res;
+    }
+
     /**
      * 获取带排序概念-关系-概念
      *

+ 72 - 1
aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java

@@ -2,7 +2,6 @@ package com.diagbot.util;
 
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
-import io.swagger.models.auth.In;
 
 /**
  * @Description:参数转换
@@ -69,6 +68,42 @@ public class ParamConvertUtil {
             case OPERATION:
                 libType = LexiconTypeEnum.OPERATION.getKey();
                 break;
+            // case GUIDELINES_OUTPATIENT:
+            //     libType = LexiconTypeEnum.GUIDELINES_OUTPATIENT.getKey();
+            //     break;
+            // case GUIDELINES_HOS:
+            //     libType = LexiconTypeEnum.GUIDELINES_HOS.getKey();
+            //     break;
+            case NURSE:
+                libType = LexiconTypeEnum.NURSE.getKey();
+                break;
+            case CLINICAL_PATHWAY:
+                libType = LexiconTypeEnum.CLINICAL_PATHWAY.getKey();
+                break;
+            case BLOOD:
+                libType = LexiconTypeEnum.BLOOD.getKey();
+                break;
+            case ANESTHESIA:
+                libType = LexiconTypeEnum.ANESTHESIA.getKey();
+                break;
+            case TUTELAGE:
+                libType = LexiconTypeEnum.TUTELAGE.getKey();
+                break;
+            case TCM:
+                libType = LexiconTypeEnum.TCM.getKey();
+                break;
+            case THE_DIVISION_PROCESS:
+                libType = LexiconTypeEnum.THE_DIVISION_PROCESS.getKey();
+                break;
+            case CENSORSHIP_RULES:
+                libType = LexiconTypeEnum.CENSORSHIP_RULES.getKey();
+                break;
+            case E_BOOK:
+                libType = LexiconTypeEnum.E_BOOK.getKey();
+                break;
+            case VIDEO:
+                libType = LexiconTypeEnum.VIDEO.getKey();
+                break;
             default:
                 break;
         }
@@ -151,6 +186,42 @@ public class ParamConvertUtil {
             case OPERATION:
                 type = ConceptTypeEnum.OPERATION.getKey();
                 break;
+            // case GUIDELINES_OUTPATIENT:
+            //     type = ConceptTypeEnum.GUIDELINES_OUTPATIENT.getKey();
+            //     break;
+            // case GUIDELINES_HOS:
+            //     type = ConceptTypeEnum.GUIDELINES_HOS.getKey();
+            //     break;
+            case NURSE:
+                type = ConceptTypeEnum.NURSE.getKey();
+                break;
+            case CLINICAL_PATHWAY:
+                type = ConceptTypeEnum.CLINICAL_PATHWAY.getKey();
+                break;
+            case BLOOD:
+                type = ConceptTypeEnum.BLOOD.getKey();
+                break;
+            case ANESTHESIA:
+                type = ConceptTypeEnum.ANESTHESIA.getKey();
+                break;
+            case TUTELAGE:
+                type = ConceptTypeEnum.TUTELAGE.getKey();
+                break;
+            case TCM:
+                type = ConceptTypeEnum.TCM.getKey();
+                break;
+            case THE_DIVISION_PROCESS:
+                type = ConceptTypeEnum.THE_DIVISION_PROCESS.getKey();
+                break;
+            case CENSORSHIP_RULES:
+                type = ConceptTypeEnum.CENSORSHIP_RULES.getKey();
+                break;
+            case E_BOOK:
+                type = ConceptTypeEnum.E_BOOK.getKey();
+                break;
+            case VIDEO:
+                type = ConceptTypeEnum.VIDEO.getKey();
+                break;
             default:
                 break;
         }

+ 1 - 1
aipt-service/src/main/java/com/diagbot/vo/GetStaticKnowledgeVO.java

@@ -10,7 +10,7 @@ import java.util.List;
 
 /**
  * @Description:
- * @author: wangyu
+ * @author: zhoutg
  * @time: 2019/5/24 9:23
  */
 @Getter

+ 13 - 0
aipt-service/src/main/java/com/diagbot/web/ConceptController.java

@@ -172,4 +172,17 @@ public class ConceptController {
         List<RetrievalDTO> data = conceptFacade.getStaticKnowledge(getStaticKnowledgeVO);
         return RespDTO.onSuc(data);
     }
+
+    @ApiOperation(value = "静态知识检索【海南】[by:zhoutg]",
+            notes = "inputStr:检索内容,必填<br>" +
+                    "inputIds:需要去重的id<br>" +
+                    "types:指定类型,1:症状,10:药品,12:化验,16:辅检,18:诊断,25:手术,33:体征," +
+                    "72:诊疗指南(门诊),73:诊疗指南(住院),74:护理,75:临床路径,76:血液,77:麻醉,78:监护," +
+                    "79:中医,80:入科流程,81:审查规则,82:电子书,83:视频, 不指定:以上全部")
+    @PostMapping("/getStaticKnowledgeHaiNan")
+    @SysLogger("getStaticKnowledgeHaiNan")
+    public RespDTO<List<RetrievalDTO>> getStaticKnowledgeHaiNan(@Valid @RequestBody GetStaticKnowledgeVO getStaticKnowledgeVO) {
+        List<RetrievalDTO> data = conceptFacade.getStaticKnowledgeHaiNan(getStaticKnowledgeVO);
+        return RespDTO.onSuc(data);
+    }
 }

+ 727 - 0
aipt-service/src/main/resources/mapper/ConceptMapper.xml

@@ -1246,6 +1246,733 @@
             a1.conceptId ASC
     </select>
 
+    <select id="staticKnowledgeHaiNan" resultType="com.diagbot.dto.RetrievalDTO">
+        SELECT
+        a1.*
+        FROM
+        (
+        -- 除化验外其他类型标签
+        <if test="typesIn != null and typesIn.size() > 0">
+            (
+            SELECT
+            b1.*, 0 uniqueId,
+            NULL uniqueName
+            FROM
+            (
+            SELECT
+            t1.id conceptId,
+            t1.lib_name `name`,
+            (
+            CASE t1.lib_type
+            WHEN 18 THEN
+            10
+            WHEN 10 THEN
+            20
+            WHEN 1 THEN
+            25
+            WHEN 16 THEN
+            50
+            WHEN 25 THEN
+            60
+            WHEN 74 THEN
+            80
+            WHEN 75 THEN
+            85
+            WHEN 33 THEN
+            90
+            WHEN 76 THEN
+            100
+            WHEN 77 THEN
+            105
+            WHEN 78 THEN
+            110
+            WHEN 79 THEN
+            115
+            WHEN 80 THEN
+            120
+            WHEN 81 THEN
+            125
+            WHEN 82 THEN
+            130
+            WHEN 83 THEN
+            135
+            ELSE
+            200
+            END
+            ) + 1 AS orderNo,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            CASE t6.`name`
+            when '药品通用名' then '药品'
+            when '辅检项目' then '辅检'
+            when '体征指标' then '体征'
+            ELSE t6.`name`
+            END libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t7.is_deleted = 'N'
+            AND t1.lib_type IN
+            <foreach collection="typesIn" item="item" open="(" close=")"
+                     separator=",">
+                #{item}
+            </foreach>
+            AND (
+            UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+            OR UPPER(TRIM(t2. NAME)) = UPPER((TRIM(#{InputStr})))
+            )
+            ) b1
+            )
+            UNION
+            (
+            SELECT
+            b1.*, 0 uniqueId,
+            NULL uniqueName
+            FROM
+            (
+            SELECT
+            t1.id conceptId,
+            t1.lib_name `name`,
+            (
+            CASE t1.lib_type
+            WHEN 18 THEN
+            10
+            WHEN 10 THEN
+            20
+            WHEN 1 THEN
+            25
+            WHEN 16 THEN
+            50
+            WHEN 25 THEN
+            60
+            WHEN 74 THEN
+            80
+            WHEN 75 THEN
+            85
+            WHEN 33 THEN
+            90
+            WHEN 76 THEN
+            100
+            WHEN 77 THEN
+            105
+            WHEN 78 THEN
+            110
+            WHEN 79 THEN
+            115
+            WHEN 80 THEN
+            120
+            WHEN 81 THEN
+            125
+            WHEN 82 THEN
+            130
+            WHEN 83 THEN
+            135
+            ELSE
+            200
+            END
+            ) + 2 AS orderNo,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            CASE t6.`name`
+            when '药品通用名' then '药品'
+            when '辅检项目' then '辅检'
+            when '体征指标' then '体征'
+            ELSE t6.`name`
+            END libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t7.is_deleted = 'N'
+            AND t1.lib_type IN
+            <foreach collection="typesIn" item="item" open="(" close=")"
+                     separator=",">
+                #{item}
+            </foreach>
+            AND (
+            UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            )
+            ) b1
+            )
+            UNION
+            (
+            SELECT
+            b1.*, 0 uniqueId,
+            NULL uniqueName
+            FROM
+            (
+            SELECT
+            t1.id conceptId,
+            t1.lib_name `name`,
+            (
+            CASE t1.lib_type
+            WHEN 18 THEN
+            10
+            WHEN 10 THEN
+            20
+            WHEN 1 THEN
+            25
+            WHEN 16 THEN
+            50
+            WHEN 25 THEN
+            60
+            WHEN 74 THEN
+            80
+            WHEN 75 THEN
+            85
+            WHEN 33 THEN
+            90
+            WHEN 76 THEN
+            100
+            WHEN 77 THEN
+            105
+            WHEN 78 THEN
+            110
+            WHEN 79 THEN
+            115
+            WHEN 80 THEN
+            120
+            WHEN 81 THEN
+            125
+            WHEN 82 THEN
+            130
+            WHEN 83 THEN
+            135
+            ELSE
+            200
+            END
+            ) + 3 AS orderNo,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            CASE t6.`name`
+            when '药品通用名' then '药品'
+            when '辅检项目' then '辅检'
+            when '体征指标' then '体征'
+            ELSE t6.`name`
+            END libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t7.is_deleted = 'N'
+            AND t1.lib_type IN
+            <foreach collection="typesIn" item="item" open="(" close=")"
+                     separator=",">
+                #{item}
+            </foreach>
+            AND (
+            UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})), '%')
+            )
+            ) b1
+            )
+        </if>
+        -- 化验本体标签公表项匹配静态知识
+        <if test="typesIn != null and typesIn.size() > 0 and hasLis == true">
+            UNION
+        </if>
+        <if test="hasLis == true">
+            (
+            SELECT
+            b2.id conceptId,
+            b1.selfName `name`,
+            31 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 12
+            AND (
+            UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+            OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+            )
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.item_id = 0
+            AND m.meal_id = b1.selfId
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            b1.selfName `name`,
+            32 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 12
+            AND (
+            UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            )
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.item_id = 0
+            AND m.meal_id = b1.selfId
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            b1.selfName `name`,
+            33 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 12
+            AND (
+            UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})), '%')
+            )
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.item_id = 0
+            AND m.meal_id = b1.selfId
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            ) -- 化验子项推父项,父项公表项匹配静态知识
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            b1.parentName `name`,
+            34 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType + 10 showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t5.id parentId,
+            t5.lib_name parentName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t5.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
+            LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t4.is_deleted = 'N'
+            AND t5.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 13
+            AND (
+            UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+            OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+            )
+            AND t4.relation_id = 18
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.meal_id = b1.parentId
+            AND m.item_id = 0
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            b1.parentName `name`,
+            35 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType + 10 showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t5.id parentId,
+            t5.lib_name parentName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t5.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
+            LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t4.is_deleted = 'N'
+            AND t5.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 13
+            AND (
+            UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            )
+            AND t4.relation_id = 18
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.meal_id = b1.parentId
+            AND m.item_id = 0
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            b1.parentName `name`,
+            36 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType + 10 showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t5.id parentId,
+            t5.lib_name parentName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t5.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
+            LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t4.is_deleted = 'N'
+            AND t5.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 13
+            AND (
+            UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+            )
+            AND t4.relation_id = 18
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.meal_id = b1.parentId
+            AND m.item_id = 0
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            ) -- 化验子项推父项,父项--子项组合公表项匹配静态知识
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            CONCAT(b1.parentName,'(',b1.selfName,')') `name`,
+            41 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType + 20 showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t5.id parentId,
+            t5.lib_name parentName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
+            LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t4.is_deleted = 'N'
+            AND t5.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 13
+            AND (
+            UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+            OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+            )
+            AND t4.relation_id = 18
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.meal_id = b1.parentId
+            AND m.item_id = b1.selfId
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            CONCAT(b1.parentName,'(',b1.selfName,')') `name`,
+            42 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType + 20 showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t5.id parentId,
+            t5.lib_name parentName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
+            LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t4.is_deleted = 'N'
+            AND t5.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 13
+            AND (
+            UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+            )
+            AND t4.relation_id = 18
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.meal_id = b1.parentId
+            AND m.item_id = b1.selfId
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+            UNION
+            (
+            SELECT
+            b2.id conceptId,
+            CONCAT(b1.parentName,'(',b1.selfName,')') `name`,
+            43 AS orderNo,
+            b1.retrievalName retrievalName,
+            b1.showType + 20 showType,
+            b1.libTypeId libTypeId,
+            b1.libTypeName libTypeName,
+            b2.id uniqueId,
+            b2.lib_name uniqueName
+            FROM
+            (
+            SELECT
+            t1.id selfId,
+            t1.lib_name selfName,
+            t5.id parentId,
+            t5.lib_name parentName,
+            t2.`name` retrievalName,
+            t2.is_concept showType,
+            t1.lib_type libTypeId,
+            t6.`name` libTypeName
+            FROM
+            kl_concept t1
+            LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+            LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
+            LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
+            LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+            WHERE
+            t1.is_deleted = 'N'
+            AND t2.is_deleted = 'N'
+            AND t4.is_deleted = 'N'
+            AND t5.is_deleted = 'N'
+            AND t6.is_deleted = 'N'
+            AND t1.lib_type = 13
+            AND (
+            UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+            OR UPPER(t2. NAME) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+            )
+            AND t4.relation_id = 18
+            ) b1,
+            kl_concept b2,
+            kl_concept_detail b3,
+            kl_lis_mapping m
+            WHERE
+            b2.is_deleted = 'N'
+            AND b3.is_deleted = 'N'
+            AND m.is_deleted = 'N'
+            AND m.meal_id = b1.parentId
+            AND m.item_id = b1.selfId
+            AND m.unique_id = b2.id
+            AND b2.lib_type = 46
+            AND b2.id = b3.concept_id
+            )
+        </if>
+
+        ) a1
+        ORDER BY
+        a1.orderNo ASC,
+        a1.showType DESC,
+        a1.conceptId ASC
+    </select>
     <select id="getConceptConMap" resultType="com.diagbot.dto.ConceptBaseDTO" parameterType="com.diagbot.vo.ConceptFindVO">
         SELECT
             t1.id as conceptId,

+ 9 - 2
data-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -10,12 +10,10 @@ import com.diagbot.dto.DisclaimerInformationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.ScaleIndexDTO;
 import com.diagbot.dto.VersionWrapperDTO;
 import com.diagbot.vo.ConceptIntroduceVO;
 import com.diagbot.vo.DisclaimerInformationVO;
 import com.diagbot.vo.GetStaticKnowledgeVO;
-import com.diagbot.vo.ScaleIndexVO;
 import com.diagbot.vo.VersionVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -97,6 +95,15 @@ public interface AiptServiceClient {
     @PostMapping("/concept/getStaticKnowledge")
     RespDTO<List<RetrievalDTO>> getStaticKnowledge(@RequestBody GetStaticKnowledgeVO getStaticKnowledgeVO);
 
+    /**
+     * 静态知识检索【海南】
+     *
+     * @param getStaticKnowledgeVO
+     * @return
+     */
+    @PostMapping("/concept/getStaticKnowledgeHaiNan")
+    RespDTO<List<RetrievalDTO>> getStaticKnowledgeHaiNan(@RequestBody GetStaticKnowledgeVO getStaticKnowledgeVO);
+
 //    /**
 //     * 量表搜索
 //     *

+ 7 - 3
data-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -10,12 +10,10 @@ import com.diagbot.dto.DisclaimerInformationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.ScaleIndexDTO;
 import com.diagbot.dto.VersionWrapperDTO;
 import com.diagbot.vo.ConceptIntroduceVO;
 import com.diagbot.vo.DisclaimerInformationVO;
 import com.diagbot.vo.GetStaticKnowledgeVO;
-import com.diagbot.vo.ScaleIndexVO;
 import com.diagbot.vo.VersionVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
@@ -121,7 +119,13 @@ public class AiptServiceHystrix implements AiptServiceClient {
         return null;
     }
 
-//    /**
+    @Override
+    public RespDTO<List<RetrievalDTO>> getStaticKnowledgeHaiNan(GetStaticKnowledgeVO getStaticKnowledgeVO) {
+        log.error("【hystrix】调用{}异常", "getStaticKnowledgeHaiNan");
+        return null;
+    }
+
+    //    /**
 //     * 量表搜索
 //     *
 //     * @param scaleIndexVO

+ 14 - 2
data-service/src/main/java/com/diagbot/facade/SearchFacade.java

@@ -3,12 +3,10 @@ package com.diagbot.facade;
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.ScaleIndexDTO;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.GetStaticVO;
-import com.diagbot.vo.ScaleIndexVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -38,6 +36,20 @@ public class SearchFacade {
         return res.data;
     }
 
+    /**
+     * 静态知识检索【海南】
+     *
+     * @param getStaticVO
+     * @return
+     */
+    public List<RetrievalDTO> getStaticKnowledgeHaiNan(GetStaticVO getStaticVO) {
+        GetStaticKnowledgeVO getStaticKnowledgeVO = new GetStaticKnowledgeVO();
+        BeanUtil.copyProperties(getStaticVO, getStaticKnowledgeVO);
+        RespDTO<List<RetrievalDTO>> res = aiptServiceClient.getStaticKnowledgeHaiNan(getStaticKnowledgeVO);
+        RespDTOUtil.respNGDeal(res, "获取静态知识失败");
+        return res.data;
+    }
+
 //    /**
 //     * 量表搜索
 //     *

+ 17 - 5
data-service/src/main/java/com/diagbot/web/SearchController.java

@@ -3,13 +3,8 @@ package com.diagbot.web;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.ScaleIndexDTO;
-import com.diagbot.facade.ConceptDetailFacade;
 import com.diagbot.facade.SearchFacade;
-import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.GetStaticVO;
-import com.diagbot.vo.ScaleIndexVO;
-import io.micrometer.core.instrument.search.Search;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,6 +44,23 @@ public class SearchController {
         return RespDTO.onSuc(searchFacade.getStaticKnowledge(getStaticVO));
     }
 
+    /**
+     * 静态知识检索【海南项目】
+     *
+     * @param getStaticVO
+     * @return
+     */
+    @ApiOperation(value = "静态知识检索【海南项目】[by:zhoutg]",
+            notes = "inputStr:检索内容,必填<br>" +
+                    "types:指定类型,1:症状,10:药品,12:化验,16:辅检,18:诊断,25:手术,33:体征," +
+                    "72:诊疗指南(门诊),73:诊疗指南(住院),74:护理,75:临床路径,76:血液,77:麻醉,78:监护," +
+                    "79:中医,80:入科流程,81:审查规则,82:电子书,83:视频, 不指定:以上全部")
+    @PostMapping("/getStaticKnowledgeHaiNan")
+    @SysLogger("getStaticKnowledgeHaiNan")
+    public RespDTO<List<RetrievalDTO>> getStaticKnowledgeHaiNan(@Valid @RequestBody GetStaticVO getStaticVO){
+        return RespDTO.onSuc(searchFacade.getStaticKnowledgeHaiNan(getStaticVO));
+    }
+
 //    /**
 //     * 量表搜索
 //     *

+ 163 - 0
docs/038.20200723海南静态知识检索/med_20200723.sql

@@ -0,0 +1,163 @@
+use `med`;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for kl_dictionary_info
+-- ----------------------------
+DROP TABLE IF EXISTS `kl_dictionary_info`;
+CREATE TABLE `kl_dictionary_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `group_type` bigint(20) NOT NULL DEFAULT '0' COMMENT '分组(值自定义)',
+  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '内容',
+  `val` varchar(255) NOT NULL DEFAULT '' COMMENT '值',
+  `return_type` int(11) NOT NULL DEFAULT '1' COMMENT '返回类型(0: 都返回,1:后台维护返回 2:界面返回)',
+  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='icss字典表';
+
+-- ----------------------------
+-- Records of kl_dictionary_info
+-- ----------------------------
+INSERT INTO `kl_dictionary_info` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '文本模块', '0', '1', '1', '量表结构维护-文本模块');
+INSERT INTO `kl_dictionary_info` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '推送模块', '1', '1', '2', '量表结构维护-推送模块');
+INSERT INTO `kl_dictionary_info` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'Ⅰ', 'Ⅰ', '1', '1', '疾病分级-Ⅰ级');
+INSERT INTO `kl_dictionary_info` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'Ⅱ', 'Ⅱ', '1', '2', '疾病分级-Ⅱ级');
+INSERT INTO `kl_dictionary_info` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '全部', '0', '2', '1', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '症状', '1', '2', '30', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '诊断', '18', '2', '10', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '化验', '12', '2', '40', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '辅检', '16', '2', '50', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '药品', '10', '2', '20', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '手术', '25', '2', '60', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '量表', '48', '2', '70', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '全部', '0', '2', '1', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '症状', '1', '2', '30', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '诊断', '18', '2', '10', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '化验', '12', '2', '40', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '辅检', '16', '2', '50', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '药品', '10', '2', '20', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '手术', '25', '2', '60', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('20', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '诊疗指南(门诊)', '72', '2', '80', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('21', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '诊疗指南(住院)', '73', '2', '90', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '护理', '74', '2', '100', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('23', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '临床路径', '75', '2', '110', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('24', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '体征', '33', '2', '120', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '血液', '76', '2', '130', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '麻醉', '77', '2', '140', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '监护', '78', '2', '150', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '中医', '79', '2', '160', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '入科流程', '80', '2', '170', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '审查规则', '81', '2', '180', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '电子书', '82', '2', '190', '静态知识检索类型-海南');
+INSERT INTO `kl_dictionary_info` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '视频', '83', '2', '200', '静态知识检索类型-海南');
+
+-- ----------------------------
+-- Table structure for kl_lexicon
+-- ----------------------------
+DROP TABLE IF EXISTS `kl_lexicon`;
+CREATE TABLE `kl_lexicon` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `name` varchar(16) DEFAULT NULL COMMENT '类型名称',
+  `is_has_common` int(1) NOT NULL DEFAULT '0' COMMENT '是否有通用扩展:0-无,1-有',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `NAME_INDEX` (`name`) USING BTREE COMMENT '名称全表唯一'
+) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8 COMMENT='术语分类表';
+
+-- ----------------------------
+-- Records of kl_lexicon
+-- ----------------------------
+INSERT INTO `kl_lexicon` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '症状', '1');
+INSERT INTO `kl_lexicon` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '时间', '0');
+INSERT INTO `kl_lexicon` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '部位', '1');
+INSERT INTO `kl_lexicon` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '性质', '1');
+INSERT INTO `kl_lexicon` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '诱因', '0');
+INSERT INTO `kl_lexicon` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '程度', '0');
+INSERT INTO `kl_lexicon` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '阴性', '0');
+INSERT INTO `kl_lexicon` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '阳性', '0');
+INSERT INTO `kl_lexicon` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '单位', '0');
+INSERT INTO `kl_lexicon` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '药品通用名', '1');
+INSERT INTO `kl_lexicon` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '治疗', '1');
+INSERT INTO `kl_lexicon` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '化验套餐', '1');
+INSERT INTO `kl_lexicon` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '化验明细', '1');
+INSERT INTO `kl_lexicon` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '化验结果', '0');
+INSERT INTO `kl_lexicon` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '辅检套餐', '1');
+INSERT INTO `kl_lexicon` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '辅检项目', '1');
+INSERT INTO `kl_lexicon` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '辅检结果', '1');
+INSERT INTO `kl_lexicon` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '诊断', '1');
+INSERT INTO `kl_lexicon` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '连接词', '0');
+INSERT INTO `kl_lexicon` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '方位', '0');
+INSERT INTO `kl_lexicon` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '亲属', '0');
+INSERT INTO `kl_lexicon` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '婚姻', '1');
+INSERT INTO `kl_lexicon` VALUES ('23', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '食品', '0');
+INSERT INTO `kl_lexicon` VALUES ('24', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '历史', '0');
+INSERT INTO `kl_lexicon` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '手术', '1');
+INSERT INTO `kl_lexicon` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '症状表现', '1');
+INSERT INTO `kl_lexicon` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数字量词', '0');
+INSERT INTO `kl_lexicon` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '数字', '0');
+INSERT INTO `kl_lexicon` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '药品大类', '1');
+INSERT INTO `kl_lexicon` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '药品小类', '1');
+INSERT INTO `kl_lexicon` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '辅检大类', '1');
+INSERT INTO `kl_lexicon` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '辅检小类', '1');
+INSERT INTO `kl_lexicon` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '体征指标', '1');
+INSERT INTO `kl_lexicon` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '体征指标值', '1');
+INSERT INTO `kl_lexicon` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '体征结果', '0');
+INSERT INTO `kl_lexicon` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '地点', '0');
+INSERT INTO `kl_lexicon` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '职业', '0');
+INSERT INTO `kl_lexicon` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '个人史', '1');
+INSERT INTO `kl_lexicon` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '个人史描述', '1');
+INSERT INTO `kl_lexicon` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '时间描述', '0');
+INSERT INTO `kl_lexicon` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '症状指标', '1');
+INSERT INTO `kl_lexicon` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医用耗材', '0');
+INSERT INTO `kl_lexicon` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '程度量词', '0');
+INSERT INTO `kl_lexicon` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '其他', '1');
+INSERT INTO `kl_lexicon` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '删除', '0');
+INSERT INTO `kl_lexicon` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '化验公表项', '1');
+INSERT INTO `kl_lexicon` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '科室', '0');
+INSERT INTO `kl_lexicon` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '量表', '0');
+INSERT INTO `kl_lexicon` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '不良反应', '1');
+INSERT INTO `kl_lexicon` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '核心指标', '1');
+INSERT INTO `kl_lexicon` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '疾病类型(慢病|急诊)', '1');
+INSERT INTO `kl_lexicon` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '部位区域', '1');
+INSERT INTO `kl_lexicon` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '药品化学名', '1');
+INSERT INTO `kl_lexicon` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '药品商品名', '1');
+INSERT INTO `kl_lexicon` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '既往疾病史', '1');
+INSERT INTO `kl_lexicon` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '外伤史', '1');
+INSERT INTO `kl_lexicon` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '手术史', '1');
+INSERT INTO `kl_lexicon` VALUES ('58', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '输血史', '1');
+INSERT INTO `kl_lexicon` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '传染病史', '1');
+INSERT INTO `kl_lexicon` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '不良习惯', '1');
+INSERT INTO `kl_lexicon` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '冶游史', '1');
+INSERT INTO `kl_lexicon` VALUES ('62', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '婚育史', '1');
+INSERT INTO `kl_lexicon` VALUES ('63', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '生育史', '1');
+INSERT INTO `kl_lexicon` VALUES ('64', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '家族史', '1');
+INSERT INTO `kl_lexicon` VALUES ('65', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '过敏史', '1');
+INSERT INTO `kl_lexicon` VALUES ('66', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '药物过敏史', '1');
+INSERT INTO `kl_lexicon` VALUES ('67', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '家族相关传染病史', '1');
+INSERT INTO `kl_lexicon` VALUES ('68', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '复诊', '0');
+INSERT INTO `kl_lexicon` VALUES ('69', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '诊断依据条件', '0');
+INSERT INTO `kl_lexicon` VALUES ('70', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '诊断依据其他', '1');
+INSERT INTO `kl_lexicon` VALUES ('71', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '辅检根目录', '0');
+INSERT INTO `kl_lexicon` VALUES ('72', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '诊疗指南(门诊)', '0');
+INSERT INTO `kl_lexicon` VALUES ('73', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '诊疗指南(住院)', '0');
+INSERT INTO `kl_lexicon` VALUES ('74', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '护理', '0');
+INSERT INTO `kl_lexicon` VALUES ('75', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '临床路径', '0');
+INSERT INTO `kl_lexicon` VALUES ('76', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血液', '0');
+INSERT INTO `kl_lexicon` VALUES ('77', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '麻醉', '0');
+INSERT INTO `kl_lexicon` VALUES ('78', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '监护', '0');
+INSERT INTO `kl_lexicon` VALUES ('79', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '中医', '0');
+INSERT INTO `kl_lexicon` VALUES ('80', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '入科流程', '0');
+INSERT INTO `kl_lexicon` VALUES ('81', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '审查规则', '0');
+INSERT INTO `kl_lexicon` VALUES ('82', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '电子书', '0');
+INSERT INTO `kl_lexicon` VALUES ('83', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '视频', '0');

+ 2 - 2
knowledgeman-service/src/main/java/com/diagbot/config/MultipartConfigurer.java

@@ -25,9 +25,9 @@ public class MultipartConfigurer {
         //  上传文件临时文件夹
         factory.setLocation(System.getProperty("/data/tmp"));
         //  单个数据大小
-        factory.setMaxFileSize(DataSize.ofMegabytes(500));
+        factory.setMaxFileSize(DataSize.ofMegabytes(600));
         /// 总上传数据大小
-        factory.setMaxRequestSize(DataSize.ofMegabytes(500));
+        factory.setMaxRequestSize(DataSize.ofMegabytes(600));
         return factory.createMultipartConfig();
     }
 }

+ 1 - 0
knowledgeman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -32,6 +32,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/concept/getConceptPacInfos").permitAll()
                 .antMatchers("/concept/piyinUp").permitAll()
                 .antMatchers("/file/uploadImage").permitAll()
+                .antMatchers("/file/deleteRemoteFile").permitAll()
                 .antMatchers("/reload/createFile").permitAll()
                 .antMatchers("/dictionaryInfo/getList").permitAll()
                 .antMatchers("/commonconcept/getConceptMapByNameAndType").permitAll()

+ 1 - 0
knowledgeman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -95,6 +95,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/concept/getConceptPacInfos", request)
                 || matchers("/concept/piyinUp", request)
                 || matchers("/file/uploadImage", request)
+                || matchers("/file/deleteRemoteFile", request)
                 || matchers("/reload/createFile", request)
                 || matchers("/dictionaryInfo/getList", request)
                 || matchers("/commonconcept/getConceptMapByNameAndType", request)

+ 1 - 0
knowledgeman-service/src/main/java/com/diagbot/dto/FileDTO.java

@@ -17,6 +17,7 @@ public class FileDTO {
     private String url;
     private String md5;
     private String info;
+    private String size;
 
     public FileDTO(String state, String info) {
         this.state = state;

+ 13 - 1
knowledgeman-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java

@@ -80,7 +80,19 @@ public enum LexiconTypeEnum implements KeyedNamed {
     FURTHER_CONSULTATION(68, "复诊"),
     DIAGNOSTIC_CRITERIA(69, "诊断依据条件"),
     OTHER_DIAGNOSTIC_CRITERIA(70, "诊断依据其他"),
-    PACS_ROOT_DIRECTORY(71,"辅检根目录");
+    PACS_ROOT_DIRECTORY(71,"辅检根目录"),
+    // GUIDELINES_OUTPATIENT(72,"诊疗指南(门诊)"),
+    // GUIDELINES_HOS(73,"诊疗指南(住院)"),
+    NURSE(74,"护理"),
+    CLINICAL_PATHWAY(75,"临床路径"),
+    BLOOD(76,"血液"),
+    ANESTHESIA(77,"麻醉"),
+    TUTELAGE(78,"监护"),
+    TCM(79,"中医"),
+    THE_DIVISION_PROCESS(80,"入科流程"),
+    CENSORSHIP_RULES(81,"审查规则"),
+    E_BOOK (82,"电子书"),
+    VIDEO(83,"视频");
 
     @Setter
     private int key;

+ 9 - 1
knowledgeman-service/src/main/java/com/diagbot/service/impl/EnumsDataServiceImpl.java

@@ -55,7 +55,15 @@ public class EnumsDataServiceImpl implements EnumsDataService {
                         LexiconTypeEnum.DIAGNOSIS, LexiconTypeEnum.LIS_TABLES,
                         LexiconTypeEnum.PACS_ITEMS, LexiconTypeEnum.DRUGS,
                         LexiconTypeEnum.SIDE_EFFECTS, LexiconTypeEnum.SYMPTOM,
-                        LexiconTypeEnum.OPERATION)
+                        LexiconTypeEnum.OPERATION,
+                        // LexiconTypeEnum.GUIDELINES_OUTPATIENT,
+                        // LexiconTypeEnum.GUIDELINES_HOS,
+                        LexiconTypeEnum.NURSE,
+                        LexiconTypeEnum.CLINICAL_PATHWAY, LexiconTypeEnum.BLOOD,
+                        LexiconTypeEnum.ANESTHESIA, LexiconTypeEnum.TUTELAGE,
+                        LexiconTypeEnum.TCM, LexiconTypeEnum.THE_DIVISION_PROCESS,
+                        LexiconTypeEnum.CENSORSHIP_RULES, LexiconTypeEnum.E_BOOK,
+                        LexiconTypeEnum.VIDEO)
                 .addEnums("conceptDetailLisPacsOnlyEnum",
                         LexiconTypeEnum.LIS_TABLES, LexiconTypeEnum.PACS_ITEMS)
                 .addEnums("relationModelTypeEnum", RelationModelTypeEnum.values())

+ 29 - 4
knowledgeman-service/src/main/java/com/diagbot/service/impl/UploadServiceImpl.java

@@ -15,10 +15,14 @@ import okhttp3.Request;
 import okhttp3.RequestBody;
 import okhttp3.Response;
 import okhttp3.ResponseBody;
+import org.apache.http.params.CoreConnectionPNames;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.math.BigDecimal;
+import java.util.concurrent.TimeUnit;
+
 /**
  * @Description: 文件上传服务接口实现
  * @author: gaodm
@@ -35,14 +39,17 @@ public class UploadServiceImpl implements UploadService {
         if (file.isEmpty()) {
             return new FileDTO("FAILURE", "文件不能为空");
         }
-        //文件大小上限1M
-        if (file.getSize() > 1024 * 1024) {
-            return new FileDTO("FAILURE", "文件上传失败,超出大小限制1MB");
+        //文件大小上限500M
+        if (file.getSize() > 1024 * 1024 * 500) {
+            return new FileDTO("FAILURE", "文件上传失败,超出大小限制500MB");
         }
 
         String result = "";
         try {
-            OkHttpClient httpClient = new OkHttpClient();
+            OkHttpClient httpClient = new OkHttpClient.Builder()
+                    .connectTimeout(500, TimeUnit.SECONDS)
+                    .readTimeout(500, TimeUnit.SECONDS)
+                    .build();
             MultipartBody multipartBody = new MultipartBody.Builder().
                     setType(MultipartBody.FORM)
                     .addFormDataPart("file", file.getOriginalFilename(),
@@ -80,6 +87,9 @@ public class UploadServiceImpl implements UploadService {
         fileDTO.setMd5(fileUploadDTO.getMd5());
         fileDTO.setOriginal(file.getOriginalFilename());
         fileDTO.setTitle(file.getOriginalFilename());
+        BigDecimal bg = new BigDecimal(file.getSize() / (1.0 * 1024 * 1024));
+        double d = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+        fileDTO.setSize(d + "M");
         return fileDTO;
     }
 
@@ -126,4 +136,19 @@ public class UploadServiceImpl implements UploadService {
         }
         return new FileDTO("SUCCESS", "文件删除成功");
     }
+
+    public static void main(String[] args) {
+        long size = 1023 * 33;
+
+        BigDecimal bg = new BigDecimal(size/ (1.0 * 1024 * 1024));
+        double d3 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+        System.out.println(d3);
+
+
+
+        if (size < 1024 * 1024) {
+            System.out.println(size / (1.0 * 1024) + "KB");
+        }
+        System.out.println(size / (1.0 * 1024 * 1024) + "M");
+    }
 }