|
@@ -83,21 +83,21 @@ public class BEH02980 extends QCCatalogue {
|
|
|
if (pastLabel != null && StringUtils.isNotEmpty(pastLabel.getText())) {
|
|
|
extract_diags(pastLabel.getDiags(), pos_diags, neg_diags);
|
|
|
//否认其他的情况
|
|
|
- String pasttext=pastLabel.getText();
|
|
|
+ String pasttext = pastLabel.getText();
|
|
|
//冠状动脉支架植入术特殊情况,只要出现,就从否认的史中去掉
|
|
|
- if(neg_diags.contains("冠状动脉支架植入术")){
|
|
|
+ if (neg_diags.contains("冠状动脉支架植入术")) {
|
|
|
neg_diags.remove("冠状动脉支架植入术");
|
|
|
}
|
|
|
- String neg_diags_first [] = pasttext.split("否认");
|
|
|
+ String neg_diags_first[] = pasttext.split("否认");
|
|
|
for (String str1 : neg_diags_first) {
|
|
|
- String neg_diags_second [] = str1.split("、");
|
|
|
+ String neg_diags_second[] = str1.split("、");
|
|
|
for (String str2 : neg_diags_second) {
|
|
|
for (String neg_diag : neg_diags) {
|
|
|
- if(str2.contains(neg_diag)){
|
|
|
- String str3 = str2.substring(0,str2.indexOf(neg_diag));
|
|
|
- if(str3.contains("其它") || str3.contains("其他")) {
|
|
|
- int index= neg_diags.indexOf(neg_diag);
|
|
|
- neg_diags.set(index,"其它的");
|
|
|
+ if (str2.contains(neg_diag)) {
|
|
|
+ String str3 = str2.substring(0, str2.indexOf(neg_diag));
|
|
|
+ if (str3.contains("其它") || str3.contains("其他")) {
|
|
|
+ int index = neg_diags.indexOf(neg_diag);
|
|
|
+ neg_diags.set(index, "其它的");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -202,7 +202,7 @@ public class BEH02980 extends QCCatalogue {
|
|
|
//过敏史
|
|
|
private List<String> extract_Allergy(List<Allergy> allergys, List<String> pos_diags, List<String> neg_diags, String text) {
|
|
|
List<String> dgs = new ArrayList<>();
|
|
|
- String content =text;
|
|
|
+ String content = text;
|
|
|
int allergyNum = 0;
|
|
|
for (Allergy dg : allergys) {
|
|
|
String dgname = dg.getName();
|
|
@@ -219,15 +219,15 @@ public class BEH02980 extends QCCatalogue {
|
|
|
} else {
|
|
|
int index = content.lastIndexOf(dgname);
|
|
|
text = content.substring(Math.max(0, index - 10), index);
|
|
|
- if (allergyNum == 0 && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它")) {
|
|
|
+ if (allergyNum == 0 && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它") && !text.contains("其余")) {
|
|
|
neg_diags.add(dgname);
|
|
|
dgs.add(dgname);
|
|
|
}
|
|
|
- if (allergyNum == 1 && text.contains("食物") && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它")) {
|
|
|
+ if (allergyNum == 1 && text.contains("食物") && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它") && !text.contains("其余")) {
|
|
|
neg_diags.add(dgname);
|
|
|
dgs.add(dgname);
|
|
|
}
|
|
|
- if (allergyNum == 2 && text.contains("药物") && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它")) {
|
|
|
+ if (allergyNum == 2 && text.contains("药物") && !neg_diags.contains(dgname) && !text.contains("其他") && !text.contains("其它") && !text.contains("其余")) {
|
|
|
neg_diags.add(dgname);
|
|
|
dgs.add(dgname);
|
|
|
}
|