Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

MarkHuang 4 anni fa
parent
commit
52da02d2a6
29 ha cambiato i file con 477 aggiunte e 52 eliminazioni
  1. 7 1
      src/main/java/com/diagbot/aggregate/IndicationAggregate.java
  2. 2 3
      src/main/java/com/diagbot/dto/IndicationDTO.java
  3. 21 1
      src/main/java/com/diagbot/dto/NeoPushDTO.java
  4. 13 0
      src/main/java/com/diagbot/dto/NeoPushGeneralDTO.java
  5. 89 23
      src/main/java/com/diagbot/facade/CommonFacade.java
  6. 1 7
      src/main/java/com/diagbot/facade/HighRiskFacade.java
  7. 13 7
      src/main/java/com/diagbot/facade/IndicationFacade.java
  8. 12 0
      src/main/java/com/diagbot/facade/NeoFacade.java
  9. 26 9
      src/main/java/com/diagbot/facade/PushFacade.java
  10. 17 0
      src/main/java/com/diagbot/process/PushProcess.java
  11. 23 1
      src/main/java/com/diagbot/util/CoreUtil.java
  12. 10 0
      src/main/java/com/diagbot/vo/NeoPushVO.java
  13. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/Allergy.java
  14. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/AllergyFood.java
  15. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/AllergyMedicine.java
  16. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/BloodTransfusion.java
  17. 16 0
      src/main/java/com/diagbot/vo/neoPushEntity/ChiefPushVo.java
  18. 12 0
      src/main/java/com/diagbot/vo/neoPushEntity/Diag.java
  19. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/DiagInfectious.java
  20. 12 0
      src/main/java/com/diagbot/vo/neoPushEntity/Drug.java
  21. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/GeneralVo.java
  22. 16 0
      src/main/java/com/diagbot/vo/neoPushEntity/LisPushVo.java
  23. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/Operation.java
  24. 16 0
      src/main/java/com/diagbot/vo/neoPushEntity/PacsPushVo.java
  25. 25 0
      src/main/java/com/diagbot/vo/neoPushEntity/PastPushVo.java
  26. 17 0
      src/main/java/com/diagbot/vo/neoPushEntity/PresentPushVo.java
  27. 12 0
      src/main/java/com/diagbot/vo/neoPushEntity/Symptom.java
  28. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/Vaccinate.java
  29. 13 0
      src/main/java/com/diagbot/vo/neoPushEntity/Wound.java

+ 7 - 1
src/main/java/com/diagbot/aggregate/IndicationAggregate.java

@@ -4,6 +4,7 @@ import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.facade.BillFacade;
 import com.diagbot.facade.HighRiskFacade;
+import com.diagbot.util.CoreUtil;
 import com.diagbot.vo.IndicationPushVO;
 import io.github.lvyahui8.spring.annotation.DataConsumer;
 import io.github.lvyahui8.spring.annotation.DataProvider;
@@ -33,9 +34,11 @@ public class IndicationAggregate {
         IndicationDTO res = new IndicationDTO();
         if (billDTO != null) {
             res.setBillMsgList(billDTO.getBillMsgList());
+            res.getDebugStr().addAll(billDTO.getDebugStr()); // 调试信息
         }
         if (highrisk != null) {
             res.setHighRiskList(highrisk.getHighRiskList());
+            res.getDebugStr().addAll(highrisk.getDebugStr()); // 调试信息
         }
         return res;
     }
