|
@@ -49,10 +49,11 @@ public class BEH02909 extends QCCatalogue {
|
|
|
/* 取现病史中一般情况之后的药品名称 */
|
|
|
if (StringUtil.isNotBlank(presentText) && medicines != null && medicines.size() > 0) {
|
|
|
String lastGeneral = generals.get(generals.size() - 1).getName();
|
|
|
- int lastGeneralIndex = presentText.indexOf(lastGeneral);
|
|
|
+ int lastGeneralIndex = presentText.lastIndexOf(lastGeneral);
|
|
|
for (Medicine medicine : medicines) {
|
|
|
/* 现病史中一般情况之后的药品名称,并且不包含不详 */
|
|
|
- if (presentText.indexOf(medicine.getName()) > lastGeneralIndex && !medicine.getName().contains("不详")) {
|
|
|
+ int medicine_index = presentText.indexOf(medicine.getName());
|
|
|
+ if (medicine_index > lastGeneralIndex && !medicine.getName().contains("不详")) {
|
|
|
drugFromPresent.add(medicine.getName().replaceAll("[“”药物晨晚]",""));
|
|
|
}
|
|
|
}
|