|
@@ -9,6 +9,7 @@ import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description: 出生地未描述
|
|
* @Description: 出生地未描述
|
|
@@ -20,9 +21,20 @@ public class BEH0042 extends QCCatalogue {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
|
+ String text = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getText();
|
|
|
|
+ if (StringUtil.isBlank(text)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
List<Address> addresses = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getAddresses();
|
|
List<Address> addresses = inputInfo.getBeHospitalizedDoc().getPersonalLabel().getAddresses();
|
|
if (ListUtil.isNotEmpty(addresses)) {
|
|
if (ListUtil.isNotEmpty(addresses)) {
|
|
- long count = addresses.stream().map(i -> i.getName()).filter(i -> StringUtil.isNotBlank(i) && i.indexOf("出生") != -1).count();
|
|
|
|
|
|
+ long count = addresses.stream().filter(i -> {
|
|
|
|
+ boolean flag = false;
|
|
|
|
+ if (i != null && StringUtil.isNotBlank(i.getName())) {
|
|
|
|
+ Pattern pattern = Pattern.compile("[\\s\\S]*(出生|生长)[\\s\\S]{0,5}" + i.getName() + "[\\s\\S]*");
|
|
|
|
+ flag = pattern.matcher(text).matches();
|
|
|
|
+ }
|
|
|
|
+ return flag;
|
|
|
|
+ }).count();
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
status = "0";
|
|
status = "0";
|
|
}
|
|
}
|