|
@@ -1,17 +1,14 @@
|
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
|
|
|
-import com.google.common.collect.Lists;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
-import com.lantone.qc.pub.model.entity.Family;
|
|
|
-import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
+import com.lantone.qc.pub.model.label.MaritalLabel;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
|
* @ClassName : BEH0472
|
|
@@ -25,9 +22,13 @@ public class BEH0472 extends QCCatalogue {
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
- Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
+ BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
+ if (beHospitalizedDoc == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> beHospitalStructureMap = beHospitalizedDoc.getStructureMap();
|
|
|
if (beHospitalStructureMap != null) {
|
|
|
- if (beHospitalStructureMap.get("性别") == null || beHospitalStructureMap.get("性别").contains("男")){
|
|
|
+ if (beHospitalStructureMap.get("性别") == null || beHospitalStructureMap.get("性别").contains("男")) {
|
|
|
status.set("0"); //如果性别是男,就不报错
|
|
|
return;
|
|
|
}
|
|
@@ -36,7 +37,11 @@ public class BEH0472 extends QCCatalogue {
|
|
|
|| StringUtil.isBlank(beHospitalStructureMap.get("早产"))
|
|
|
|| StringUtil.isBlank(beHospitalStructureMap.get("流产"));
|
|
|
if (fertilitySituation) {
|
|
|
- status.set("-1");
|
|
|
+ //如果结构化数据中上述条件缺少,则在婚育史中查找生育情况
|
|
|
+ MaritalLabel maritalLabel = beHospitalizedDoc.getMaritalLabel();//婚育史
|
|
|
+ if (maritalLabel == null || maritalLabel.getFertility() == null) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|