|
@@ -4,17 +4,28 @@ import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.biz.push.entity.Lis;
|
|
|
import com.diagbot.biz.push.entity.Pacs;
|
|
|
import com.diagbot.client.IcssPushServiceClient;
|
|
|
-import com.diagbot.dto.*;
|
|
|
+import com.diagbot.dto.NeoPushDTO;
|
|
|
+import com.diagbot.dto.PushBaseDTO;
|
|
|
+import com.diagbot.dto.PushDTO;
|
|
|
+import com.diagbot.dto.TreatDTO;
|
|
|
+import com.diagbot.dto.WordCrfDTO;
|
|
|
import com.diagbot.dto.icss.FeatureRate;
|
|
|
import com.diagbot.dto.icss.Response;
|
|
|
import com.diagbot.dto.icss.ResponseData;
|
|
|
import com.diagbot.entity.PreResult;
|
|
|
-import com.diagbot.enums.*;
|
|
|
+import com.diagbot.enums.DiseaseTypeEnum;
|
|
|
+import com.diagbot.enums.MedicalAdviceEnum;
|
|
|
+import com.diagbot.enums.PushRelationTypeEnum;
|
|
|
+import com.diagbot.enums.RedisEnum;
|
|
|
+import com.diagbot.enums.StandConvertEnum;
|
|
|
+import com.diagbot.enums.StaticTypeEnum;
|
|
|
import com.diagbot.facade.CommonFacade;
|
|
|
+import com.diagbot.facade.KlRelationFacade;
|
|
|
import com.diagbot.facade.NeoFacade;
|
|
|
import com.diagbot.facade.TranLisConfigIcssFacade;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RedisUtil;
|
|
|
+import com.diagbot.vo.DiseaseItemVO;
|
|
|
import com.diagbot.vo.IcssVo;
|
|
|
import com.diagbot.vo.NeoPushVO;
|
|
|
import com.diagbot.vo.PushVO;
|
|
@@ -29,7 +40,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.LinkedHashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -50,7 +67,8 @@ public class PushProcess {
|
|
|
IcssPushServiceClient icssPushServiceClient;
|
|
|
@Autowired
|
|
|
RedisUtil redisUtil;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private KlRelationFacade klRelationFacade;
|
|
|
|
|
|
public PushDTO processIcss(PushVO pushVo) {
|
|
|
|
|
@@ -115,24 +133,44 @@ public class PushProcess {
|
|
|
if (diaeaseName != null) {
|
|
|
String uniqueName = diaeaseName.getUniqueName();
|
|
|
uniqueName = StringUtils.isNotBlank(uniqueName) ? uniqueName : diaeaseName.getName();
|
|
|
- reverseInfoByDisName = neoFacade.reverseInfoByDisName(uniqueName);
|
|
|
- }
|
|
|
- if (reverseInfoByDisName != null) {
|
|
|
- if (ruleTypeList.contains("8") && reverseInfoByDisName.containsKey(StaticTypeEnum.DRUG.getName())) {
|
|
|
- pushDTO.setMedicines(reverseInfoByDisName.get(StaticTypeEnum.DRUG.getName()).stream().map(x -> {
|
|
|
- PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
- pushBaseDTO.setName(x);
|
|
|
- return pushBaseDTO;
|
|
|
- }).collect(Collectors.toList()));
|
|
|
- }
|
|
|
- if (ruleTypeList.contains("9") && reverseInfoByDisName.containsKey(StaticTypeEnum.OPT.getName())) {
|
|
|
- pushDTO.setOperations(reverseInfoByDisName.get(StaticTypeEnum.OPT.getName()).stream().map(x -> {
|
|
|
- PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
- pushBaseDTO.setName(x);
|
|
|
- return pushBaseDTO;
|
|
|
- }).collect(Collectors.toList()));
|
|
|
+ //reverseInfoByDisName = neoFacade.reverseInfoByDisName(uniqueName);
|
|
|
+ //查询疾病相关的项目
|
|
|
+ DiseaseItemVO diseaseItemVO = new DiseaseItemVO();
|
|
|
+ diseaseItemVO.setDiseaseName(uniqueName);
|
|
|
+ Map<Long, List<String>> items = klRelationFacade.getItemByDiseaseMap(diseaseItemVO);
|
|
|
+ if (MapUtils.isNotEmpty(items)){
|
|
|
+ if (ruleTypeList.contains("8") && ListUtil.isNotEmpty(items.get(PushRelationTypeEnum.DRUG.getKey()))){
|
|
|
+ pushDTO.setMedicines(items.get(PushRelationTypeEnum.DRUG.getKey()).stream().map(x -> {
|
|
|
+ PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+ pushBaseDTO.setName(x);
|
|
|
+ return pushBaseDTO;
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ if (ruleTypeList.contains("9") && ListUtil.isNotEmpty(items.get(PushRelationTypeEnum.OPERATION.getKey()))){
|
|
|
+ pushDTO.setOperations(items.get(PushRelationTypeEnum.OPERATION.getKey()).stream().map(x -> {
|
|
|
+ PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+ pushBaseDTO.setName(x);
|
|
|
+ return pushBaseDTO;
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+// if (reverseInfoByDisName != null) {
|
|
|
+// if (ruleTypeList.contains("8") && reverseInfoByDisName.containsKey(StaticTypeEnum.DRUG.getName())) {
|
|
|
+// pushDTO.setMedicines(reverseInfoByDisName.get(StaticTypeEnum.DRUG.getName()).stream().map(x -> {
|
|
|
+// PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+// pushBaseDTO.setName(x);
|
|
|
+// return pushBaseDTO;
|
|
|
+// }).collect(Collectors.toList()));
|
|
|
+// }
|
|
|
+// if (ruleTypeList.contains("9") && reverseInfoByDisName.containsKey(StaticTypeEnum.OPT.getName())) {
|
|
|
+// pushDTO.setOperations(reverseInfoByDisName.get(StaticTypeEnum.OPT.getName()).stream().map(x -> {
|
|
|
+// PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+// pushBaseDTO.setName(x);
|
|
|
+// return pushBaseDTO;
|
|
|
+// }).collect(Collectors.toList()));
|
|
|
+// }
|
|
|
+// }
|
|
|
if (ListUtil.isNotEmpty(icssVo.getDiagOrder())) {
|
|
|
List<PreResult> diagOrder = icssVo.getDiagOrder();
|
|
|
//把第一个推送出来的诊断set到diagOrder中,再反推
|
|
@@ -335,6 +373,10 @@ public class PushProcess {
|
|
|
return typeWordsMap;
|
|
|
}
|
|
|
|
|
|
+ private void reversePushPackage(){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private void reversePushPackage(int length, PushDTO pushDTO, List<String> ruleTypeList, Map<String, List<String>> typeWords, NeoPushVO pushVO, Map<String, List<PushBaseDTO>> dis) {
|
|
|
NeoPushDTO reversePush = neoFacade.getReversePush(pushVO);
|
|
|
// 症状
|