Browse Source

Merge branch 'dev/mapping20210603' of http://192.168.2.236:10080/zhoutg/cdss-core into dev/mapping20210603

zhaops 4 years ago
parent
commit
50215dcba0

+ 1 - 0
src/main/java/com/diagbot/dto/AnesthesiaInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class AnesthesiaInfoDTO {
+    private Long id;
     /**
      * 麻醉名称
      */

+ 1 - 0
src/main/java/com/diagbot/dto/DiseaseInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class DiseaseInfoDTO {
+    private Long id;
     /**
      * 疾病名称
      */

+ 1 - 0
src/main/java/com/diagbot/dto/DrugInfoDTO.java

@@ -13,6 +13,7 @@ import java.util.List;
 @Getter
 @Setter
 public class DrugInfoDTO {
+    private Long id;
     /**
      * 药品名称
      */

+ 1 - 0
src/main/java/com/diagbot/dto/LisDetailDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class LisDetailDTO {
+    private Long id;
     /**
      * 大项(套餐)
      */

+ 1 - 0
src/main/java/com/diagbot/dto/NurseInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class NurseInfoDTO {
+    private Long id;
     /**
      * 护理名称
      */

+ 3 - 0
src/main/java/com/diagbot/dto/OperationInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class OperationInfoDTO {
+    private Long id;
     /**
      * 手术或操作名称
      */
@@ -19,4 +20,6 @@ public class OperationInfoDTO {
      * 类型:手术、操作
      */
     private String type;
+
+    private String code;
 }

+ 17 - 0
src/main/java/com/diagbot/dto/RetrievalConceptDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-06-10 14:46
+ */
+@Setter
+@Getter
+public class RetrievalConceptDTO {
+    private Long id;
+    private String name;
+}

+ 11 - 6
src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -16,7 +16,7 @@ public class RetrievalDTO {
     /**
      * 化验大项
      */
-    private List<String> lisNames;
+    private List<RetrievalConceptDTO> lisNames;
     /**
      * 化验小项
      */
@@ -24,7 +24,7 @@ public class RetrievalDTO {
     /**
      * 辅检
      */
-    private List<String> pacsNames;
+    private List<RetrievalConceptDTO> pacsNames;
     /**
      * 诊断
      */
@@ -40,19 +40,19 @@ public class RetrievalDTO {
     /**
      * 科室
      */
-    private List<String> deptNames;
+    private List<RetrievalConceptDTO> deptNames;
     /**
      * 输血
      */
-    private List<String> transfusionNames;
+    private List<RetrievalConceptDTO> transfusionNames;
     /**
      * 症状
      */
-    private List<String> symptomNames;
+    private List<RetrievalConceptDTO> symptomNames;
     /**
      * 体征
      */
-    private List<String> vitalNames;
+    private List<RetrievalConceptDTO> vitalNames;
     /**
      * 量表
      */
@@ -74,4 +74,9 @@ public class RetrievalDTO {
      */
     private List<AnesthesiaInfoDTO> anesthesiaInfonames;
 
+    /**
+     * 药品剂型
+     */
+    private List<RetrievalConceptDTO> drugDosage;
+
 }

+ 1 - 0
src/main/java/com/diagbot/dto/ScaleInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class ScaleInfoDTO {
+    private Long id;
     /**
      * 量表名称
      */

+ 1 - 0
src/main/java/com/diagbot/dto/TcmdiseaseInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class TcmdiseaseInfoDTO {
+    private Long id;
     /**
      * 疾病名称
      */

+ 1 - 0
src/main/java/com/diagbot/dto/TcmsyndromeInfoDTO.java

@@ -11,6 +11,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class TcmsyndromeInfoDTO {
+    private Long id;
     /**
      * 疾病名称
      */

+ 24 - 6
src/main/java/com/diagbot/facade/MedRetrievalFacade.java

@@ -8,6 +8,7 @@ import com.diagbot.dto.IndexDTO;
 import com.diagbot.dto.LisDetailDTO;
 import com.diagbot.dto.NurseInfoDTO;
 import com.diagbot.dto.OperationInfoDTO;
+import com.diagbot.dto.RetrievalConceptDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.ScaleInfoDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
@@ -30,7 +31,6 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 
 /**
  * @Description:
@@ -69,7 +69,9 @@ public class MedRetrievalFacade {
                 medRetrievalVO.getTypeIds().add(LexiconEnum.LisName.getKey());
                 indexList = klConceptFacade.index(medRetrievalVO);
                 if (ListUtil.isNotEmpty(indexList)) {
-                    retrievalDTO.setLisNames(indexList.stream().map(i -> i.getName()).collect(Collectors.toList()));
+                    List<RetrievalConceptDTO> lisNames = new ArrayList<>();
+                    lisNames = BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class);
+                    retrievalDTO.setLisNames(lisNames);
                 }
                 break;
             case 2:
@@ -98,7 +100,9 @@ public class MedRetrievalFacade {
                         LexiconEnum.PacsSubName.getKey() }));
                 indexList = klConceptFacade.index(medRetrievalVO);
                 if (ListUtil.isNotEmpty(indexList)) {
-                    retrievalDTO.setPacsNames(indexList.stream().map(i -> i.getName()).collect(Collectors.toList()));
+                    List<RetrievalConceptDTO> pacsNames = new ArrayList<>();
+                    pacsNames = BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class);
+                    retrievalDTO.setPacsNames(pacsNames);
                 }
                 break;
             case 4:
@@ -130,7 +134,9 @@ public class MedRetrievalFacade {
                 medRetrievalVO.getTypeIds().add(LexiconEnum.Dept.getKey());
                 indexList = klConceptFacade.index(medRetrievalVO);
                 if (ListUtil.isNotEmpty(indexList)) {
-                    retrievalDTO.setDeptNames(indexList.stream().map(i -> i.getName()).collect(Collectors.toList()));
+                    List<RetrievalConceptDTO> deptNames = new ArrayList<>();
+                    deptNames = BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class);
+                    retrievalDTO.setDeptNames(deptNames);
                 }
                 break;
             case 8:
@@ -138,7 +144,9 @@ public class MedRetrievalFacade {
                 medRetrievalVO.getTypeIds().add(LexiconEnum.Transfusion.getKey());
                 indexList = klConceptFacade.index(medRetrievalVO);
                 if (ListUtil.isNotEmpty(indexList)) {
-                    retrievalDTO.setTransfusionNames(indexList.stream().map(i -> i.getName()).collect(Collectors.toList()));
+                    List<RetrievalConceptDTO> transfusionNames = new ArrayList<>();
+                    transfusionNames = BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class);
+                    retrievalDTO.setTransfusionNames(transfusionNames);
                 }
                 break;
             case 9:
@@ -146,7 +154,9 @@ public class MedRetrievalFacade {
                 medRetrievalVO.getTypeIds().add(LexiconEnum.Symptom.getKey());
                 indexList = klConceptFacade.index(medRetrievalVO);
                 if (ListUtil.isNotEmpty(indexList)) {
-                    retrievalDTO.setSymptomNames(indexList.stream().map(i -> i.getName()).collect(Collectors.toList()));
+                    List<RetrievalConceptDTO> symptomNames = new ArrayList<>();
+                    symptomNames = BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class);
+                    retrievalDTO.setSymptomNames(symptomNames);
                 }
                 break;
             case 10:
@@ -189,6 +199,14 @@ public class MedRetrievalFacade {
                     retrievalDTO.setAnesthesiaInfonames(BeanUtil.listCopyTo(indexList, AnesthesiaInfoDTO.class));
                 }
                 break;
+            case 15:
+                medRetrievalVO.setTypeId(LexiconEnum.Form.getKey());
+                medRetrievalVO.getTypeIds().add(LexiconEnum.Form.getKey());
+                indexList = klConceptFacade.index(medRetrievalVO);
+                if (ListUtil.isNotEmpty(indexList)) {
+                    retrievalDTO.setDrugDosage(BeanUtil.listCopyTo(indexList, RetrievalConceptDTO.class));
+                }
+                break;
         }
         return retrievalDTO;
     }

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

@@ -29,6 +29,9 @@
 		<if test="typeId!=null and typeId==128">
 			,t.code as code
 		</if>
+		<if test="typeId!=null and typeId==106">
+			,t.code as code
+		</if>
 		<if test="typeId!=null and typeId==108">
 			,
 			t1.max_value as `maxValue`,
@@ -52,6 +55,9 @@
 		<if test="typeId!=null and typeId==128">
 			,c.code as code
 		</if>
+		<if test="typeId!=null and typeId==106">
+			,c.operation_code as code
+		</if>
 		FROM
 		kl_library_info a,
 		kl_concept b
@@ -70,6 +76,11 @@
 			on c.is_deleted = 'N'
 			and b.id = c.concept_id
 		</if>
+		<if test="typeId!=null and typeId==106">
+			LEFT JOIN `kl_operation` c
+			ON c.is_deleted = 'N'
+			AND b.id = c.concept_id
+		</if>
 		WHERE
 		a.is_deleted = 'N'
 		AND b.is_deleted = 'N'
@@ -87,6 +98,9 @@
 			<if test="typeId!=null and typeId==128">
 				OR LOWER(c.code) = LOWER(#{inputStr})
 			</if>
+			<if test="typeId!=null and typeId==106">
+				OR LOWER(c.operation_code) LIKE LOWER( concat('%',#{inputStr},'%'))
+			</if>
 			)
 		</if>
 		<if test="typeIds != null and typeIds.size > 0">
@@ -107,6 +121,9 @@
 		<if test="typeId!=null and typeId==128">
 			,c.code as code
 		</if>
+		<if test="typeId!=null and typeId==106">
+			,c.operation_code as code
+		</if>
 		FROM
 		kl_library_info a,
 		kl_concept b
@@ -125,6 +142,11 @@
 			on c.is_deleted = 'N'
 			and b.id = c.concept_id
 		</if>
+		<if test="typeId!=null and typeId==106">
+			LEFT JOIN `kl_operation` c
+			ON c.is_deleted = 'N'
+			AND b.id = c.concept_id
+		</if>
 		WHERE
 		a.is_deleted = 'N'
 		AND b.is_deleted = 'N'
@@ -142,6 +164,9 @@
 			<if test="typeId!=null and typeId==128">
 				OR LOWER(c.code) LIKE LOWER(concat(#{inputStr},'%'))
 			</if>
+			<if test="typeId!=null and typeId==106">
+				OR LOWER(c.operation_code) LIKE LOWER( concat('%',#{inputStr},'%'))
+			</if>
 			)
 		</if>
 		<if test="typeIds != null and typeIds.size > 0">
@@ -162,6 +187,9 @@
 		<if test="typeId!=null and typeId==128">
 			,c.code as code
 		</if>
+		<if test="typeId!=null and typeId==106">
+			,c.operation_code as code
+		</if>
 		FROM
 		kl_library_info a,
 		kl_concept b
@@ -180,6 +208,11 @@
 			on c.is_deleted = 'N'
 			and b.id = c.concept_id
 		</if>
+		<if test="typeId!=null and typeId==106">
+			LEFT JOIN `kl_operation` c
+			ON c.is_deleted = 'N'
+			AND b.id = c.concept_id
+		</if>
 		WHERE
 		a.is_deleted = 'N'
 		AND b.is_deleted = 'N'
@@ -197,6 +230,9 @@
 			<if test="typeId!=null and typeId==128">
 				OR LOWER(c.code) LIKE LOWER( concat('%',#{inputStr},'%'))
 			</if>
+			<if test="typeId!=null and typeId==106">
+				OR LOWER(c.operation_code) LIKE LOWER( concat('%',#{inputStr},'%'))
+			</if>
 			)
 		</if>
 		<if test="typeIds != null and typeIds.size > 0">