@@ -50,16 +53,17 @@ public class IndicationAggregate {
     @DataProvider("bill")
     public IndicationDTO bill(@InvokeParameter("wordCrfDTO") WordCrfDTO wordCrfDTO,
                               @InvokeParameter("indicationPushVO") IndicationPushVO indicationPushVO) {
+        long start = System.currentTimeMillis();
         IndicationDTO res = new IndicationDTO();
         // 开单合理性
         if (indicationPushVO != null && indicationPushVO.getRuleTypeList().contains("2")) {
             billFacade.billFac(indicationPushVO, wordCrfDTO, res);
+            CoreUtil.getDebugStr(start, "开单规则", res.getDebugStr());
             return res;
         }
         return null;
     }
 
-
     /**
      * 高风险提示
      *
@@ -70,10 +74,12 @@ public class IndicationAggregate {
     @DataProvider("highrisk")
     public IndicationDTO highrisk(@InvokeParameter("wordCrfDTO") WordCrfDTO wordCrfDTO,
                               @InvokeParameter("indicationPushVO") IndicationPushVO indicationPushVO) {
+        long start = System.currentTimeMillis();
         IndicationDTO res = new IndicationDTO();
         // 高风险提示
         if (indicationPushVO != null && indicationPushVO.getRuleTypeList().contains("3")) {
             highRiskFacade.highRiskFac(indicationPushVO, wordCrfDTO, res);
+            CoreUtil.getDebugStr(start, "高风险提示", res.getDebugStr());
             return res;
         }
         return null;

+ 2 - 3
src/main/java/com/diagbot/dto/IndicationDTO.java

@@ -3,6 +3,7 @@ package com.diagbot.dto;
 import lombok.Data;
 
 import java.util.ArrayList;
+import java.util.LinkedList;
 import java.util.List;
 
 /**
@@ -18,8 +19,6 @@ public class IndicationDTO {
     private List<BillMsg> billMsgList = new ArrayList<>();
     // 高危药品、手术
     private List<BillMsg> highRiskList = new ArrayList<>();
-    // 检查内容注意事项
-    private List<BillMsg> noteList = new ArrayList<>();
     // 记录调试信息
-    private List<String> dubugStr = new ArrayList<>();
+    private List<String> debugStr = new LinkedList<>();
 }

+ 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;
+}

+ 89 - 23
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -6,15 +6,13 @@ import com.diagbot.client.CRFServiceClient;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.enums.StandConvertEnum;
 import com.diagbot.model.ai.AIAnalyze;
-import com.diagbot.model.label.ChiefLabel;
-import com.diagbot.model.label.DiagLabel;
-import com.diagbot.model.label.PastLabel;
-import com.diagbot.model.label.PresentLabel;
-import com.diagbot.model.label.VitalLabel;
+import com.diagbot.model.label.*;
 import com.diagbot.util.CoreUtil;
 import com.diagbot.util.ListUtil;
+import com.diagbot.vo.NeoPushVO;
 import com.diagbot.vo.SearchData;
 import com.diagbot.vo.StandConvert;
+import com.diagbot.vo.neoPushEntity.*;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -35,8 +33,8 @@ public class CommonFacade {
     CRFServiceClient crfServiceClient;
 
     //组装好的label
-    public WordCrfDTO crf_process(SearchData searchData){
-        
+    public WordCrfDTO crf_process(SearchData searchData) {
+
         AIAnalyze aiAnalyze = new AIAnalyze(crfServiceClient);
         WordCrfDTO wordCrfDTO = new WordCrfDTO();
         wordCrfDTO.setAge(searchData.getAge());
@@ -52,7 +50,7 @@ public class CommonFacade {
     }
 
     //返回给图谱的词,这些词需要转换成标准词
-    public StandConvert dataTypeGet(WordCrfDTO wordCrfDTO){
+    public StandConvert dataTypeGet(WordCrfDTO wordCrfDTO) {
         StandConvert standConvert = new StandConvert();
 
         //所有的症状(主诉、现病史)
@@ -73,17 +71,17 @@ public class CommonFacade {
 
         //所有化验(结构化数据)
         List<Lis> lis = wordCrfDTO.getLis();
-        if(ListUtil.isNotEmpty(lis)){
+        if (ListUtil.isNotEmpty(lis)) {
             List<String> lis_unique = lis.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
-                    .map(x ->x.getName()+x.getDetailName()).collect(Collectors.toList());
+                    .map(x -> x.getName() + x.getDetailName()).collect(Collectors.toList());
             standConvert.setLisList(lis_unique);
         }
 
         //所有辅助检查(结构化数据)
         List<Pacs> pacs = wordCrfDTO.getPacs();
-        if(ListUtil.isNotEmpty(pacs)){
+        if (ListUtil.isNotEmpty(pacs)) {
             List<String> pacss_unique = pacs.stream().filter(x -> StringUtils.isBlank(x.getUniqueName()))
-                    .map(x ->x.getName()).collect(Collectors.toList());
+                    .map(x -> x.getName()).collect(Collectors.toList());
             standConvert.setPacsList(pacss_unique);
         }
 
@@ -115,7 +113,7 @@ public class CommonFacade {
     }
 
     //把图谱返回的标准词set到label中
-    public void dataTypeSet(WordCrfDTO wordCrfDTO, Map<String, Map<String, String>> map){
+    public void dataTypeSet(WordCrfDTO wordCrfDTO, Map<String, Map<String, String>> map) {
         ChiefLabel chiefLabel = wordCrfDTO.getChiefLabel();
         PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
         PastLabel pastLabel = wordCrfDTO.getPastLabel();
@@ -125,22 +123,90 @@ public class CommonFacade {
         VitalLabel vitalLabel = wordCrfDTO.getVitalLabel();
 
         //症状回填
-        CoreUtil.setPropertyList(chiefLabel.getClinicals(),map.get(StandConvertEnum.clinical.getName()));
-        CoreUtil.setPropertyList(presentLabel.getClinicals(),map.get(StandConvertEnum.clinical.getName()));
+        CoreUtil.setPropertyList(chiefLabel.getClinicals(), map.get(StandConvertEnum.clinical.getName()));
+        CoreUtil.setPropertyList(presentLabel.getClinicals(), map.get(StandConvertEnum.clinical.getName()));
         //诊断回填
-        CoreUtil.setPropertyList(diagLabel.getDiags(),map.get(StandConvertEnum.disease.getName()));
+        CoreUtil.setPropertyList(diagLabel.getDiags(), map.get(StandConvertEnum.disease.getName()));
         //药品回填
-        CoreUtil.setPropertyList(presentLabel.getMedicines(),map.get(StandConvertEnum.drug.getName()));
-        CoreUtil.setPropertyList(pastLabel.getAllergyMedicines(),map.get(StandConvertEnum.drug.getName()));
+        CoreUtil.setPropertyList(presentLabel.getMedicines(), map.get(StandConvertEnum.drug.getName()));
+        CoreUtil.setPropertyList(pastLabel.getAllergyMedicines(), map.get(StandConvertEnum.drug.getName()));
         // TODO: 2020/8/5 化验回填
-        CoreUtil.setPropertyList(lis,"name","detailName","uniqueName",map.get(StandConvertEnum.lis.getName()));
+        CoreUtil.setPropertyList(lis, "name", "detailName", "uniqueName", map.get(StandConvertEnum.lis.getName()));
         // TODO: 2020/8/5 辅助检查回填
-        CoreUtil.setPropertyList(pacs,"name","uniqueName",map.get(StandConvertEnum.pacs.getName()));
+        CoreUtil.setPropertyList(pacs, "name", "uniqueName", map.get(StandConvertEnum.pacs.getName()));
         //体征回填
-        CoreUtil.setPropertyList(vitalLabel.getVitals(),map.get(StandConvertEnum.vital.getName()));
+        CoreUtil.setPropertyList(vitalLabel.getVitals(), map.get(StandConvertEnum.vital.getName()));
         //手术回填
-        CoreUtil.setPropertyList(presentLabel.getOperations(),map.get(StandConvertEnum.operation.getName()));
-        CoreUtil.setPropertyList(pastLabel.getOperations(),map.get(StandConvertEnum.operation.getName()));
+        CoreUtil.setPropertyList(presentLabel.getOperations(), map.get(StandConvertEnum.operation.getName()));
+        CoreUtil.setPropertyList(pastLabel.getOperations(), map.get(StandConvertEnum.operation.getName()));
+    }
+
+    /**
+     * 生成给图谱的入参(推送)
+     */
+    public NeoPushVO generatePushImput(WordCrfDTO wordCrfDTO) {
+        NeoPushVO pushVO = new NeoPushVO();
+        ChiefLabel chiefLabel = wordCrfDTO.getChiefLabel();
+        PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
+        PastLabel pastLabel = wordCrfDTO.getPastLabel();
+        List<Lis> lis = wordCrfDTO.getLis();
+        List<Pacs> pacs = wordCrfDTO.getPacs();
+        pushVO.setAge(wordCrfDTO.getAge());
+        pushVO.setSex(wordCrfDTO.getSex());
+        if (chiefLabel != null) {
+            List<Symptom> cjiefClinicals = chiefLabel.getClinicals().stream().filter(x -> x.getNegative() == null).map(z ->
+            {
+                Symptom symptom = new Symptom();
+                symptom.setName(z.getStandName());
+                return symptom;
+            }).collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(cjiefClinicals)) {
+                ChiefPushVo chiefPushVo = new ChiefPushVo();
+                chiefPushVo.setSymptoms(cjiefClinicals);
+                pushVO.setChiefPushVo(chiefPushVo);
+            }
+        }
+        if(presentLabel != null){
+            PresentPushVo presentPushVo = new PresentPushVo();
+            List<Symptom> presentClinicals = presentLabel.getClinicals().stream().filter(x -> x.getNegative() == null).map(z ->
+            {
+                Symptom symptom = new Symptom();
+                symptom.setName(z.getStandName());
+                return symptom;
+            }).collect(Collectors.toList());
+            presentPushVo.setSymptoms(presentClinicals);
+
+            List<Diag> presentdiags = presentLabel.getDiags().stream().filter(x -> x.getNegative() == null).map(z ->
+            {
+                Diag diag = new Diag();
+                diag.setName(z.getStandName());
+                return diag;
+            }).collect(Collectors.toList());
+            presentPushVo.setDiags(presentdiags);
+
+            List<Drug> presentdrugs = presentLabel.getMedicines().stream().filter(x -> x.getNegative() == null).map(z ->
+            {
+                Drug drug = new Drug();
+                drug.setName(z.getStandName());
+                return drug;
+            }).collect(Collectors.toList());
+            presentPushVo.setDrugs(presentdrugs);
+
+            pushVO.setPresentPushVo(presentPushVo);
+        }
+        if(ListUtil.isNotEmpty(lis)){
+            LisPushVo lisPushVo = new LisPushVo();
+            lisPushVo.setLises(lis);
+            pushVO.setLisPushVo(lisPushVo);
+        }
+        if(ListUtil.isNotEmpty(pacs)){
+            PacsPushVo pacsPushVo = new PacsPushVo();
+            pacsPushVo.setPacs(pacs);
+            pushVO.setPacsPushVo(pacsPushVo);
+        }
+
+        return pushVO;
     }
 
 }
