Forráskód Böngészése

目前使用药物情况与现病史描述不一致

kongwz 5 éve
szülő
commit
43db5a6c03

+ 3 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02909.java

@@ -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("[“”药物晨晚]",""));
                     }
                 }