Browse Source

检索,其他史修改

wangyu 6 years ago
parent
commit
e9069d156d

+ 24 - 3
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -214,12 +214,33 @@ public class ConceptFacade extends ConceptServiceImpl {
      * @return
      */
     public List<ConceptRetrievalDTO> retrivelConceptInfo(RetrievalVO retrievalVO){
-        List<Integer> typeList = new ArrayList<>();
+        Boolean bla = true;
         if (null != retrievalVO.getType()){
-            if(retrievalVO.getType().intValue() == ConceptTypeEnum.Lis.getKey()){
+            if(retrievalVO.getType().intValue() == ConceptTypeEnum.Lis.getKey()){//如果是化验,添加化验子项类型
                 retrievalVO.setDetilType(LexiconTypeEnum.LIS_DETAILS.getKey());
+                bla = true;
+            }else if(retrievalVO.getType().intValue() == ConceptTypeEnum.Past.getKey()
+                    || retrievalVO.getType().intValue() == ConceptTypeEnum.Other.getKey()){//如果是其他史设置其他史类型
+                List<Integer> typeList = new ArrayList<>();
+                typeList.add(LexiconTypeEnum.HISTORY_OF_PAST_DISEASES.getKey());
+                typeList.add(LexiconTypeEnum.HISTORY_OF_TRAUMA.getKey());
+                typeList.add(LexiconTypeEnum.HISTORY_OF_SURGERY.getKey());
+                typeList.add(LexiconTypeEnum.HISTORY_OF_BLOOD_TRANSFUSION.getKey());
+                typeList.add(LexiconTypeEnum.INFECTIOUS_DISEASE_HISTORY.getKey());
+                typeList.add(LexiconTypeEnum.BAD_HABITS.getKey());
+                typeList.add(LexiconTypeEnum.MARITAL_HISTORY.getKey());
+                typeList.add(LexiconTypeEnum.HISTORY_OF_MARRIAGE_AND_CHILDBEARING.getKey());
+                typeList.add(LexiconTypeEnum.BIRTH_HISTORY.getKey());
+                typeList.add(LexiconTypeEnum.FAMILY_HISTORY.getKey());
+                typeList.add(LexiconTypeEnum.FOOD_ALLERGY_HISTORY.getKey());
+                typeList.add(LexiconTypeEnum.HISTORY_OF_DRUG_ALLERGY.getKey());
+                typeList.add(LexiconTypeEnum.FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY.getKey());
+                retrievalVO.setOtherType(typeList);
+                bla = false;
+            }
+            if(bla){
+                retrievalVO.setType(ParamConvertUtil.conceptConvert2Lib(retrievalVO.getType()));
             }
-            retrievalVO.setType(ParamConvertUtil.conceptConvert2Lib(retrievalVO.getType()));
         }
         List<ConceptRetrievalDTO> conceptRetrievalDTOS = this.retrievalConcept(retrievalVO);
         List<ConceptRetrievalDTO> res = new ArrayList<>();

+ 2 - 0
aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -23,4 +23,6 @@ public class RetrievalVO {
     private List<Long> inputIds;
     //获取子项时需要用到的type类型
     private Integer detilType;
+    //类型为其他史时用到的type类型
+    private List<Integer> otherType;
 }

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

@@ -199,6 +199,12 @@
         <if test="type != null">
             AND t1.lib_type = #{type}
         </if>
+        <if test="otherType != null and otherType.size > 0">
+            and t1.lib_type in
+            <foreach item="type" collection="otherType" open="(" separator="," close=")">
+                #{type}
+            </foreach>
+        </if>
         <if test="sexType == 3">
             and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
         </if>
@@ -230,6 +236,12 @@
         <if test="type != null">
             AND t1.lib_type = #{type}
         </if>
+        <if test="otherType != null and otherType.size > 0">
+            and t1.lib_type in
+            <foreach item="type" collection="otherType" open="(" separator="," close=")">
+                #{type}
+            </foreach>
+        </if>
         <if test="sexType == 3">
             and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
         </if>
@@ -261,6 +273,12 @@
         <if test="type != null">
             AND t1.lib_type = #{type}
         </if>
+        <if test="otherType != null and otherType.size > 0">
+            and t1.lib_type in
+            <foreach item="type" collection="otherType" open="(" separator="," close=")">
+                #{type}
+            </foreach>
+        </if>
         <if test="sexType == 3">
             and (t3.sex_type in ('1','2','3') or t3.sex_type is null)
         </if>