|
@@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import org.diagbot.common.work.Drugs;
|
|
|
import org.diagbot.common.work.Filnlly;
|
|
|
import org.diagbot.common.work.Medicition;
|
|
|
+import org.diagbot.graph.javabean.BackLisPacs;
|
|
|
+import org.diagbot.pub.utils.PropertiesUtil;
|
|
|
import org.neo4j.driver.v1.*;
|
|
|
import org.neo4j.driver.v1.types.Node;
|
|
|
import org.neo4j.driver.v1.types.Path;
|
|
@@ -30,6 +32,7 @@ public class Neo4jAPI {
|
|
|
int YY = calendar.get(Calendar.YEAR);
|
|
|
int MM = calendar.get(Calendar.MONTH) + 1;
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ssss");
|
|
|
+ PropertiesUtil propertiesUtil = new PropertiesUtil("bolt.properties");
|
|
|
|
|
|
public Neo4jAPI(Driver driver) {
|
|
|
this.driver = driver;
|
|
@@ -1232,7 +1235,43 @@ public class Neo4jAPI {
|
|
|
return riskMap;
|
|
|
}
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 反推LIS,PACS
|
|
|
+ * @param diseaseName
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public BackLisPacs getLisPacs(String diseaseName){
|
|
|
+ BackLisPacs backLisPacs = new BackLisPacs();
|
|
|
+ List<String> lisList = new ArrayList<>();
|
|
|
+ List<String> pacsList = new ArrayList<>();
|
|
|
+ Session session = null;
|
|
|
+ StatementResult result =null;
|
|
|
+ String serchLisPacs = propertiesUtil.getProperty("serchLisPacs");
|
|
|
+ String query = serchLisPacs.replace("diseaseNmae", diseaseName);
|
|
|
+ try {
|
|
|
+ session = driver.session(AccessMode.WRITE);
|
|
|
+ result = session.run(query);
|
|
|
+ while (result.hasNext()){
|
|
|
+ Record next = result.next();
|
|
|
+ String lei = next.get("lei").toString().replaceAll("\"","");
|
|
|
+ String name = next.get("n").toString().replaceAll("\"","");
|
|
|
+ if("LIS".equals(lei)){
|
|
|
+ lisList.add(name);
|
|
|
+ }else if("PACS".equals(lei)){
|
|
|
+ pacsList.add(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ backLisPacs.setDiseaseName(diseaseName);
|
|
|
+ backLisPacs.setLisList(lisList);
|
|
|
+ backLisPacs.setPacsList(pacsList);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
|
|
|
+ }finally {
|
|
|
+ CloseSession(session);
|
|
|
+ return backLisPacs;
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* 化验结果文本化
|
|
|
* @param lisres
|