|
@@ -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());
|