|
@@ -371,7 +371,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取化验和辅检
|
|
|
+ * 获取化验和辅检,体征结果
|
|
|
* @param searchData
|
|
|
* @return
|
|
|
*/
|
|
@@ -414,20 +414,24 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
}
|
|
|
}
|
|
|
logger.info("界面诊断为: " + webDiagList);
|
|
|
- Map<String, LinkedHashSet<String>> weblisPacs = null;
|
|
|
- Map<String, LinkedHashSet<String>> neo4jlisPacs = null;
|
|
|
- Map<String, LinkedHashSet<String>> biglisPacs = null;
|
|
|
+ Map<String, LinkedHashSet<String>> weblisPacs = null,webVital = null;
|
|
|
+ Map<String, LinkedHashSet<String>> neo4jlisPacs = null,neo4jVital = null;
|
|
|
+ Map<String, LinkedHashSet<String>> biglisPacs = null,bigVital = null;
|
|
|
if (webDiagList != null && webDiagList.size() > 0) {
|
|
|
weblisPacs = processLisPacs(webDiagList);
|
|
|
+ webVital = processVital(webDiagList);
|
|
|
}
|
|
|
if (neo4jDiagList != null && neo4jDiagList.size() > 0) {
|
|
|
neo4jlisPacs = processLisPacs(neo4jDiagList);
|
|
|
+ neo4jVital = processVital(neo4jDiagList);
|
|
|
}
|
|
|
if (bigdataDiagList != null && bigdataDiagList.size() > 0) {
|
|
|
biglisPacs = processLisPacs(bigdataDiagList);
|
|
|
+ bigVital = processVital(bigdataDiagList);
|
|
|
}
|
|
|
Set<String> lis = new LinkedHashSet<>();
|
|
|
Set<String> pacs = new LinkedHashSet<>();
|
|
|
+ Set<String> vitalReultSet = new LinkedHashSet<>();
|
|
|
Set<String> webLis = null;
|
|
|
Set<String> webPacs = null;
|
|
|
Set<String> neoLis = null;
|
|
@@ -446,6 +450,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
if(webPacs != null){
|
|
|
pacs.addAll(webPacs);
|
|
|
}
|
|
|
+ vitalReultSet.addAll(webVital.get("VITAL_RESULT"));
|
|
|
}
|
|
|
if(neo4jlisPacs != null){
|
|
|
neoLis = neo4jlisPacs.get("LIS");
|
|
@@ -456,6 +461,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
if(neoPacs != null){
|
|
|
pacs.addAll(neoPacs);
|
|
|
}
|
|
|
+ vitalReultSet.addAll(neo4jVital.get("VITAL_RESULT"));
|
|
|
}
|
|
|
if(biglisPacs != null){
|
|
|
bigLis = biglisPacs.get("LIS");
|
|
@@ -466,11 +472,14 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
if(bigPacs != null){
|
|
|
pacs.addAll(bigPacs);
|
|
|
}
|
|
|
+ vitalReultSet.addAll(bigVital.get("VITAL_RESULT"));
|
|
|
}
|
|
|
logger.info("推出的合并lis为: " + lis);
|
|
|
logger.info("推出的合并pacs为: " + pacs);
|
|
|
+ logger.info("推出的合并体征结果为: " + vitalReultSet);
|
|
|
ArrayList<FeatureRate> lisFeature = new ArrayList<>();
|
|
|
ArrayList<FeatureRate> pacsFeature = new ArrayList<>();
|
|
|
+ ArrayList<FeatureRate> vitalFeature = new ArrayList<>();
|
|
|
if (lis != null && lis.size() > 0 && featureList.contains("4")) {
|
|
|
List<String> newLis = new ArrayList<>();
|
|
|
if(lis.size()>searchData.getLength()){
|
|
@@ -489,14 +498,42 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
}
|
|
|
}
|
|
|
if (pacs != null && pacs.size() > 0 && featureList.contains("5")) {
|
|
|
- for (String p : pacs) {
|
|
|
+ List<String> newPacs = new ArrayList<>();
|
|
|
+ if(pacs.size()>searchData.getLength()){
|
|
|
+ for (String l:pacs) {
|
|
|
+ if(newPacs.size()<searchData.getLength()){
|
|
|
+ newPacs.add(l);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ newPacs.addAll(pacs);
|
|
|
+ }
|
|
|
+ for (String p : newPacs) {
|
|
|
FeatureRate featureRate = new FeatureRate();
|
|
|
featureRate.setFeatureName(p);
|
|
|
pacsFeature.add(featureRate);
|
|
|
}
|
|
|
}
|
|
|
+ if(vitalReultSet.size() > 0){
|
|
|
+ List<String> newVitalRes = new ArrayList<>();
|
|
|
+ if(vitalReultSet.size()>searchData.getLength()){
|
|
|
+ for (String l:vitalReultSet) {
|
|
|
+ if(newVitalRes.size()<searchData.getLength()){
|
|
|
+ newVitalRes.add(l);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ newVitalRes.addAll(vitalReultSet);
|
|
|
+ }
|
|
|
+ for (String p : newVitalRes) {
|
|
|
+ FeatureRate featureRate = new FeatureRate();
|
|
|
+ featureRate.setFeatureName(p);
|
|
|
+ vitalFeature.add(featureRate);
|
|
|
+ }
|
|
|
+ }
|
|
|
lisPacsFeature.put("lisList", lisFeature);
|
|
|
lisPacsFeature.put("pacsList", pacsFeature);
|
|
|
+ lisPacsFeature.put("vitalResultList",vitalFeature);
|
|
|
|
|
|
return lisPacsFeature;
|
|
|
}
|
|
@@ -520,6 +557,24 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
return fildInNumber;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询体征
|
|
|
+ * @param webDiagList
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, LinkedHashSet<String>> processVital(List<String> webDiagList) {
|
|
|
+ Map<String, LinkedHashSet<String>> vitalMap = new HashMap<>();
|
|
|
+ LinkedHashSet<String> vitalResultArray = new LinkedHashSet<>();//体征结果
|
|
|
+ List<Map<String, Object>> vitalList = baseNodeRepository.getVitalList(webDiagList);
|
|
|
+ if (vitalList != null && vitalList.size() > 0) {
|
|
|
+ for (Map<String, Object> f : vitalList) {
|
|
|
+ String name = f.get("name").toString();
|
|
|
+ vitalResultArray.add(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vitalMap.put("VITAL_RESULT", vitalResultArray);
|
|
|
+ return vitalMap;
|
|
|
+ }
|
|
|
/**
|
|
|
* 根据内容推出不良反应集合
|
|
|
*
|