|
@@ -8,9 +8,7 @@ import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.NeoUtil;
|
|
import com.diagbot.util.NeoUtil;
|
|
import com.diagbot.vo.NeoPushVO;
|
|
import com.diagbot.vo.NeoPushVO;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Set;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
public class YiBaoDiseaseNode {
|
|
public class YiBaoDiseaseNode {
|
|
@@ -28,16 +26,21 @@ public class YiBaoDiseaseNode {
|
|
pushBaseDTO = new PushBaseDTO();
|
|
pushBaseDTO = new PushBaseDTO();
|
|
pushBaseDTO.setName(disease.getName());
|
|
pushBaseDTO.setName(disease.getName());
|
|
pushDTO.setDisease(pushBaseDTO);
|
|
pushDTO.setDisease(pushBaseDTO);
|
|
- Set<Symptom> symptoms = disease.getSymptoms();
|
|
|
|
-// disease.getSymptoms().stream().collect(Collectors.toMap(Symptom::getName,Symptom::getNodeId,(e1, e2) -> e2)))
|
|
|
|
|
|
+ pushDTO.setSymptoms(disease.getSymptoms().stream().collect(Collectors.toMap(Symptom::getName,Symptom::getNodeId,(e1, e2) -> e2))
|
|
|
|
+ .entrySet().stream().sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
|
|
|
|
+ .map(x ->NeoUtil.updatePushInfo(x.getKey())).collect(Collectors.toList()));
|
|
|
|
|
|
- pushDTO.setSymptoms(disease.getSymptoms().stream().map(x ->NeoUtil.updatePushInfo(x.getName())).collect(Collectors.toList()));
|
|
|
|
|
|
+ pushDTO.setVitals(disease.getVitals().stream().collect(Collectors.toMap(Vital::getName,Vital::getNodeId,(e1, e2) -> e2))
|
|
|
|
+ .entrySet().stream().sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
|
|
|
|
+ .map(x ->NeoUtil.updatePushInfo(x.getKey())).collect(Collectors.toList()));
|
|
|
|
|
|
- pushDTO.setVitals(disease.getVitals().stream().map(x ->NeoUtil.updatePushInfo(x.getName())).collect(Collectors.toList()));
|
|
|
|
|
|
+ pushDTO.setLis(disease.getLisnames().stream().collect(Collectors.toMap(LisName::getName,LisName::getNodeId,(e1, e2) -> e2))
|
|
|
|
+ .entrySet().stream().sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
|
|
|
|
+ .map(x ->NeoUtil.updatePushInfo(x.getKey())).collect(Collectors.toList()));
|
|
|
|
|
|
- pushDTO.setLis(disease.getLisnames().stream().map(x ->NeoUtil.updatePushInfo(x.getName())).collect(Collectors.toList()));
|
|
|
|
-
|
|
|
|
- pushDTO.setPacs(disease.getPacsnames().stream().map(x ->NeoUtil.updatePushInfo(x.getName())).collect(Collectors.toList()));
|
|
|
|
|
|
+ pushDTO.setPacs(disease.getPacsnames().stream().collect(Collectors.toMap(PacsName::getName,PacsName::getNodeId,(e1, e2) -> e2))
|
|
|
|
+ .entrySet().stream().sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
|
|
|
|
+ .map(x ->NeoUtil.updatePushInfo(x.getKey())).collect(Collectors.toList()));
|
|
|
|
|
|
|
|
|
|
|
|
|