Zhaops 6 vuotta sitten
vanhempi
commit
b745265b7f

+ 61 - 0
aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -0,0 +1,61 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/5/7 14:06
+ */
+public enum  ConceptTypeEnum implements KeyedNamed {
+    Symptom(1, "症状"),
+    Past(2, "既往史"),
+    Other(3, "其他史"),
+    Vital(4, "查体"),
+    Lis(5, "化验"),
+    Pacs(6, "辅检"),
+    Disease(7, "诊断"),
+    Drug(8, "药品"),
+    Drug_Category_Big(9, "药品分类-大类"),
+    SIDE_EFFECTS(10, "不良反应"),
+    Drug_Category_Small(11, "药品分类-小类"),
+    Scale(21, "量表"),
+    Indication(22, "指标");
+
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    ConceptTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ConceptTypeEnum getEnum(Integer key) {
+        for (ConceptTypeEnum item : ConceptTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        ConceptTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 58 - 0
aipt-service/src/main/java/com/diagbot/enums/FeatureTypeEnum.java

@@ -0,0 +1,58 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description: 推送类型
+ * @Author:zhaops
+ * @time: 2019/3/14 11:28
+ */
+public enum FeatureTypeEnum implements KeyedNamed {
+    Feature_Type_Symptom(1, "症状"),
+    Feature_Type_Past(1,"既往史"),
+    Feature_Type_Other(3, "其他史"),
+    Feature_Type_Vital(4, "查体"),
+    Feature_Type_Lis(5, "化验"),
+    Feature_Type_Pacs(6, "辅检"),
+    Feature_Type_Disease(7, "诊断"),
+    Feature_Type_Treat(8, "治疗"),
+    Feature_Type_ManagementEvaluation(11, "管理评估"),
+    Feature_Type_Scale(21, "量表"),
+    Feature_Type_Indication(22, "指标");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    FeatureTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static FeatureTypeEnum getEnum(Integer key) {
+        for (FeatureTypeEnum item : FeatureTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        FeatureTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 3 - 2
aipt-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -11,6 +11,7 @@ import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.ConceptDetailServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.ParamConvertUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.ConceptIntroduceVO;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -38,7 +39,7 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
         if (StringUtil.isBlank(conceptIntroduceVO.getName())) {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入概念名称");
         }
-
+        conceptIntroduceVO.setLibType(ParamConvertUtil.conceptConvert2Lib(conceptIntroduceVO.getLibType()));
         //验证存在并且获取概念基本信息
         Concept concept = conceptFacade.exist(conceptIntroduceVO);
 
@@ -59,4 +60,4 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
         conceptIntroduceDTO.setDetails(conceptDetailDTOList);
         return conceptIntroduceDTO;
     }
-}
+}

+ 115 - 0
aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java

@@ -0,0 +1,115 @@
+package com.diagbot.util;
+
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.LexiconTypeEnum;
+
+/**
+ * @Description:参数转换
+ * @Author:zhaops
+ * @time: 2019/5/7 9:44
+ */
+public class ParamConvertUtil {
+
+    /**
+     * 概念(标签)词性转术语词性
+     *
+     * @param type
+     * @return
+     */
+    public static Integer conceptConvert2Lib(Integer type) {
+        Integer libType = null;
+        switch (ConceptTypeEnum.getEnum(type)) {
+            case Symptom:
+                libType = LexiconTypeEnum.SYMPTOM.getKey();
+                break;
+            case Past:
+            case Other:
+                libType = LexiconTypeEnum.HISTORY.getKey();
+                break;
+            case Vital:
+                libType = LexiconTypeEnum.VITAL_INDEX.getKey();
+                break;
+            case Lis:
+                libType = LexiconTypeEnum.LIS_PACKAGE.getKey();
+                break;
+            case Pacs:
+                libType = LexiconTypeEnum.PACS_ITEMS.getKey();
+                break;
+            case Disease:
+                libType = LexiconTypeEnum.DIAGNOSIS.getKey();
+                break;
+            case Drug:
+                libType = LexiconTypeEnum.DRUGS.getKey();
+                break;
+            case SIDE_EFFECTS:
+                libType = LexiconTypeEnum.SIDE_EFFECTS.getKey();
+                break;
+            case Drug_Category_Big:
+                libType = LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey();
+                break;
+            case Drug_Category_Small:
+                libType = LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey();
+                break;
+            case Scale:
+                libType = LexiconTypeEnum.GAUGE.getKey();
+                break;
+            case Indication:
+                libType = LexiconTypeEnum.CORE_INDICATORS.getKey();
+                break;
+            default:
+                break;
+        }
+        return libType;
+    }
+
+    /**
+     * 术语词性转概念(标签)词性
+     *
+     * @param libType
+     * @return
+     */
+    public Integer libConvert2Concept(Integer libType) {
+        Integer type = null;
+        switch (LexiconTypeEnum.getEnum(libType)) {
+            case SYMPTOM:
+                type = ConceptTypeEnum.Symptom.getKey();
+                break;
+            case HISTORY:
+                type = ConceptTypeEnum.Other.getKey();
+                break;
+            case VITAL_INDEX:
+                type = ConceptTypeEnum.Vital.getKey();
+                break;
+            case LIS_PACKAGE:
+                type = ConceptTypeEnum.Lis.getKey();
+                break;
+            case PACS_ITEMS:
+                type = ConceptTypeEnum.Pacs.getKey();
+                break;
+            case DIAGNOSIS:
+                type = ConceptTypeEnum.Disease.getKey();
+                break;
+            case DRUGS:
+                type = ConceptTypeEnum.Drug.getKey();
+                break;
+            case SIDE_EFFECTS:
+                type = ConceptTypeEnum.SIDE_EFFECTS.getKey();
+                break;
+            case DRUG_CATEGORY_BIG:
+                type = ConceptTypeEnum.Drug_Category_Big.getKey();
+                break;
+            case DRUG_CATEGORY_SMALL:
+                type = ConceptTypeEnum.Drug_Category_Small.getKey();
+                break;
+            case GAUGE:
+                type = ConceptTypeEnum.Scale.getKey();
+                break;
+            case CORE_INDICATORS:
+                type = ConceptTypeEnum.Indication.getKey();
+                break;
+            default:
+                break;
+        }
+        return type;
+    }
+}

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

@@ -32,7 +32,10 @@ public class ConceptDetailController {
     @Autowired
     private ConceptDetailFacade conceptDetailFacade;
 
-    @ApiOperation(value = "知识库标准化-获取提示信息[by:zhaops]", notes = "")
+    @ApiOperation(value = "知识库标准化-获取提示信息[by:zhaops]",
+            notes = "name: 标签名称,必填<br>" +
+                    "libType:标签类型,必填<br>" +
+                    "position:展示位置(1-推送展示,2-更多展示,3-一般治疗展示,4-手术治疗展示,5-药品说明书,6-不良反应,7-描述信息(智能分诊症状提示信息)),必填")
     @PostMapping("/getConceptDetail")
     @SysLogger("getConceptDetail")
     public RespDTO<ConceptIntroduceDTO> getConceptDetail(@Valid @RequestBody ConceptIntroduceVO conceptIntroduceVO) {

+ 3 - 0
icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
 
@@ -28,6 +29,8 @@ import javax.validation.Valid;
 @RequestMapping("/introduceInfo")
 @Api(value = "提示信息相关API", tags = { "知识库标准化-提示信息相关API" })
 @SuppressWarnings("unchecked")
+@ApiIgnore
+@Deprecated
 public class IntroduceInfoController {
 
     @Autowired