|
@@ -102,57 +102,9 @@ public class AIFacade {
|
|
|
FeatureRate item;
|
|
|
if (disFeatureMap.get("确诊") != null) {
|
|
|
items = getItems(disFeatureMap, "确诊", 1);
|
|
|
- // List<FeatureRate> featureRateList = disFeatureMap.get("确诊");
|
|
|
- // featureRateList = featureRateList
|
|
|
- // .stream()
|
|
|
- // .filter(i -> i.getExtraProperty() != null)
|
|
|
- // .collect(Collectors.toList());
|
|
|
- // if (ListUtil.isNotEmpty(featureRateList)) {
|
|
|
- // Map<String, List<FeatureRate>> disMap
|
|
|
- // = EntityUtil.makeEntityListMap(featureRateList, "extraProperty");
|
|
|
- // List<Map.Entry<String, List<FeatureRate>>> list = new ArrayList<Map.Entry<String, List<FeatureRate>>>(disMap.entrySet());
|
|
|
- // Collections.sort(list, new Comparator<Map.Entry<String, List<FeatureRate>>>() {
|
|
|
- // //降序排序
|
|
|
- // public int compare(Map.Entry<String, List<FeatureRate>> o1,
|
|
|
- // Map.Entry<String, List<FeatureRate>> o2) {
|
|
|
- // return Integer.compare(o2.getValue().size(), o1.getValue().size());
|
|
|
- // }
|
|
|
- // });
|
|
|
- // for (Map.Entry<String, List<FeatureRate>> entry : list) {
|
|
|
- // if (items.size() < 1) {
|
|
|
- // item = new FeatureRate();
|
|
|
- // item.setExtraProperty(entry.getKey());
|
|
|
- // items.add(item);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
}
|
|
|
if (disFeatureMap.get("拟诊") != null && ListUtil.isEmpty(items)) {
|
|
|
items = getItems(disFeatureMap, "拟诊", 2);
|
|
|
- // List<FeatureRate> featureRateList = disFeatureMap.get("拟诊");
|
|
|
- // featureRateList = featureRateList
|
|
|
- // .stream()
|
|
|
- // .filter(i -> i.getExtraProperty() != null)
|
|
|
- // .collect(Collectors.toList());
|
|
|
- // if (ListUtil.isNotEmpty(featureRateList)) {
|
|
|
- // Map<String, List<FeatureRate>> disMap
|
|
|
- // = EntityUtil.makeEntityListMap(featureRateList, "extraProperty");
|
|
|
- // List<Map.Entry<String, List<FeatureRate>>> list = new ArrayList<Map.Entry<String, List<FeatureRate>>>(disMap.entrySet());
|
|
|
- // Collections.sort(list, new Comparator<Map.Entry<String, List<FeatureRate>>>() {
|
|
|
- // //降序排序
|
|
|
- // public int compare(Map.Entry<String, List<FeatureRate>> o1,
|
|
|
- // Map.Entry<String, List<FeatureRate>> o2) {
|
|
|
- // return Integer.compare(o2.getValue().size(), o1.getValue().size());
|
|
|
- // }
|
|
|
- // });
|
|
|
- // for (Map.Entry<String, List<FeatureRate>> entry : list) {
|
|
|
- // if (items.size() < 2) {
|
|
|
- // item = new FeatureRate();
|
|
|
- // item.setExtraProperty(entry.getKey());
|
|
|
- // items.add(item);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
}
|
|
|
if (disFeatureMap.get("可能诊断") != null && ListUtil.isEmpty(items)) {
|
|
|
Double rate;
|