|
@@ -110,13 +110,6 @@ public class GraphCalculate {
|
|
|
starttime = System.currentTimeMillis();
|
|
|
//走治疗
|
|
|
if (StringUtils.isNotEmpty(diseaseName) && featureTypeList.contains(Constants.feature_type_treat)) {
|
|
|
- /* List<MedicalIndication> medicalIndications = responseData.getMedicalIndications();
|
|
|
- CrisisDetail shenGong = getShenGong(medicalIndications);
|
|
|
- if(shenGong !=null){
|
|
|
- List<CrisisDetail> crisis = crisisDetails.get("crisis");
|
|
|
- crisis.add(shenGong);
|
|
|
- crisisDetails.put("crisis",crisis);
|
|
|
- }*/
|
|
|
PushTreat pushTreat = new PushTreat();
|
|
|
Treat treat = pushTreat.processTreat(diseaseName,webDiag,diseaseType, driver, (String[]) inputList.toArray(new String[inputList.size()]),exculdDiagFilds, crisisDetails);
|
|
|
responseData.setTreat(treat);
|
|
@@ -163,7 +156,7 @@ public class GraphCalculate {
|
|
|
idns.addAll(idn);
|
|
|
}
|
|
|
}
|
|
|
-// newindSet1 = mergerIndex(newindSet1, mergeMap);
|
|
|
+ newindSet1 = mergerIndex(newindSet1, mergeMap);
|
|
|
if(newindSet1 != null && newindSet1.size()>0){
|
|
|
for (String ind:newindSet1
|
|
|
) {
|
|
@@ -192,81 +185,54 @@ public class GraphCalculate {
|
|
|
return responseData;
|
|
|
}
|
|
|
|
|
|
- private CrisisDetail getShenGong(List<MedicalIndication> medicalIndications){
|
|
|
- CrisisDetail crisisDetail = new CrisisDetail();
|
|
|
- if(medicalIndications != null && medicalIndications.size()>0){
|
|
|
- for (MedicalIndication m:medicalIndications) {
|
|
|
- String name = m.getName();
|
|
|
- if("肾功能不全".equals(name)){
|
|
|
- List<MedicalIndicationDetail> details = m.getDetails();
|
|
|
- if(details != null && details.size()>0){
|
|
|
- for (MedicalIndicationDetail med:details) {
|
|
|
- Integer type = med.getType();
|
|
|
- if(type == 2){
|
|
|
- JSONObject content = med.getContent();
|
|
|
- if(content!= null){
|
|
|
- List<JSONObject> results = (List<JSONObject>) content.get("result");
|
|
|
- if(results != null && results.size()>0){
|
|
|
- for (JSONObject j:results) {
|
|
|
- String pr = j.getString("评估结论");
|
|
|
- if(StringUtils.isNotEmpty(pr)){
|
|
|
- if("重度肾功能不全".equals(pr)){
|
|
|
- pr = "肾功能不全:重度";
|
|
|
- }else if("中度肾功能不全".equals(pr)){
|
|
|
- pr = "肾功能不全:中度";
|
|
|
- }else if("轻度肾功能不全".equals(pr)){
|
|
|
- pr = "肾功能不全:轻度";
|
|
|
- }else if("肾功能正常".equals(pr)){
|
|
|
- pr = "肾功能:正常";
|
|
|
- }
|
|
|
- crisisDetail.setRemindText(pr);
|
|
|
- crisisDetail.setTypeId("4");
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return crisisDetail;
|
|
|
- }
|
|
|
/**
|
|
|
* 合并指标
|
|
|
* @param newindSet
|
|
|
* @return
|
|
|
*/
|
|
|
private Set<String> mergerIndex(Set<String> newindSet,Map<String,List<String>> merge){
|
|
|
+ Map<String,List<String>> disColl = new HashMap<>();
|
|
|
Set<String> newindSetResult = new HashSet<>();
|
|
|
Map<String, List<String>> mergeInit = mergeInit(merge);
|
|
|
if(newindSet != null && newindSet.size()>0){
|
|
|
for (Map.Entry<String, List<String>> ds:mergeInit.entrySet()) {
|
|
|
String key = ds.getKey();
|
|
|
- List<String> values = ds.getValue();
|
|
|
if(newindSet.contains(key)){
|
|
|
Iterator<String> iterator = newindSet.iterator();
|
|
|
while (iterator.hasNext()){
|
|
|
String next = iterator.next();
|
|
|
// values ["2型糖尿病","1型糖尿病","成人迟发性自身免疫糖尿病"]
|
|
|
// newindSet ["糖尿病","糖尿病足"]
|
|
|
- if(values.contains(next)){
|
|
|
- newindSetResult.add(next);
|
|
|
- }else {
|
|
|
- if(!mergeInit.containsKey(next)){
|
|
|
-
|
|
|
+ if(key.equals(next)){
|
|
|
+ List<String> disList = new ArrayList<>();
|
|
|
+ for (String dis:newindSet) {
|
|
|
+ if(!dis.equals(key)){
|
|
|
+ disList.add(dis);
|
|
|
+ }
|
|
|
}
|
|
|
+ disColl.put(key,disList);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+ if(disColl != null && disColl.size()>0){
|
|
|
+ for (Map.Entry<String,List<String>> disList:disColl.entrySet()) {
|
|
|
+ String key1 = disList.getKey();
|
|
|
+ List<String> value = disList.getValue();
|
|
|
+ if(value.size() == 0){
|
|
|
+ newindSetResult.add(key1);
|
|
|
+ }else {
|
|
|
+ for (String dis:value
|
|
|
+ ) {
|
|
|
+ if(!dis.equals(key1)){
|
|
|
+ newindSetResult.add(dis);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ newindSetResult = newindSet;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
return newindSetResult;
|
|
|
}
|