zhaops hace 4 años
padre
commit
85df1baa94

+ 11 - 0
cdssman-service/src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -2,9 +2,11 @@ package com.diagbot.client;
 
 import com.diagbot.client.hystrix.CdssCoreHystrix;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.vo.ConceptVO;
 import com.diagbot.vo.HasStaticKnowledgeVO;
+import com.diagbot.vo.RetrievalVO;
 import com.diagbot.vo.StaticKnowledgeIndexVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -46,4 +48,13 @@ public interface CdssCoreClient {
      */
     @PostMapping("/retrieval/getConceptNames")
     RespDTO<List<String>> getConceptNames(@Valid @RequestBody ConceptVO conceptVO);
+
+    /**
+     * 化验大项、化验小项、辅检、诊断、药品、手术等检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @PostMapping("/retrieval/index")
+    RespDTO<RetrievalDTO> index(@RequestBody @Valid RetrievalVO retrievalVO);
 }

+ 14 - 0
cdssman-service/src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -2,9 +2,11 @@ package com.diagbot.client.hystrix;
 
 import com.diagbot.client.CdssCoreClient;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.vo.ConceptVO;
 import com.diagbot.vo.HasStaticKnowledgeVO;
+import com.diagbot.vo.RetrievalVO;
 import com.diagbot.vo.StaticKnowledgeIndexVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
@@ -56,4 +58,16 @@ public class CdssCoreHystrix implements CdssCoreClient {
         log.error("【hystrix】调用{}异常", "getConceptNames");
         return null;
     }
+
+    /**
+     * 化验大项、化验小项、辅检、诊断、药品、手术等检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @Override
+    public RespDTO<RetrievalDTO> index(@RequestBody @Valid RetrievalVO retrievalVO) {
+        log.error("【hystrix】调用{}异常", "index");
+        return null;
+    }
 }

+ 23 - 0
cdssman-service/src/main/java/com/diagbot/dto/DiseaseInfoDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/9/15 10:07
+ */
+@Getter
+@Setter
+public class DiseaseInfoDTO {
+    /**
+     * 疾病名称
+     */
+    private String name;
+
+    /**
+     * ICD10编码
+     */
+    private String icd10Code;
+}

+ 32 - 0
cdssman-service/src/main/java/com/diagbot/dto/DrugInfoDTO.java

@@ -0,0 +1,32 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 16:15
+ */
+@Getter
+@Setter
+public class DrugInfoDTO {
+    /**
+     * 药品名称
+     */
+    private String name;
+    /**
+     * 用法
+     */
+    private List<String> usage;
+    /**
+     * 用量、剂量
+     */
+    private List<String> dosage;
+    /**
+     * 频次
+     */
+    private List<String> frequency;
+}

+ 46 - 0
cdssman-service/src/main/java/com/diagbot/dto/LisDetailDTO.java

@@ -0,0 +1,46 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 15:53
+ */
+@Getter
+@Setter
+public class LisDetailDTO {
+    /**
+     * 大项(套餐)
+     */
+    private String name;
+    /**
+     * 小项(公表名)
+     */
+    private String uniqueName;
+    /**
+     * 数值
+     */
+    private Double value;
+    /**
+     * 单位
+     */
+    private String units;
+    /**
+     * 下限
+     */
+    private Double minValue;
+    /**
+     * 上限
+     */
+    private Double maxValue;
+    /**
+     * 非数值结果
+     */
+    private String otherValue;
+    /**
+     * 非数值类型参考值
+     */
+    private String referenceValue;
+}

+ 22 - 0
cdssman-service/src/main/java/com/diagbot/dto/OperationInfoDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 16:21
+ */
+@Getter
+@Setter
+public class OperationInfoDTO {
+    /**
+     * 手术或操作名称
+     */
+    private String name;
+    /**
+     * 类型:手术、操作
+     */
+    private String type;
+}

+ 48 - 0
cdssman-service/src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -0,0 +1,48 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 15:45
+ */
+@Getter
+@Setter
+public class RetrievalDTO {
+    /**
+     * 化验大项
+     */
+    private List<String> lisNames;
+    /**
+     * 化验小项
+     */
+    private List<LisDetailDTO> lisDetailNames;
+    /**
+     * 辅检
+     */
+    private List<String> pacsNames;
+    /**
+     * 诊断
+     */
+    private List<DiseaseInfoDTO> diseaseNames;
+    /**
+     * 药品
+     */
+    private List<DrugInfoDTO> drugNames;
+    /**
+     * 手术或操作
+     */
+    private List<OperationInfoDTO> operationNames;
+    /**
+     * 科室
+     */
+    private List<String> deptNames;
+    /**
+     * 输血
+     */
+    private List<String> transfusionNames;
+}

+ 34 - 0
cdssman-service/src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.RetrievalVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 16:44
+ */
+@Component
+public class RetrievalFacade {
+    @Autowired
+    private CdssCoreClient cdssCoreClient;
+
+    /**
+     * 检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    public RetrievalDTO index(RetrievalVO retrievalVO) {
+        RetrievalDTO retrievalDTO = new RetrievalDTO();
+        RespDTO<RetrievalDTO> respDTO = cdssCoreClient.index(retrievalVO);
+        RespDTOUtil.respNGDealCover(respDTO, "检索失败");
+        retrievalDTO = respDTO.data;
+        return retrievalDTO;
+    }
+}

+ 30 - 0
cdssman-service/src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -0,0 +1,30 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 15:40
+ */
+@Getter
+@Setter
+public class RetrievalVO {
+    /**
+     * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作
+     */
+    private Integer type;
+    /**
+     * 检索内容
+     */
+    private String inputStr;
+//    /**
+//     * 性别:1-男、2-女、3-通用
+//     */
+//    private Integer sex;
+//    /**
+//     * 年龄
+//     */
+//    private Integer age;
+}

+ 40 - 0
cdssman-service/src/main/java/com/diagbot/web/RetrievalController.java

@@ -0,0 +1,40 @@
+package com.diagbot.web;
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.facade.RetrievalFacade;
+import com.diagbot.vo.RetrievalVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 16:45
+ */
+@RestController
+@RequestMapping("/demo/retrieval")
+@Api(value = "术语检索相关API", tags = { "术语检索相关API" })
+@SuppressWarnings("unchecked")
+public class RetrievalController {
+    @Autowired
+    private RetrievalFacade retrievalFacade;
+
+    @ApiOperation(value = "术语检索[zhaops]",
+            notes = "type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血 <br>" +
+                    "inputStr: 检索内容<br>" +
+                    "sex: 性别:1-男、2-女、3-通用 <br>" +
+                    "age: 年龄<br>")
+    @PostMapping("/index")
+    public RespDTO<RetrievalDTO> index(@Valid @RequestBody RetrievalVO retrievalVO) {
+        RetrievalDTO data = retrievalFacade.index(retrievalVO);
+        return RespDTO.onSuc(data);
+    }
+}