|
@@ -5,6 +5,8 @@ import com.diagbot.dto.NeoPushDTO;
|
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
|
import com.diagbot.dto.PushDTO;
|
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
+import com.diagbot.enums.DiseaseTypeEnum;
|
|
|
+import com.diagbot.enums.MedicalAdviceEnum;
|
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
|
import com.diagbot.process.PushProcess;
|
|
|
import com.diagbot.util.ListUtil;
|
|
@@ -74,15 +76,39 @@ public class PushFacade {
|
|
|
List<PushBaseDTO> filterpacs = neoPushDTO.getPacs().stream().filter(x -> !typeWords.get(StandConvertEnum.pacs.getName()).contains(x.getName())).collect(Collectors.toList());
|
|
|
pushDTO.setPacs(filterpacs.subList(0, filterpacs.size() >= length ? length : filterpacs.size()));
|
|
|
}
|
|
|
+ // 药品
|
|
|
+ if (ruleTypeList.contains("8") && neoPushDTO.getTreat() != null && ListUtil.isNotEmpty(neoPushDTO.getTreat().get(MedicalAdviceEnum.drug.getName()))) {
|
|
|
+ List<PushBaseDTO> pushMedicineBaseDTOS = neoPushDTO.getTreat().get(MedicalAdviceEnum.drug.getName());
|
|
|
+ pushDTO.setMedicines(pushMedicineBaseDTOS.subList(0, pushMedicineBaseDTOS.size() >= length ? length : pushMedicineBaseDTOS.size()));
|
|
|
+ }
|
|
|
+ // 手术
|
|
|
+ if (ruleTypeList.contains("9") && neoPushDTO.getTreat() != null && ListUtil.isNotEmpty(neoPushDTO.getTreat().get(MedicalAdviceEnum.operation.getName()))) {
|
|
|
+ List<PushBaseDTO> pushOperationBaseDTOS = neoPushDTO.getTreat().get(MedicalAdviceEnum.operation.getName());
|
|
|
+ pushDTO.setMedicines(pushOperationBaseDTOS.subList(0, pushOperationBaseDTOS.size() >= length ? length : pushOperationBaseDTOS.size()));
|
|
|
+ }
|
|
|
}
|
|
|
Map<String, List<PushBaseDTO>> dis = pushDTO.getDis();
|
|
|
//推送诊断
|
|
|
if (ruleTypeList.contains("7")) {
|
|
|
List<PushBaseDTO> fiterDiseases = push.stream().map(x -> x.getDisease()).filter(y -> !typeWords.get(StandConvertEnum.disease.getName()).contains(y.getName())).collect(Collectors.toList());
|
|
|
-// pushDTO.setDis(fiterDiseases.subList(0, fiterDiseases.size() >= length ? length : fiterDiseases.size()));
|
|
|
List<PushBaseDTO> pushBaseDTOS = fiterDiseases.subList(0, fiterDiseases.size() >= length ? length : fiterDiseases.size());
|
|
|
- dis.put("可能诊断",pushBaseDTOS);
|
|
|
- pushDTO.setDis(dis);
|
|
|
+ dis.put(DiseaseTypeEnum.possibleDis.getName(),pushBaseDTOS);
|
|
|
+
|
|
|
+ List<List<String>> differenrDisList = push.stream().filter(x -> ListUtil.isNotEmpty(x.getDifferentialDis())).map(y -> y.getDifferentialDis().stream().map(
|
|
|
+ z -> z.getName()).collect(Collectors.toList())).collect(Collectors.toList());
|
|
|
+ List<String> differentDises = new ArrayList<>();
|
|
|
+ differenrDisList.forEach(
|
|
|
+ x ->{
|
|
|
+ differentDises.removeAll(x);
|
|
|
+ differentDises.addAll(x);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ List<PushBaseDTO> filterDifferentDis = differentDises.subList(0, differentDises.size() >= length ? length : differentDises.size()).stream().map(x -> {
|
|
|
+ PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+ pushBaseDTO.setName(x);
|
|
|
+ return pushBaseDTO;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ dis.put(DiseaseTypeEnum.identify.getName(),filterDifferentDis);
|
|
|
}
|
|
|
|
|
|
}
|