|
@@ -11,6 +11,8 @@ import org.neo4j.driver.v1.*;
|
|
|
import org.neo4j.driver.v1.types.Node;
|
|
|
import org.neo4j.driver.v1.types.Path;
|
|
|
import org.neo4j.driver.v1.types.Relationship;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
|
import java.io.FileWriter;
|
|
|
import java.io.IOException;
|
|
@@ -27,6 +29,7 @@ import java.util.regex.Pattern;
|
|
|
*/
|
|
|
|
|
|
public class Neo4jAPI {
|
|
|
+ Logger logger = LoggerFactory.getLogger(Neo4jAPI.class);
|
|
|
Driver driver = null;
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
int YY = calendar.get(Calendar.YEAR);
|
|
@@ -639,7 +642,6 @@ public class Neo4jAPI {
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String, String> getCondition(String[] keys) {
|
|
|
- Map<String, String> conditionMap = new LinkedHashMap<>();
|
|
|
Map<String, String> diseaseCondition = new LinkedHashMap<>();
|
|
|
List<String> newList = new ArrayList<>();
|
|
|
ArrayList<String> fildList = new ArrayList<>();
|
|
@@ -648,6 +650,7 @@ public class Neo4jAPI {
|
|
|
for (String fild : keys) {
|
|
|
fildList.add("\"" + fild.trim() + "\"");
|
|
|
}
|
|
|
+ logger.info("根据 "+fildList+" 这些词推送图谱诊断!!!");
|
|
|
Session session = null;
|
|
|
StatementResult result = null;
|
|
|
String query = "";
|
|
@@ -727,6 +730,7 @@ public class Neo4jAPI {
|
|
|
Map<String, String> dis_res = new HashMap<>();
|
|
|
dis_res.put("确诊", "");
|
|
|
diseaseCondition.put(qu, JSON.toJSONString(dis_res));
|
|
|
+ logger.info("图谱推出的诊断为: "+qu);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|