|
@@ -1,11 +1,15 @@
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
|
+import com.lantone.qc.pub.model.label.MaritalLabel;
|
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@@ -17,18 +21,32 @@ import java.util.Map;
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
public class BEH0407 extends QCCatalogue {
|
|
public class BEH0407 extends QCCatalogue {
|
|
|
|
+ List<String> words = Lists.newArrayList("已婚", "离异", "离婚", "丧偶", "未婚", "结婚");
|
|
|
|
+
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
status.set("0");
|
|
status.set("0");
|
|
if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
- if(structureMap != null){
|
|
|
|
|
|
+ if (structureMap != null) {
|
|
String name = structureMap.get("婚姻");
|
|
String name = structureMap.get("婚姻");
|
|
- if(CatalogueUtil.isEmpty(name)){
|
|
|
|
|
|
+ if (CatalogueUtil.isEmpty(name)) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ MaritalLabel maritalLabel = inputInfo.getBeHospitalizedDoc().getMaritalLabel();
|
|
|
|
+ if (maritalLabel != null) {
|
|
|
|
+ String maritalText = maritalLabel.getText();
|
|
|
|
+ if (StringUtil.isNotBlank(maritalText)) {
|
|
|
|
+ for (String word : words) {
|
|
|
|
+ if (maritalText.contains(word)) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|