|
@@ -0,0 +1,51 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP03241
|
|
|
+ * @Description: 出院31天内再住院计划填写错误
|
|
|
+ * @author: hecc
|
|
|
+ * @data: 2022/9/2 13:37
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class FIRP03240 extends QCCatalogue {
|
|
|
+ @Override
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap() == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
|
|
|
+ Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ //获取病案首页结构化数据三十一天内再住院计划
|
|
|
+ String secondBeHospital = firstpageStructureMap.get("三十一天内再住院计划");
|
|
|
+ //获取病案首页结构化数据在住院目的
|
|
|
+ String purpose = firstpageStructureMap.get("再住院目的");
|
|
|
+ if (CatalogueUtil.isEmpty(secondBeHospital)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(secondBeHospital)) {
|
|
|
+ //【三十一天内再住院计划】填写非【有/无/1/2】则报出
|
|
|
+ if (!(secondBeHospital.contains("有") || secondBeHospital.contains("无") || secondBeHospital.contains("1") || secondBeHospital.contains("2"))) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //【在住院目的】填写非【-/-】或空,【三十一天内再住院】为【无/1】则报出
|
|
|
+ if (!(purpose.contains("-") || purpose.contains("-") || purpose.contains(" ") || purpose.contains(" ") || purpose.contains(null))) {
|
|
|
+ if (secondBeHospital.contains("无") || secondBeHospital.contains("1")) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|