|
@@ -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)) {
|