|
@@ -0,0 +1,66 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.yiwu.firstpagerecord;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.client.ChiefPresentSimilarityServiceClient;
|
|
|
+import com.lantone.qc.kernel.client.SimilarityServiceClient;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
+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.util.StringUtil;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP0178
|
|
|
+ * @Description :18岁以下婚姻信息必须为未婚
|
|
|
+ */
|
|
|
+@Component
|
|
|
+@Slf4j
|
|
|
+public class FIRP03259 extends QCCatalogue {
|
|
|
+ @Autowired
|
|
|
+ SimilarityServiceClient similarityServiceClient;
|
|
|
+ @Autowired
|
|
|
+ ChiefPresentSimilarityServiceClient chiefPresentSimilarityServiceClient;
|
|
|
+
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureExtMap() == null) {
|
|
|
+ log.info("首页记录等必要数据缺失!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
|
|
|
+ String admissionAge = (String) firstpageStructureMap.get(Content.age);
|
|
|
+ if (StringUtil.isBlank(admissionAge)) {
|
|
|
+ log.info("年龄缺失!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(admissionAge.contains("岁")) {
|
|
|
+ admissionAge = admissionAge.replaceAll("[岁]", "").replaceAll("[^0-9]", "");
|
|
|
+ if (CatalogueUtil.numbersOnly(admissionAge)) {
|
|
|
+ if (Integer.parseInt(admissionAge) > 18) {
|
|
|
+ log.info("年龄大于18岁");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String firstAdmissionMarry = (String)firstpageStructureMap.get(Content.marry);
|
|
|
+ if (StringUtil.isBlank(firstAdmissionMarry)) {
|
|
|
+ log.info("无婚姻信息");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(firstAdmissionMarry.trim().equals("未婚")){
|
|
|
+ log.info("婚姻信息正确");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+}
|