瀏覽代碼

推送入参出参

kongwz 4 年之前
父節點
當前提交
e7079c8afa

+ 21 - 1
src/main/java/com/diagbot/dto/NeoPushDTO.java

@@ -1,10 +1,30 @@
 package com.diagbot.dto;
 
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
 /**
- * @description: 推理出参
+ * @description: 推理出参《图谱返回数据》
  * @author: zhoutg
  * @time: 2020/8/17 15:34
  */
+@Data
 public class NeoPushDTO {
+    private PushBaseDTO disease;//疾病医保名称
+    private PushBaseDTO icd10;//疾病医保版icd-10
+    private List<PushBaseDTO> symptoms;//症状
+    private List<PushBaseDTO> vitals;//体征
+    private List<PushBaseDTO> lis;//实验室检查
+    private List<PushBaseDTO> pacs;//辅助检查
+    /**
+     * Map<String,List<NeoPushGeneralDTO>>
+     *     operation:[  ]
+     *     drug:[  ]
+     */
+    private Map<String,List<PushBaseDTO>> treat;//治疗
+    private List<PushBaseDTO> diagnosticBasis;//诊断依据
+
 
 }

+ 13 - 0
src/main/java/com/diagbot/dto/NeoPushGeneralDTO.java

@@ -0,0 +1,13 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+/**
+ * @description: 推理出参
+ * @author: zhoutg
+ * @time: 2020/8/17 15:34
+ */
+@Data
+public class NeoPushGeneralDTO {
+    private String name;
+}

+ 12 - 0
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -120,6 +120,18 @@ public class NeoFacade {
         return map;
     }
 
+    /**
+     * 图谱推送出来的数据
+     * @param pushVO
+     * @return
+     */
+    public List<NeoPushDTO> getPush(NeoPushVO pushVO){
+        List<NeoPushDTO> neoPushDTOS = new ArrayList<>();
+        // TODO: 2020/8/18
+
+        return neoPushDTOS;
+    }
+
     /**
      * 处理开单合理性图谱数据
      * @param billNeoVO

+ 20 - 4
src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,9 +1,7 @@
 package com.diagbot.facade;
 
 import com.diagbot.biz.push.entity.Item;
-import com.diagbot.dto.PushBaseDTO;
-import com.diagbot.dto.PushDTO;
-import com.diagbot.dto.WordCrfDTO;
+import com.diagbot.dto.*;
 import com.diagbot.process.PushProcess;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.*;
@@ -45,10 +43,28 @@ public class PushFacade {
         StandConvert standConvert = commonFacade.dataTypeGet(wordCrfDTO);
         Map<String, Map<String, String>> standConvertMap = neoFacade.standConvert(standConvert);
         commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
+        List<String> ruleTypeList = Arrays.asList(pushVo.getFeatureType().split(","));
         //生成push入参,供图谱调用
         NeoPushVO pushVO = commonFacade.generatePushImput(wordCrfDTO);
+        //图谱推送数据
+        List<NeoPushDTO> push = neoFacade.getPush(pushVO);
+        if(ListUtil.isNotEmpty(push)){
+            NeoPushDTO neoPushDTO = push.get(0);
+            if(neoPushDTO != null){
+                int length = pushVo.getLength();
+                // 症状
+                if (ruleTypeList.contains("1") && ListUtil.isNotEmpty(neoPushDTO.getSymptoms())) {
+                    pushDTO.setSymptom(neoPushDTO.getSymptoms().subList(0, neoPushDTO.getSymptoms().size() >= length ? length : neoPushDTO.getSymptoms().size()));
+                }
+                // 查体
+                if (ruleTypeList.contains("4") && ListUtil.isNotEmpty(neoPushDTO.getVitals())) {
+                    pushDTO.setVital(neoPushDTO.getVitals().subList(0, neoPushDTO.getVitals().size() >= length ? length : neoPushDTO.getVitals().size()));
+                }
+            }
+
+        }
+
 
-        List<String> ruleTypeList = Arrays.asList(pushVo.getFeatureType().split(","));
 
         if (wordCrfDTO.getDiagLabel() != null && ListUtil.isNotEmpty(wordCrfDTO.getDiagLabel().getDiags())) { // 有诊断
             List<String> diags = wordCrfDTO.getDiagLabel().getDiags().stream().map(r -> r.getStandName()).collect(Collectors.toList());