gaodm преди 6 години
родител
ревизия
5cd04de732

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

@@ -13,6 +13,7 @@ import java.util.List;
 @Getter
 @Setter
 public class ConceptIntroduceDTO {
+    private Long conceptId;
     private String name;
     private List<ConceptDetailDTO> details;
 }

+ 6 - 5
aipt-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -49,16 +49,17 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
         }
 
         QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
-        conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
-                eq("concept_id", concept.getId()).
-                apply("find_in_set({0},position)", conceptIntroduceVO.getPosition()).
-                orderByAsc("order_no");
+        conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("concept_id", concept.getId())
+                .apply("find_in_set({0},position)", conceptIntroduceVO.getPosition())
+                .orderByAsc("order_no");
         List<ConceptDetail> conceptDetailList = this.list(conceptDetailQueryWrapper);
-        List<ConceptDetailDTO> conceptDetailDTOList = Lists.newLinkedList();
+        List<ConceptDetailDTO> conceptDetailDTOList = ListUtil.newArrayList();
         if (ListUtil.isNotEmpty(conceptDetailList)) {
             conceptDetailDTOList = BeanUtil.listCopyTo(conceptDetailList, ConceptDetailDTO.class);
         }
         ConceptIntroduceDTO conceptIntroduceDTO = new ConceptIntroduceDTO();
+        conceptIntroduceDTO.setConceptId(concept.getId());
         conceptIntroduceDTO.setName(concept.getLibName());
         conceptIntroduceDTO.setDetails(conceptDetailDTOList);
         return conceptIntroduceDTO;

+ 1 - 1
aipt-service/src/main/java/com/diagbot/web/ConceptDetailController.java