+

+ 1 - 7
src/main/java/com/diagbot/facade/HighRiskFacade.java

@@ -1,20 +1,15 @@
 package com.diagbot.facade;
 
 import com.diagbot.biz.push.entity.Item;
-import com.diagbot.biz.push.entity.Lis;
-import com.diagbot.biz.push.entity.Pacs;
 import com.diagbot.dto.HighRiskNeoDTO;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.process.HighRiskProcess;
-import com.diagbot.util.StringUtil;
-import com.diagbot.vo.BillNeoVO;
 import com.diagbot.vo.HighRiskNeoVO;
 import com.diagbot.vo.IndicationPushVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -33,7 +28,7 @@ public class HighRiskFacade {
     CommonFacade commonFacade;
 
     /**
-     * 高风险业务
+     * 高风险提示
      * @param
      * @return
      */
@@ -58,7 +53,6 @@ public class HighRiskFacade {
 
         // 规则处理
         highRiskProcess.process(highRiskNeoDTOList, res);
-        System.out.println(res);
     }
 
 

+ 13 - 7
src/main/java/com/diagbot/facade/IndicationFacade.java

@@ -54,6 +54,8 @@ public class IndicationFacade {
      * @return
      */
     public IndicationDTO indicationFac(IndicationPushVO indicationPushVO) {
+        IndicationDTO res = new IndicationDTO();
+
         //方法适配处理
         List<String> ruleTypeList = Arrays.asList(indicationPushVO.getRuleType().split(","));
         indicationPushVO.setRuleTypeList(ruleTypeList);
@@ -70,23 +72,24 @@ public class IndicationFacade {
             }
         }
 
-        IndicationDTO res = new IndicationDTO();
         WordCrfDTO wordCrfDTO = null;
         long l1 = System.currentTimeMillis();
+
+        // 模型处理数据
+        long crfStart = System.currentTimeMillis();
         if (methodList.contains("crf")) {
-            // 模型处理数据
             wordCrfDTO = commonFacade.crf_process(indicationPushVO);
-            CoreUtil.getDubugStr(l1, "处理模型数据", res.getDubugStr());
         }
+        long crfEnd = System.currentTimeMillis();
 
+        // 标准词转换
+        long standStart = System.currentTimeMillis();
         if (methodList.contains("stand")) {
-            // 标准词转换
-            long l2 = System.currentTimeMillis();
             StandConvert standConvert = commonFacade.dataTypeGet(wordCrfDTO);
             Map<String, Map<String, String>> standConvertMap = neoFacade.standConvertCrf(standConvert);
             commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
-            CoreUtil.getDubugStr(l2, "同义词转换", res.getDubugStr());
         }
+        long standEnd = System.currentTimeMillis();
 
         try {
             Map<String, Object> invokeParams = new HashMap<>();
@@ -97,7 +100,10 @@ public class IndicationFacade {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "提醒类服务出错" + e.getMessage());
         }
 
-        CoreUtil.getDubugStr(l1, "本次调用总计", res.getDubugStr());
+        // 输入调试信息
+        CoreUtil.getDebugStrFirst(standStart, standEnd,"同义词转换", res.getDebugStr());
+        CoreUtil.getDebugStrFirst(crfStart, crfEnd,"处理模型数据", res.getDebugStr());
+        CoreUtil.getDebugStr(l1, "本次调用总计", res.getDebugStr());
         return res;
     }
 }

