Selaa lähdekoodia

1、术语检索

zhaops 3 vuotta sitten
vanhempi
commit
5bcf367054

+ 9 - 1
src/main/java/com/diagbot/facade/MedRetrievalFacade.java

@@ -59,7 +59,7 @@ public class MedRetrievalFacade {
         List<IndexDTO> indexList = Lists.newLinkedList();
 
         /**
-         * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉、15-药品剂型、16-给药途径
+         * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉、15-药品剂型、16-给药途径、17-物理治疗
          */
 
         switch (retrievalVO.getType()) {
@@ -214,6 +214,14 @@ public class MedRetrievalFacade {
                     retrievalDTO.setNameList(BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class));
                 }
                 break;
+            case 17:
+                medRetrievalVO.setTypeId(LexiconEnum.Physicotherapy.getKey());
+                medRetrievalVO.getTypeIds().add(LexiconEnum.Physicotherapy.getKey());
+                indexList = klConceptFacade.index(medRetrievalVO);
+                if (ListUtil.isNotEmpty(indexList)) {
+                    retrievalDTO.setNameList(BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class));
+                }
+                break;
         }
         return retrievalDTO;
     }

+ 6 - 0
src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -6,6 +6,7 @@ import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.util.List;
 
 /**
  * @Description:
@@ -43,4 +44,9 @@ public class RetrievalVO {
      * 默认展示 0:不展示,1:展示全部
      */
     private Integer defaultList = 0;
+
+    /**
+     * 排除项标准术语id
+     */
+    private List<Long> notInIds;
 }

+ 2 - 1
src/main/java/com/diagbot/web/RetrievalController.java

@@ -42,9 +42,10 @@ public class RetrievalController {
 
 
     @ApiOperation(value = "术语检索[zhaops]",
-            notes = "type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉、15-药品剂型、16-给药途径 <br>" +
+            notes = "type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉、15-药品剂型、16-给药途径、17-物理治疗 <br>" +
                     "inputStr: 检索内容<br>" +
                     "defaultList: 默认展示 0:不展示,1:展示全部<br>" +
+                    "notInIds: 排除项标准术语id<br>" +
                     "sex: 性别:1-男、2-女、3-通用 <br>" +
                     "age: 年龄<br>")
     @PostMapping("/index")

+ 15 - 0
src/main/resources/mapper/KlConceptMapper.xml

@@ -108,6 +108,11 @@
                 a.type_id =#{typeId}
             </foreach>
         </if>
+        <if test="notInIds != null and notInIds.size > 0">
+            <foreach item="notInId" collection="notInIds" open="and(" separator="and" close=")">
+                b.id != #{notInId}
+            </foreach>
+        </if>
         UNION
         SELECT DISTINCT
         b.id,
@@ -174,6 +179,11 @@
                 a.type_id =#{typeId}
             </foreach>
         </if>
+        <if test="notInIds != null and notInIds.size > 0">
+            <foreach item="notInId" collection="notInIds" open="and(" separator="and" close=")">
+                b.id != #{notInId}
+            </foreach>
+        </if>
         UNION
         SELECT DISTINCT
         b.id,
@@ -240,6 +250,11 @@
                 a.type_id =#{typeId}
             </foreach>
         </if>
+        <if test="notInIds != null and notInIds.size > 0">
+            <foreach item="notInId" collection="notInIds" open="and(" separator="and" close=")">
+                b.id != #{notInId}
+            </foreach>
+        </if>
         ) t
         <if test="typeId!=null and typeId==108">
             LEFT JOIN kl_lis t1 ON t.id = t1.concept_id