|
@@ -18,6 +18,7 @@ import java.util.*;
|
|
|
|
|
|
import org.diagbot.common.javabean.MedicalIndication;
|
|
|
import org.diagbot.common.javabean.MedicalIndicationDetail;
|
|
|
+import org.diagbot.graph.util.CacheUtil;
|
|
|
import org.diagbot.graphWeb.util.MapValueComparator;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -38,8 +39,12 @@ public class GraphCalculate {
|
|
|
// ParamsDataProxy paramsDataProxy = new ParamsDataProxy();
|
|
|
// paramsDataProxy.createSearchData(request, searchData);
|
|
|
List<String> inputList = new ArrayList<>();
|
|
|
+ int age = searchData.getAge();
|
|
|
+ String sex = searchData.getSex();
|
|
|
+ logger.info("前端传来的年龄为 :"+age+" 前端传来的性别为 :"+sex);
|
|
|
//获取缓存
|
|
|
-// Map<String, String> lexionCache = CacheUtil.getLexionCache();
|
|
|
+ Map<String, String> lexionCache = CacheUtil.getLexionCache();
|
|
|
+ Map<String, Map<String, String>> sexAgeCache = CacheUtil.getSexAgeCache();
|
|
|
Map<String, Map<String, String>> inputs = searchData.getInputs();
|
|
|
Set<String> ss = new HashSet<>();
|
|
|
if(inputs.size()>0){
|
|
@@ -69,14 +74,21 @@ public class GraphCalculate {
|
|
|
List<FeatureRate> featureRates = new ArrayList<>();
|
|
|
if(condition != null){
|
|
|
for (Map.Entry<String, Map<String,String>> d : condition.entrySet()) {
|
|
|
- FeatureRate featureRate = new FeatureRate();
|
|
|
- featureRate.setFeatureName(d.getKey());
|
|
|
- featureRate.setExtraProperty("");
|
|
|
- Map<String, String> value = d.getValue();
|
|
|
- String s = JSON.toJSONString(value);
|
|
|
- featureRate.setDesc(s);
|
|
|
- featureRate.setRate("neo4j");
|
|
|
- featureRates.add(featureRate);
|
|
|
+ String dis = d.getKey();
|
|
|
+ Map<String, String> sexAgeMap = sexAgeCache.get(dis);
|
|
|
+ if(sexAgeMap != null){
|
|
|
+ String sexType = sexAgeMap.get("sexType");
|
|
|
+ if(sex.equals(sexType)){
|
|
|
+ FeatureRate featureRate = new FeatureRate();
|
|
|
+ featureRate.setFeatureName(dis);
|
|
|
+ featureRate.setExtraProperty("");
|
|
|
+ Map<String, String> value = d.getValue();
|
|
|
+ String s = JSON.toJSONString(value);
|
|
|
+ featureRate.setDesc(s);
|
|
|
+ featureRate.setRate("neo4j");
|
|
|
+ featureRates.add(featureRate);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
Set<String> diseaseSet =null;
|
|
@@ -120,8 +132,7 @@ public class GraphCalculate {
|
|
|
responseData.setManagementEvaluation(mangementEvaluation1);
|
|
|
}
|
|
|
}
|
|
|
- int age = searchData.getAge();
|
|
|
- String sex = searchData.getSex();
|
|
|
+
|
|
|
//指标推送
|
|
|
if (featureTypeList.contains("22") ) {
|
|
|
//查找指标
|