Browse Source

Merge remote-tracking branch 'origin/shaoyf/dev' into shaoyf/master

wangsy 4 năm trước cách đây
mục cha
commit
e9daae48a4

+ 2 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0013.java

@@ -33,13 +33,11 @@ public class BEH0013 extends QCCatalogue {
         PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
         //既往史
         PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
-        if ((presentLabel == null || StringUtil.isBlank(presentLabel.getText())) && StringUtil.isBlank(pastLabel.getText())) {
+        if ((presentLabel == null || StringUtil.isBlank(presentLabel.getText()) || "。".equals(presentLabel.getText()))
+                && (StringUtil.isBlank(pastLabel.getText()) || "。".equals(pastLabel.getText()))) {
             return;
         }
         String text = presentLabel.getText();
-        if("。".equals(text)){
-           return;
-        }
         if (StringUtil.isNotBlank(text)) {
             if ((text.contains("无") || text.contains("否认")) && !text.contains("诱因")) {
                 return;

+ 2 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0014.java

@@ -50,7 +50,8 @@ public class BEH0014 extends QCCatalogue {
         PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
         //既往史
         PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
-        if ((presentLabel == null || StringUtil.isBlank(presentLabel.getText())) && StringUtil.isBlank(pastLabel.getText())) {
+        if ((presentLabel == null || StringUtil.isBlank(presentLabel.getText()) || "。".equals(presentLabel.getText()))
+                && (StringUtil.isBlank(pastLabel.getText()) || "。".equals(pastLabel.getText()))) {
             status.set("0");
             return;
         }
@@ -65,10 +66,6 @@ public class BEH0014 extends QCCatalogue {
         }
         //硬规则匹配 前30个字有"体检"或"发现"或"检查"(containList)字样
         String present = presentLabel.getText();
-        if("。".equals(present)){
-            status.set("0");
-            return;
-        }
         if (StringUtils.isNotEmpty(present)) {
             if (present.length() > 30) {
                 present = present.substring(0, 30);

+ 10 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02988.java

@@ -31,7 +31,9 @@ public class BEH02988 extends QCCatalogue {
         if (beHospitalizedDoc == null) {
             return;
         }
-        if (StringUtil.isBlank(chiefLabel.getText()) && (StringUtil.isNotBlank(presentLabel.getText()) || StringUtil.isNotBlank(pastLabel.getText()))) {
+        boolean isCorrectPresent = isPeriod(presentLabel.getText());
+        boolean isCorrectPast = isPeriod(pastLabel.getText());
+        if (StringUtil.isBlank(chiefLabel.getText()) && (isCorrectPresent || isCorrectPast)) {
             status.set("-1");
             return;
         }
@@ -39,4 +41,11 @@ public class BEH02988 extends QCCatalogue {
             status.set("-1");
         }
     }
+
+    private boolean isPeriod(String text) {
+        if (StringUtil.isNotBlank(text) && !"。".equals(text)) {
+            return true;
+        }
+        return false;
+    }
 }