|
@@ -27,56 +27,46 @@ public class BEH0372 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- String basicInfoStatus = inputInfo.getBeHospitalizedDoc().getStructureMap().get("婚姻");
|
|
|
+ String basicInfoStatus = inputInfo.getBeHospitalizedDoc().getStructureMap().get("婚育史");
|
|
|
String bhbasicInfoStatus = inputInfo.getBeHospitalizedDoc().getStructureMap().get("婚姻状况");
|
|
|
if (StringUtil.isBlank(basicInfoStatus) || StringUtil.isBlank(bhbasicInfoStatus)) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if (basicInfoStatus.equals(bhbasicInfoStatus)) {
|
|
|
+ if(StringUtil.isNotBlank(bhbasicInfoStatus) && basicInfoStatus.equals("其他")){
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
- String maritalStatus = "";
|
|
|
- MaritalStatus mts = inputInfo.getBeHospitalizedDoc().getMaritalLabel().getMaritalStatus();
|
|
|
- if (mts != null && StringUtil.isNotBlank(mts.getName())) {
|
|
|
- maritalStatus = mts.getName();
|
|
|
+
|
|
|
+ if (bhbasicInfoStatus.equals("未婚") && basicInfoStatus.contains("结婚")) {
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
- if (chcekMaritalStatus(basicInfoStatus, maritalStatus)) {
|
|
|
+ if (bhbasicInfoStatus.equals("丧偶") && basicInfoStatus.contains("已故")) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- //无婚育史
|
|
|
- MaritalLabel maritalLabel = inputInfo.getBeHospitalizedDoc().getMaritalLabel();
|
|
|
- if (maritalLabel == null || maritalLabel.getText() == null) {
|
|
|
+ if ((bhbasicInfoStatus.equals("离婚") || bhbasicInfoStatus.equals("离异")) &&
|
|
|
+ basicInfoStatus.contains("结婚")) {
|
|
|
status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- private boolean chcekMaritalStatus(String basicInfoStatus, String maritalStatus) {
|
|
|
- if (basicInfoStatus.equals(maritalStatus)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- boolean flag = false;
|
|
|
- List<String> regxs = Lists.newArrayList(
|
|
|
- "([\\s\\S]*离[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*离[\\s\\S]*异[\\s\\S]*)",
|
|
|
- "([\\s\\S]*已[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*结[\\s\\S]*婚[\\s\\S]*)|([\\s\\S]*丧[\\s\\S]*偶[\\s\\S]*)",
|
|
|
- "[\\s\\S]*未[\\s\\S]*婚[\\s\\S]*",
|
|
|
- "[\\s\\S]*丧[\\s\\S]*偶[\\s\\S]*",
|
|
|
- "[\\s\\S]*其[\\s\\S]*他[\\s\\S]*"
|
|
|
- );
|
|
|
- Pattern pt = null;
|
|
|
- for (String regx : regxs) {
|
|
|
- pt = Pattern.compile(regx);
|
|
|
- if (pt.matcher(basicInfoStatus).find() && pt.matcher(maritalStatus).find()) {
|
|
|
- flag = true;
|
|
|
- break;
|
|
|
+ MaritalStatus mts = inputInfo.getBeHospitalizedDoc().getMaritalLabel().getMaritalStatus();
|
|
|
+ if (mts != null && StringUtil.isNotBlank(mts.getName())) {
|
|
|
+ String maritalStatus = mts.getName();
|
|
|
+ if (basicInfoStatus.equals(maritalStatus)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
- return flag;
|
|
|
+
|
|
|
+ //无婚育史
|
|
|
+ MaritalLabel maritalLabel = inputInfo.getBeHospitalizedDoc().getMaritalLabel();
|
|
|
+ if (maritalLabel == null || maritalLabel.getText() == null) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|