|
@@ -198,6 +198,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;
|
|
|
int allergyNum = 0;
|
|
|
for (Allergy dg : allergys) {
|
|
|
String dgname = dg.getName();
|
|
@@ -212,8 +213,8 @@ public class BEH02980 extends QCCatalogue {
|
|
|
allergyNum = 2;
|
|
|
}
|
|
|
} else {
|
|
|
- int index = text.lastIndexOf(dgname);
|
|
|
- text = text.substring(Math.max(0, index - 10), index);
|
|
|
+ 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("其它")) {
|
|
|
neg_diags.add(dgname);
|
|
|
dgs.add(dgname);
|