|
@@ -64,6 +64,8 @@
|
|
|
|
|
|
<!-- 静态知识检索分页返回 -->
|
|
<!-- 静态知识检索分页返回 -->
|
|
<select id="staticIndexPage" resultType="com.diagbot.dto.StaticKnowledgeIndexPageDTO">
|
|
<select id="staticIndexPage" resultType="com.diagbot.dto.StaticKnowledgeIndexPageDTO">
|
|
|
|
+ <if test="(staticKnowledgeIndexPageVO.typeIds != null and !staticKnowledgeIndexPageVO.typeIds.contains(411) and staticKnowledgeIndexPageVO.typeIds.size > 0)
|
|
|
|
+ ||(staticKnowledgeIndexPageVO.typeIds != null and staticKnowledgeIndexPageVO.typeIds.contains(411) and staticKnowledgeIndexPageVO.typeIds.size > 1)">
|
|
SELECT
|
|
SELECT
|
|
f.*
|
|
f.*
|
|
FROM
|
|
FROM
|
|
@@ -552,6 +554,153 @@
|
|
LIMIT 1000
|
|
LIMIT 1000
|
|
)f
|
|
)f
|
|
GROUP BY f.id
|
|
GROUP BY f.id
|
|
|
|
+ </if>
|
|
|
|
+ <if test="staticKnowledgeIndexPageVO.typeIds.contains(411) ">
|
|
|
|
+ <if test="staticKnowledgeIndexPageVO.typeIds.size > 1">
|
|
|
|
+ UNION
|
|
|
|
+ </if>
|
|
|
|
+ SELECT
|
|
|
|
+ f.*
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ s.moduleNo,
|
|
|
|
+ s.id,
|
|
|
|
+ s.name,
|
|
|
|
+ s.retrievalName,
|
|
|
|
+ s.isConcept,
|
|
|
|
+ s.type,
|
|
|
|
+ s.typeName,
|
|
|
|
+ s.code,
|
|
|
|
+ s1.concept_id AS conceptId,
|
|
|
|
+ null AS clinicalPathwayName,
|
|
|
|
+ null AS noticeName,
|
|
|
|
+ s1.`status` AS status
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ t.moduleNo,
|
|
|
|
+ t.id,
|
|
|
|
+ t.NAME,
|
|
|
|
+ IF ( t.isConcept = 0, t.retrievalName, '' ) AS retrievalName,
|
|
|
|
+ t.isConcept,
|
|
|
|
+ t.type,
|
|
|
|
+ t.typeName,
|
|
|
|
+ t1.icd10_code AS code
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ concat( '1', b.lib_type ) AS moduleNo,
|
|
|
|
+ a.NAME AS retrievalName,
|
|
|
|
+ a.spell AS spell,
|
|
|
|
+ a.is_concept AS isConcept,
|
|
|
|
+ b.id AS id,
|
|
|
|
+ b.lib_name AS NAME,
|
|
|
|
+ b.lib_type AS type,
|
|
|
|
+ c.NAME AS typeName
|
|
|
|
+ FROM
|
|
|
|
+ kl_library_info a,
|
|
|
|
+ kl_concept b,
|
|
|
|
+ kl_lexicon c
|
|
|
|
+ WHERE
|
|
|
|
+ a.is_deleted = 'N'
|
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
|
+ AND a.concept_id = b.id
|
|
|
|
+ AND b.lib_type = c.code
|
|
|
|
+ AND b.`status` = 1
|
|
|
|
+ AND a.type_id = 411
|
|
|
|
+ <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
|
|
|
|
+ AND ( a.name LIKE concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
|
|
|
|
+ concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ ) t left join kl_disease t1 on t.id = t1.concept_id and t1.is_deleted='N'
|
|
|
|
+ UNION
|
|
|
|
+ SELECT
|
|
|
|
+ t.moduleNo,
|
|
|
|
+ t.id,
|
|
|
|
+ t.NAME,
|
|
|
|
+ IF ( t.isConcept = 0, t.retrievalName, '' ) AS retrievalName,
|
|
|
|
+ t.isConcept,
|
|
|
|
+ t.type,
|
|
|
|
+ t.typeName,
|
|
|
|
+ t1.icd10_code AS code
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ concat( '2', b.lib_type ) AS moduleNo,
|
|
|
|
+ a.NAME AS retrievalName,
|
|
|
|
+ a.spell AS spell,
|
|
|
|
+ a.is_concept AS isConcept,
|
|
|
|
+ b.id AS id,
|
|
|
|
+ b.lib_name AS NAME,
|
|
|
|
+ b.lib_type AS type,
|
|
|
|
+ c.NAME AS typeName
|
|
|
|
+ FROM
|
|
|
|
+ kl_library_info a,
|
|
|
|
+ kl_concept b,
|
|
|
|
+ kl_lexicon c
|
|
|
|
+ WHERE
|
|
|
|
+ a.is_deleted = 'N'
|
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
|
+ AND a.concept_id = b.id
|
|
|
|
+ AND b.lib_type = c.code
|
|
|
|
+ AND b.`status` = 1
|
|
|
|
+ <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
|
|
|
|
+ AND ( a.name LIKE concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
|
|
|
|
+ concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ ) t left join kl_disease t1 on t.id = t1.concept_id and t1.is_deleted='N'
|
|
|
|
+ UNION
|
|
|
|
+ SELECT
|
|
|
|
+ t.moduleNo,
|
|
|
|
+ t.id,
|
|
|
|
+ t.NAME,
|
|
|
|
+ IF ( t.isConcept = 0, t.retrievalName, '' ) AS retrievalName,
|
|
|
|
+ t.isConcept,
|
|
|
|
+ t.type,
|
|
|
|
+ t.typeName,
|
|
|
|
+ t1.icd10_code AS code
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ concat( '3', b.lib_type ) AS moduleNo,
|
|
|
|
+ a.NAME AS retrievalName,
|
|
|
|
+ a.spell AS spell,
|
|
|
|
+ a.is_concept AS isConcept,
|
|
|
|
+ b.id AS id,
|
|
|
|
+ b.lib_name AS NAME,
|
|
|
|
+ b.lib_type AS type,
|
|
|
|
+ c.NAME AS typeName
|
|
|
|
+ FROM
|
|
|
|
+ kl_library_info a,
|
|
|
|
+ kl_concept b,
|
|
|
|
+ kl_lexicon c
|
|
|
|
+ WHERE
|
|
|
|
+ a.is_deleted = 'N'
|
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
|
+ AND a.concept_id = b.id
|
|
|
|
+ AND b.lib_type = c.code
|
|
|
|
+ AND b.`status` = 1
|
|
|
|
+ <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
|
|
|
|
+ AND ( a.name LIKE concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
|
|
|
|
+ concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ ) t left join kl_disease t1 on t.id = t1.concept_id and t1.is_deleted='N'
|
|
|
|
+ ) s,
|
|
|
|
+ kl_classic_case s1
|
|
|
|
+ WHERE s.id = s1.concept_id
|
|
|
|
+ AND s1.is_deleted = 'N'
|
|
|
|
+ AND s1.status = 1
|
|
|
|
+ ORDER BY s.type ASC,
|
|
|
|
+ s.moduleNo ASC,
|
|
|
|
+ s.isConcept DESC
|
|
|
|
+ LIMIT 1000
|
|
|
|
+ )f
|
|
|
|
+ GROUP BY f.id
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getKlScaleInfoPage" resultType="com.diagbot.dto.KlScaleInfoDTO">
|
|
<select id="getKlScaleInfoPage" resultType="com.diagbot.dto.KlScaleInfoDTO">
|