Browse Source

修改bug

zhoutg 5 years ago
parent
commit
3743d719ce

+ 15 - 8
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP02992.java

@@ -6,7 +6,6 @@ import com.lantone.qc.kernel.util.RegularUtil;
 import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
-import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -37,16 +36,24 @@ public class FIRP02992 extends QCCatalogue {
             beDrugAllergy = StringUtil.isBlank(beDrugAllergy) ? "" : beDrugAllergy;
             beDrugAllergy = RegularUtil.ClearBracket(beDrugAllergy); // 括号内容不匹配
 
-            // “未发现” == “否认”
-            if ("未发现".equals(beDrugAllergy) || StringUtil.isBlank(fpAllergyDrug) || "否认".equals(beDrugAllergy)) {
+            if (StringUtil.isBlank(fpAllergyDrug) || StringUtil.isBlank(beDrugAllergy)) {
                 return ;
             }
-            if (!fpAllergyDrug.equals(beDrugAllergy)) {
-                String regx = ";|;|,|,|、| ";
-                List<String> fpList = Lists.newArrayList(fpAllergyDrug.split(regx));
-                List<String> beList = Lists.newArrayList(beDrugAllergy.split(regx));
-                if (!ListUtil.equals(fpList, beList)) {
+            // “未发现” == “否认”`
+            if (("未发现".equals(fpAllergyDrug) && "否认".equals(beDrugAllergy))
+                    || ("否认".equals(fpAllergyDrug) && "未发现".equals(beDrugAllergy))) {
+                return ;
+            }
+            if (beDrugAllergy.contains(fpAllergyDrug)) {
+                return ;
+            }
+            String regx = ";|;|,|,|、| ";
+            List<String> fpList = Lists.newArrayList(fpAllergyDrug.split(regx));
+            // 全部包含
+            for (String s : fpList) {
+                if (!beDrugAllergy.contains(s)) {
                     status.set("-1");
+                    return ;
                 }
             }
         }