@@ -32,7 +32,7 @@ public class ConceptDetailController {
     @ApiOperation(value = "获取提示信息[by:zhaops]", notes = "")
     @PostMapping("/getConceptDetail")
     @SysLogger("getConceptDetail")
-    public RespDTO<ConceptIntroduceDTO> processData(@Valid @RequestBody ConceptIntroduceVO conceptIntroduceVO) {
+    public RespDTO<ConceptIntroduceDTO> getConceptDetail(@Valid @RequestBody ConceptIntroduceVO conceptIntroduceVO) {
         ConceptIntroduceDTO data = conceptDetailFacade.getConceptDetail(conceptIntroduceVO);
         return RespDTO.onSuc(data);
     }

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

@@ -13,6 +13,7 @@ import java.util.List;
 @Getter
 @Setter
 public class ConceptIntroduceDTO {
+    private Long conceptId;
     private String name;
     private List<ConceptDetailDTO> details;
 }

+ 2 - 1
icss-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
+import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.ConceptIntroduceVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -21,7 +22,7 @@ public class ConceptDetailFacade {
 
     public ConceptIntroduceDTO getConceptDetail(ConceptIntroduceVO conceptIntroduceVO) {
         RespDTO<ConceptIntroduceDTO> res = aiptServiceClient.getConceptDetail(conceptIntroduceVO);
-        if (res == null || res.data == null) {
+        if (RespDTOUtil.respIsNG(res)) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "获取提示信息失败");
         }
 

+ 5 - 2
icss-service/src/main/java/com/diagbot/web/ConceptDetailController.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.ConceptDetailFacade;
 import com.diagbot.vo.ConceptIntroduceVO;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -25,14 +26,16 @@ import javax.validation.Valid;
  */
 @RestController
 @RequestMapping("/conceptDetail")
+@Api(value = "提示信息相关API", tags = { "知识库标准化-提示信息相关API" })
+@SuppressWarnings("unchecked")
 public class ConceptDetailController {
     @Autowired
     private ConceptDetailFacade conceptDetailFacade;
 
-    @ApiOperation(value = "获取提示信息[by:zhaops]", notes = "")
+    @ApiOperation(value = "知识库标准化-获取提示信息[by:zhaops]", notes = "")
     @PostMapping("/getConceptDetail")
     @SysLogger("getConceptDetail")
-    public RespDTO<ConceptIntroduceDTO> processData(@Valid @RequestBody ConceptIntroduceVO conceptIntroduceVO) {
+    public RespDTO<ConceptIntroduceDTO> getConceptDetail(@Valid @RequestBody ConceptIntroduceVO conceptIntroduceVO) {
         ConceptIntroduceDTO data = conceptDetailFacade.getConceptDetail(conceptIntroduceVO);
         return RespDTO.onSuc(data);
     }

+ 66 - 0
knowledgeman-service/src/main/java/com/diagbot/enums/LexiconRSTypeEnum.java

@@ -0,0 +1,66 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description: 术语关系分类枚举
+ * @author: gaodm
+ * @time: 2019/5/6 13:58
+ */
+public enum LexiconRSTypeEnum implements KeyedNamed {
+    IS_A(1,"是"),
+    EQUAL_TO(2,"同义于"),
+    BELONG_TO(3,"属于"),
+    ASSOCIATED_WITH(4,"与相关"),
+    CAUSE(5,"引起"),
+    LOCATED_AT(6,"位于"),
+    AKA(7,"别名"),
+    INSURE_LEVEL(8,"医保"),
+    APPLIED_TO(9,"适用于"),
+    PREFERRED_MEDS(10,"首选药物"),
+    TREAT(11,"治疗"),
+    USAGE(12,"用法"),
+    REACTION(13,"不良反应"),
+    DO_AND_DONOT(14,"注意事项"),
+    SPEC(15,"规格"),
+    HAS(16,"有"),
+    ORDER_BY(17,"包含排列于"),
+    SUBITEM(18,"属于子项");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    LexiconRSTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static LexiconRSTypeEnum getEnum(Integer key) {
+        for (LexiconRSTypeEnum item : LexiconRSTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        LexiconRSTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+

+ 99 - 0
knowledgeman-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java

@@ -0,0 +1,99 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description: 术语分类枚举
+ * @author: gaodm
+ * @time: 2019/5/6 13:58
+ */
+public enum LexiconTypeEnum implements KeyedNamed {
+    SYMPTOM(1,"症状"),
+    TIME(2,"时间"),
+    BODYPART(3,"部位"),
+    NATURE(4,"性质"),
+    CAUSE(5,"诱因"),
+    DEGREE(6,"程度"),
+    NEGATIVE(7,"阴性"),
+    POSITIVE(8,"阳性"),
+    COMPANY(9,"单位"),
+    DRUGS(10,"药品"),
+    TREATMENT(11,"治疗"),
+    LIS_PACKAGE(12,"化验套餐"),
+    LIS_DETAILS(13,"化验明细"),
+    LIS_RESULTS(14,"化验结果"),
+    PACS_PACKAGE(15,"辅检套餐"),
+    PACS_ITEMS(16,"辅检项目"),
+    PACS_RESULTS(17,"辅检结果"),
+    DIAGNOSIS(18,"诊断"),
+    CONNECTIVES(19,"连接词"),
+    POSITION(20,"方位"),
+    RELATIVES(21,"亲属"),
+    MARRIAGE(22,"婚姻"),
+    FOOD(23,"食品"),
+    HISTORY(24,"历史"),
+    OPERATION(25,"手术"),
+    SYMPTOM_MANIFESTATION(26,"症状表现"),
+    DIGITAL_QUANTIFIER(27,"数字量词"),
+    NUMBER(28,"数字"),
+    DRUG_CATEGORY_BIG(29,"药品大类"),
+    DRUG_CATEGORY_SMALL(30,"药品小类"),
+    PACS_CATEGORY_BIG(31,"辅检大类"),
+    PACS_CATEGORY_SMALL(32,"辅检小类"),
+    VITAL_INDEX(33,"体征指标"),
+    VITAL_INDEX_VALUE(34,"体征指标值"),
+    VITAL_RESULT(35,"体征结果"),
+    PLACE(36,"地点"),
+    OCCUPATION(37,"职业"),
+    PERSONAL_HISTORY(38,"个人史"),
+    PERSONAL_HISTORY_DESCRIPTION(39,"个人史描述"),
+    TIME_DESCRIPTION(40,"时间描述"),
+    SYMPTOM_INDEX(41,"症状指标"),
+    MEDICAL_SUPPLIES(42,"医用耗材 "),
+    DEGREE_CLASSIFIER(43,"程度量词"),
+    OTHER(44,"其他"),
+    DELETE(45,"删除"),
+    LIS_TABLES(46,"化验公表项"),
+    DEPARTMENT(47,"科室"),
+    GAUGE(48,"量表"),
+    SIDE_EFFECTS(49,"不良反应"),
+    CORE_INDICATORS(50,"核心指标"),
+    TYPES_OF_DISEASE(51,"疾病类型(慢病|急诊)");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    LexiconTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static LexiconTypeEnum getEnum(Integer key) {
+        for (LexiconTypeEnum item : LexiconTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        LexiconTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+