Browse Source

代码优化

Zhaops 6 years ago
parent
commit
02cd37e95b

+ 1 - 0
aipt-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java

@@ -16,6 +16,7 @@ import java.util.List;
 public class MedicalIndication {
 public class MedicalIndication {
     private Long conceptId;
     private Long conceptId;
     private Integer libType;
     private Integer libType;
+    private Integer type;
     private String name;
     private String name;
     private List<MedicalIndicationDetail> details;
     private List<MedicalIndicationDetail> details;
 }
 }

+ 2 - 0
aipt-service/src/main/java/com/diagbot/client/bean/MedicitionClass.java

@@ -18,8 +18,10 @@ public class MedicitionClass {
     private Long bigdrugsConceptId;//药品分类概念id-大类
     private Long bigdrugsConceptId;//药品分类概念id-大类
     private String bigdrugsName;//药类名
     private String bigdrugsName;//药类名
     private Integer bigdrgusLibType;
     private Integer bigdrgusLibType;
+    private Integer bigdrugsType;
     private Long subdrugsConceptId;//药品分类概念id-小类
     private Long subdrugsConceptId;//药品分类概念id-小类
     private String subdrugsName;//药类名-小类
     private String subdrugsName;//药类名-小类
     private Integer subdrugsLibType;
     private Integer subdrugsLibType;
+    private Integer subdrugsType;
     private LinkedList<Medicition> medicitionsList;
     private LinkedList<Medicition> medicitionsList;
 }
 }

+ 1 - 0
aipt-service/src/main/java/com/diagbot/dto/ConceptPushDTO.java

@@ -14,4 +14,5 @@ public class ConceptPushDTO extends ConceptBaseDTO {
     private Integer libType;
     private Integer libType;
     //数据服务模式调用方名称
     //数据服务模式调用方名称
     private String clientName;
     private String clientName;
+    private Integer type;
 }
 }

