|
@@ -119,8 +119,8 @@ public class ClassifyDiag {
|
|
|
List<String> newBIgDiagList = this.removeKeng(queDiagList, bigDiagList);
|
|
|
System.out.println("图谱归一前数据 :"+queDiagList);
|
|
|
if(queDiagList != null && queDiagList.size()>0){
|
|
|
- //图谱归一
|
|
|
- Set<String> queSet = this.diagProcess(queDiagList);
|
|
|
+ //图谱归一 ,图谱sign =0,大数据sign = 1
|
|
|
+ Set<String> queSet = this.diagProcess(queDiagList,0);
|
|
|
System.out.println("图谱归一后的数据 :"+queSet);
|
|
|
if(queSet != null && queSet.size()>0){
|
|
|
for (String queDis:queSet) {
|
|
@@ -253,7 +253,7 @@ public class ClassifyDiag {
|
|
|
* @param disList
|
|
|
* @return
|
|
|
*/
|
|
|
- public Set<String> diagProcess(List<String> disList){
|
|
|
+ public Set<String> diagProcess(List<String> disList,int sign){
|
|
|
Set<String> first = new HashSet<>();
|
|
|
Set<String> second= new HashSet<>();
|
|
|
Set<String> third= new HashSet<>();
|
|
@@ -340,28 +340,32 @@ public class ClassifyDiag {
|
|
|
pushDiag.addAll(other); //归一后的
|
|
|
|
|
|
Set<String> finalList = new LinkedHashSet<>();
|
|
|
- Map<String,String> disRate = new HashMap<>();//诊断-->百分比
|
|
|
- for (String dis:disList) {
|
|
|
- int i = pushDiag.indexOf(dis);
|
|
|
- if(i >= 0){
|
|
|
- finalList.add(dis);
|
|
|
+ if(sign == 0){
|
|
|
+ finalList.addAll(pushDiag);
|
|
|
+ }else if(sign == 1){
|
|
|
+ for (String dis:disList) {
|
|
|
+ int i = pushDiag.indexOf(dis);
|
|
|
+ if(i >= 0){
|
|
|
+ finalList.add(dis);
|
|
|
|
|
|
- }else {
|
|
|
- List<Object> testList= new ArrayList<>();
|
|
|
- String s = diagClassifyCache.get(dis);
|
|
|
- if(StringUtils.isNotEmpty(s)){
|
|
|
- testList.add(s);
|
|
|
- }
|
|
|
- List<Object> key = this.getKey(diagClassifyCache, dis);
|
|
|
- boolean b = testList.addAll(key);
|
|
|
- for (Object dis1:testList) {
|
|
|
- if(pushDiag.indexOf(dis1)>=0){
|
|
|
- finalList.add(dis1.toString());
|
|
|
+ }else {
|
|
|
+ List<Object> testList= new ArrayList<>();
|
|
|
+ String s = diagClassifyCache.get(dis);
|
|
|
+ if(StringUtils.isNotEmpty(s)){
|
|
|
+ testList.add(s);
|
|
|
+ }
|
|
|
+ List<Object> key = this.getKey(diagClassifyCache, dis);
|
|
|
+ boolean b = testList.addAll(key);
|
|
|
+ for (Object dis1:testList) {
|
|
|
+ if(pushDiag.indexOf(dis1)>=0){
|
|
|
+ finalList.add(dis1.toString());
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return finalList;
|
|
|
|
|
|
}
|
|
@@ -375,7 +379,7 @@ public class ClassifyDiag {
|
|
|
public List<FeatureRate> sortFeatureList(List<String> diss,List<FeatureRate> updates){
|
|
|
DecimalFormat df = new DecimalFormat("0.####");
|
|
|
List<FeatureRate> sortFeatures = new LinkedList<>();
|
|
|
- Set<String> strings = this.diagProcess(diss);
|
|
|
+ Set<String> strings = this.diagProcess(diss,1);
|
|
|
|
|
|
Map<String,Double> disRate = new HashMap<>();
|
|
|
//归一确诊
|