|
@@ -34,6 +34,7 @@ public class GraphCalculate {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
private static Neo4jAPI neo4jAPI ;
|
|
private static Neo4jAPI neo4jAPI ;
|
|
|
|
+ private static Map<String,List<String>> mergeMap;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 返回诊断和治疗
|
|
* 返回诊断和治疗
|
|
@@ -84,7 +85,6 @@ public class GraphCalculate {
|
|
//处理血肌酐
|
|
//处理血肌酐
|
|
List<PreResult> lisArr = searchData.getLis();
|
|
List<PreResult> lisArr = searchData.getLis();
|
|
String serumCreatinine = processSerumcreatinine(lisArr);
|
|
String serumCreatinine = processSerumcreatinine(lisArr);
|
|
-
|
|
|
|
//计算诊断
|
|
//计算诊断
|
|
Map<String, Object> condition =null;
|
|
Map<String, Object> condition =null;
|
|
Map<String, Map<String, String>> excludelist = null;
|
|
Map<String, Map<String, String>> excludelist = null;
|
|
@@ -158,6 +158,7 @@ public class GraphCalculate {
|
|
idns.addAll(idn);
|
|
idns.addAll(idn);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ mergerIndex(newindSet1,mergeMap);
|
|
if(newindSet1 != null && newindSet1.size()>0){
|
|
if(newindSet1 != null && newindSet1.size()>0){
|
|
for (String ind:newindSet1
|
|
for (String ind:newindSet1
|
|
) {
|
|
) {
|
|
@@ -186,6 +187,38 @@ public class GraphCalculate {
|
|
return responseData;
|
|
return responseData;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 合并指标
|
|
|
|
+ * @param newindSet
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private Set<String> mergerIndex(Set<String> newindSet,Map<String,List<String>> merge){
|
|
|
|
+ Map<String, List<String>> mergeInit = mergeInit(merge);
|
|
|
|
+ if(newindSet != null && newindSet.size()>0){
|
|
|
|
+ for (Map.Entry<String, List<String>> ds:mergeInit.entrySet()) {
|
|
|
|
+ String key = ds.getKey();
|
|
|
|
+ List<String> values = ds.getValue();
|
|
|
|
+ boolean b = newindSet.retainAll(values);
|
|
|
|
+ if(newindSet.contains(key) && b ){
|
|
|
|
+ newindSet.remove(key);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ return newindSet;
|
|
|
|
+ }
|
|
|
|
+ private Map<String,List<String>> mergeInit(Map<String,List<String>> merge){
|
|
|
|
+ if(merge == null){
|
|
|
|
+ merge = new HashMap<>();
|
|
|
|
+ List<String> otherIn = new ArrayList<>();
|
|
|
|
+ otherIn.add("2型糖尿病");
|
|
|
|
+ otherIn.add("1型糖尿病");
|
|
|
|
+ otherIn.add("成人迟发性自身免疫糖尿病");
|
|
|
|
+ merge.put("糖尿病",otherIn);
|
|
|
|
+ }
|
|
|
|
+ return merge;
|
|
|
|
+ }
|
|
private Set<String> getQueNiDiagnose(Map<String, Object> condition) {
|
|
private Set<String> getQueNiDiagnose(Map<String, Object> condition) {
|
|
Set<String> diseaseSet =new HashSet<>();
|
|
Set<String> diseaseSet =new HashSet<>();
|
|
if(condition != null){
|
|
if(condition != null){
|