+ 4 - 1
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -203,6 +203,8 @@ public class PushFacade {
             ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
             ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
             if (ListUtil.isNotEmpty(medicalIndicationList)) {
             if (ListUtil.isNotEmpty(medicalIndicationList)) {
                 for (MedicalIndication medicalIndication : medicalIndicationList) {
                 for (MedicalIndication medicalIndication : medicalIndicationList) {
+                    medicalIndication.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
+                    medicalIndication.setType(ConceptTypeEnum.Indication.getKey());
                     //关联概念,增加概念id
                     //关联概念,增加概念id
                     conceptBaseVO.setName(medicalIndication.getName());
                     conceptBaseVO.setName(medicalIndication.getName());
                     conceptBaseVO.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
                     conceptBaseVO.setLibType(LexiconTypeEnum.CORE_INDICATORS.getKey());
@@ -297,7 +299,8 @@ public class PushFacade {
         for (String name : nameList) {
         for (String name : nameList) {
             ConceptPushDTO conceptDTO = new ConceptPushDTO();
             ConceptPushDTO conceptDTO = new ConceptPushDTO();
             conceptDTO.setName(name);
             conceptDTO.setName(name);
-            conceptDTO.setLibType(ParamConvertUtil.libConvert2Concept(libType));
+            conceptDTO.setLibType(libType);
+            conceptDTO.setType(ParamConvertUtil.libConvert2Concept(libType));
             if (conceptMap.containsKey(name) && conceptMap.get(name) != null) {
             if (conceptMap.containsKey(name) && conceptMap.get(name) != null) {
                 Concept concept = conceptMap.get(name);
                 Concept concept = conceptMap.get(name);
                 conceptDTO.setConceptId(concept.getId());
                 conceptDTO.setConceptId(concept.getId());

+ 4 - 4
aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -52,7 +52,6 @@ public class TreatmentFacade {
      */
      */
     public Map<String, Object> getTreatment(Map<String, JSONObject> treatmentMap, String diseaseName, Integer disType) {
     public Map<String, Object> getTreatment(Map<String, JSONObject> treatmentMap, String diseaseName, Integer disType) {
         Map<String, Object> retMap = new LinkedHashMap<>();
         Map<String, Object> retMap = new LinkedHashMap<>();
-        QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
         ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
         ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
         conceptBaseVO.setName(diseaseName);
         conceptBaseVO.setName(diseaseName);
         conceptBaseVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
         conceptBaseVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
@@ -113,13 +112,14 @@ public class TreatmentFacade {
             if (cateBigConcept != null) {
             if (cateBigConcept != null) {
                 medicitionClass.setBigdrugsConceptId(cateBigConcept.getId());
                 medicitionClass.setBigdrugsConceptId(cateBigConcept.getId());
             }
             }
-            medicitionClass.setBigdrgusLibType(ConceptTypeEnum.Drug_Category_Big.getKey());
+            medicitionClass.setBigdrgusLibType(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey());
+            medicitionClass.setBigdrugsType(ConceptTypeEnum.Drug_Category_Big.getKey());
             Concept cateSmallConcept = cateSmallConceptMap.get(medicitionClass.getSubdrugsName());
             Concept cateSmallConcept = cateSmallConceptMap.get(medicitionClass.getSubdrugsName());
             if (cateSmallConcept != null) {
             if (cateSmallConcept != null) {
                 medicitionClass.setSubdrugsConceptId(cateSmallConcept.getId());
                 medicitionClass.setSubdrugsConceptId(cateSmallConcept.getId());
             }
             }
-            medicitionClass.setSubdrugsLibType(ConceptTypeEnum.Drug_Category_Small.getKey());
-
+            medicitionClass.setSubdrugsLibType(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey());
+            medicitionClass.setSubdrugsType(ConceptTypeEnum.Drug_Category_Small.getKey());
             if (cateBigConcept != null) {
             if (cateBigConcept != null) {
                 conceptBaseVO.setLibType(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey());
                 conceptBaseVO.setLibType(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey());
                 conceptBaseVO.setName(cateBigConcept.getLibName());
                 conceptBaseVO.setName(cateBigConcept.getLibName());

+ 1 - 0
data-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java

@@ -16,6 +16,7 @@ import java.util.List;
 public class MedicalIndication {
 public class MedicalIndication {
     private Long conceptId;
     private Long conceptId;
     private Integer libType;
     private Integer libType;
+    private Integer type;
     private String name;
     private String name;
     private List<MedicalIndicationDetail> details;
     private List<MedicalIndicationDetail> details;
 }
 }

+ 1 - 0
data-service/src/main/java/com/diagbot/dto/ConceptPushDTO.java

@@ -13,4 +13,5 @@ import lombok.Setter;
 public class ConceptPushDTO extends ConceptBaseDTO {
 public class ConceptPushDTO extends ConceptBaseDTO {
     private Integer libType;  //词性
     private Integer libType;  //词性
     private String clientName;//数据服务模式调用方名称
     private String clientName;//数据服务模式调用方名称
+    private Integer type;
 }
 }

+ 3 - 0
icss-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java

@@ -14,6 +14,9 @@ import java.util.List;
 @Getter
 @Getter
 @Setter
 @Setter
 public class MedicalIndication {
 public class MedicalIndication {
+    private Long conceptId;
+    private Integer libType;
+    private Integer type;
     private String name;
     private String name;
     private List<MedicalIndicationDetail> details;
     private List<MedicalIndicationDetail> details;
 }
 }

+ 1 - 0
icss-service/src/main/java/com/diagbot/dto/ConceptPushDTO.java

@@ -13,4 +13,5 @@ import lombok.Setter;
 public class ConceptPushDTO extends ConceptBaseDTO {
 public class ConceptPushDTO extends ConceptBaseDTO {
     private Integer libType;  //词性
     private Integer libType;  //词性
     private Long id;          //标签id
     private Long id;          //标签id
+    private Integer type;
 }
 }

+ 0 - 19
icss-service/src/main/java/com/diagbot/dto/MedicalIndicationDTO.java

@@ -1,19 +0,0 @@
-package com.diagbot.dto;
-
-import com.diagbot.client.bean.MedicalIndication;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description: 指标推送结果
- * @Author:zhaops
- * @time: 2019/3/14 14:44
- */
-@Getter
-@Setter
-public class MedicalIndicationDTO extends MedicalIndication{
-    private Long id;
-    private String tagName;
-}