|
@@ -51,21 +51,14 @@ public class GraphCalculate {
|
|
|
List<String> inputList = new ArrayList<>();
|
|
|
int age = searchData.getAge();
|
|
|
String sex = searchData.getSex();
|
|
|
- String diseaseName = searchData.getDiseaseName().getUniqueName();
|
|
|
- String webDiag = "";
|
|
|
- for (PreResult preResult : searchData.getDiagOrder()) {
|
|
|
- if (StringUtils.isEmpty(webDiag)) {
|
|
|
- webDiag = preResult.getUniqueName();
|
|
|
- } else {
|
|
|
- webDiag = webDiag + "," + preResult.getUniqueName();
|
|
|
- }
|
|
|
+ String diseaseName = "";
|
|
|
+ if (searchData.getDiseaseName() != null) {
|
|
|
+ diseaseName = searchData.getDiseaseName().getUniqueName();
|
|
|
}
|
|
|
- logger.info("页面诊断为 :"+webDiag);
|
|
|
- String[] webDiagList = webDiag.split(",|,|、|;|:|;");
|
|
|
logger.info("前端传来的年龄为 :"+age+" 前端传来的性别为 :"+sex);
|
|
|
Map<String, Map<String, String>> sexAgeCache = CacheUtil.getSexAgeCache();
|
|
|
Map<String, Map<String, String>> inputs = searchData.getGraphInputs();
|
|
|
- List<String> exculdDiagFilds = this.exculdDiagFilds(inputs,webDiagList,diseaseName);
|
|
|
+ List<String> exculdDiagFilds = this.exculdDiagFilds(inputs);
|
|
|
//从大数据解析分词
|
|
|
Set<String> ss = processParticiple(inputs);
|
|
|
logger.info("从分词系统接收到的词 :" + ss);
|
|
@@ -78,7 +71,16 @@ public class GraphCalculate {
|
|
|
neo4jAPI = new Neo4jAPI(driver);
|
|
|
}
|
|
|
logger.info("图谱开始推送诊断!!!!!!!!!!!");
|
|
|
-
|
|
|
+ String webDiag = "";
|
|
|
+ for (PreResult preResult : searchData.getDiagOrder()) {
|
|
|
+ if (StringUtils.isEmpty(webDiag)) {
|
|
|
+ webDiag = preResult.getUniqueName();
|
|
|
+ } else {
|
|
|
+ webDiag = webDiag + "," + preResult.getUniqueName();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ logger.info("页面诊断为 :"+webDiag);
|
|
|
+ String[] webDiagList = webDiag.split(",|,|、|;|:|;");
|
|
|
//处理血肌酐
|
|
|
List<PreResult> lisArr = searchData.getLis();
|
|
|
String serumCreatinine = processSerumcreatinine(lisArr);
|
|
@@ -277,11 +279,10 @@ public class GraphCalculate {
|
|
|
}
|
|
|
return sc;
|
|
|
}
|
|
|
- private List<String> exculdDiagFilds(Map<String, Map<String, String>> inputs,String[] webDiagList,String disName){
|
|
|
+ private List<String> exculdDiagFilds(Map<String, Map<String, String>> inputs){
|
|
|
List<String> exculdDiagFilds = new ArrayList<>();
|
|
|
- String fildName ="";
|
|
|
if(inputs != null && inputs.size()>0){
|
|
|
-
|
|
|
+ String fildName ="";
|
|
|
for (Map.Entry<String, Map<String, String>> fild:inputs.entrySet()) {
|
|
|
fildName = fild.getKey();
|
|
|
Map<String, String> value = fild.getValue();
|
|
@@ -297,22 +298,6 @@ public class GraphCalculate {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- try{
|
|
|
- if(webDiagList!=null && webDiagList.length>0){
|
|
|
- for (String wd:webDiagList) {
|
|
|
- if(wd != null && !disName.equals(wd)){
|
|
|
- fildName = "'"+wd+"'";
|
|
|
- if(!exculdDiagFilds.contains(fildName)){
|
|
|
- exculdDiagFilds.add(fildName);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
-
|
|
|
return exculdDiagFilds;
|
|
|
}
|
|
|
}
|