+ 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

+ 26 - 9
src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,15 +1,10 @@
 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.BillNeoVO;
-import com.diagbot.vo.IndicationPushVO;
-import com.diagbot.vo.PushNeoVO;
-import com.diagbot.vo.PushVO;
-import com.diagbot.vo.StandConvert;
+import com.diagbot.vo.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -31,6 +26,8 @@ public class PushFacade {
     NeoFacade neoFacade;
     @Autowired
     CommonFacade commonFacade;
+    @Autowired
+    PushProcess pushProcess;
 
     /**
      * 推送业务
@@ -46,8 +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()));
+                }
+            }
+
+        }
+
+
 
         if (wordCrfDTO.getDiagLabel() != null && ListUtil.isNotEmpty(wordCrfDTO.getDiagLabel().getDiags())) { // 有诊断
             List<String> diags = wordCrfDTO.getDiagLabel().getDiags().stream().map(r -> r.getStandName()).collect(Collectors.toList());

+ 17 - 0
src/main/java/com/diagbot/process/PushProcess.java

@@ -0,0 +1,17 @@
+package com.diagbot.process;
+
+import com.diagbot.dto.WordCrfDTO;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 19:42
+ */
+@Component
+public class PushProcess {
+    public void process(WordCrfDTO wordCrfDTO) {
+
+    }
+}
+

+ 23 - 1
src/main/java/com/diagbot/util/CoreUtil.java

@@ -478,11 +478,33 @@ public class CoreUtil {
      * @param msg
      * @param debugStr
      */
-    public static void getDubugStr(long start,  String msg, List<String> debugStr) {
+    public static void getDebugStr(long start, String msg, List<String> debugStr) {
         long end = System.currentTimeMillis();
         debugStr.add(msg + "需要" + (end - start) / 1000.0 + "秒");
     }
 
+    /**
+     * 输出调试信息
+     *
+     * @param start
+     * @param msg
+     * @param debugStr
+     */
+    public static void getDebugStr(long start, long end, String msg, List<String> debugStr) {
+        debugStr.add(msg + "需要" + (end - start) / 1000.0 + "秒");
+    }
+
+    /**
+     * 输出调试信息
+     *
+     * @param start
+     * @param msg
+     * @param debugStr
+     */
+    public static void getDebugStrFirst(long start, long end, String msg, List<String> debugStr) {
+        debugStr.add(0, msg + "需要" + (end - start) / 1000.0 + "秒");
+    }
+
     public static void main(String[] args) {
 
         System.out.println(getCommonBillMsg("男性", "尿常规",""));

+ 10 - 0
src/main/java/com/diagbot/vo/NeoPushVO.java

@@ -1,13 +1,23 @@
 package com.diagbot.vo;
 
+import com.diagbot.vo.neoPushEntity.*;
 import lombok.Data;
 
 /**
  * @Description: 图谱推理入参
  * @Author:zhoutg
  * @time: 2020/7/29 15:34
+ * 现病史
  */
 @Data
 public class NeoPushVO {
+    private Integer age;
+    // 性别(1:男,2:女)
+    private Integer sex;
+    private ChiefPushVo chiefPushVo;//主诉
+    private PresentPushVo presentPushVo;//现病史
+    private PastPushVo pastPushVo;//既往史
+    private LisPushVo lisPushVo;//化验
+    private PacsPushVo pacsPushVo;//辅检
 
 }

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Allergy.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:13
+ * 过敏史
+ */
+@Data
+public class Allergy extends GeneralVo {
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/AllergyFood.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:14
+ * 食物过敏史
+ */
+@Data
+public class AllergyFood extends GeneralVo {
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/AllergyMedicine.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:14
+ * 药物过敏史
+ */
+@Data
+public class AllergyMedicine extends GeneralVo {
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/BloodTransfusion.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:16
+ * 输血史
+ */
+@Data
+public class BloodTransfusion extends GeneralVo {
+}

+ 16 - 0
src/main/java/com/diagbot/vo/neoPushEntity/ChiefPushVo.java

@@ -0,0 +1,16 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 15:42
+ * 主诉
+ */
+@Data
+public class ChiefPushVo {
+    private List<Symptom> symptoms;
+}

+ 12 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Diag.java

@@ -0,0 +1,12 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:02
+ */
+@Data
+public class Diag extends GeneralVo{
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/DiagInfectious.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:12
+ * 传染病史
+ */
+@Data
+public class DiagInfectious extends GeneralVo {
+}

+ 12 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Drug.java

@@ -0,0 +1,12 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:02
+ */
+@Data
+public class Drug extends GeneralVo{
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/GeneralVo.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 15:45
+ */
+@Data
+public class GeneralVo {
+    private String name;
+}

+ 16 - 0
src/main/java/com/diagbot/vo/neoPushEntity/LisPushVo.java

@@ -0,0 +1,16 @@
+package com.diagbot.vo.neoPushEntity;
+
+import com.diagbot.biz.push.entity.Lis;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 17:10
+ */
+@Data
+public class LisPushVo {
+    private List<Lis> lises;
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Operation.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:17
+ * 手术史
+ */
+@Data
+public class Operation extends GeneralVo {
+}

+ 16 - 0
src/main/java/com/diagbot/vo/neoPushEntity/PacsPushVo.java

@@ -0,0 +1,16 @@
+package com.diagbot.vo.neoPushEntity;
+
+import com.diagbot.biz.push.entity.Pacs;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 17:10
+ */
+@Data
+public class PacsPushVo {
+    private List<Pacs> pacs;
+}

+ 25 - 0
src/main/java/com/diagbot/vo/neoPushEntity/PastPushVo.java

@@ -0,0 +1,25 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 15:42
+ * 既往史
+ */
+@Data
+public class PastPushVo {
+    private List<Diag> diags;//疾病史
+    private List<Wound> wounds;//外伤史
+    private List<DiagInfectious> diagInfectious;//传染病史
+//    private List<Allergy> allergies;//过敏史
+    private List<AllergyFood> allergyFoods;//食物过敏史
+    private List<AllergyMedicine> allergyMedicines;//药物过敏史
+    private List<BloodTransfusion> bloodTransfusions;//输血史
+    private List<Operation> operations;//手术史
+    private List<Vaccinate> vaccinates;//预防接种史
+
+}

+ 17 - 0
src/main/java/com/diagbot/vo/neoPushEntity/PresentPushVo.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 15:42
+ */
+@Data
+public class PresentPushVo {
+    private List<Symptom> symptoms;
+    private List<Diag> diags;
+    private List<Drug> drugs;
+}

+ 12 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Symptom.java

@@ -0,0 +1,12 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 15:55
+ */
+@Data
+public class Symptom extends GeneralVo {
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Vaccinate.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:18
+ * 预防接种史
+ */
+@Data
+public class Vaccinate extends GeneralVo {
+}

+ 13 - 0
src/main/java/com/diagbot/vo/neoPushEntity/Wound.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo.neoPushEntity;
+
+import lombok.Data;
+
+/**
+ * @author kwz
+ * @date 2020/8/17
+ * @time 16:10
+ * 外伤史
+ */
+@Data
+public class Wound extends GeneralVo {
+}