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

杭州七院逻辑处理

wangsy 4 éve
szülő
commit
4283e040db

+ 13 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hangzhoudiqi/firstpagerecord/FIRP0169.java

@@ -6,6 +6,8 @@ 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.model.entity.BeHospitalizedWay;
+import com.lantone.qc.pub.model.label.PersonalLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -25,12 +27,21 @@ public class FIRP0169 extends QCCatalogue {
                 && inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getPresentLabel() != null) {
             Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
             String admitPath = firstpageStructureMap.get(Content.admitPath);
-            BeHospitalizedWay beHospitalizedWay = inputInfo.getBeHospitalizedDoc().getPresentLabel().getBeHospitalizedWay();
+            PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+            if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+                status.set("0");
+                return;
+            }
+            BeHospitalizedWay beHospitalizedWay = presentLabel.getBeHospitalizedWay();
             if (CatalogueUtil.isEmpty(admitPath) || beHospitalizedWay == null) {
                 return;
             }
             String beHospitalizedWayStr = beHospitalizedWay.getName();
-            if (StringUtil.isBlank(beHospitalizedWayStr)){
+            if (StringUtil.isBlank(beHospitalizedWayStr)) {
+                return;
+            }
+            String presentText = presentLabel.getText();
+            if (StringUtil.isNotBlank(presentText) && presentText.contains(admitPath)) {
                 return;
             }
             if (!CatalogueUtil.compareToken(admitPath, beHospitalizedWayStr)) {