|
@@ -0,0 +1,54 @@
|
|
|
|
+package com.lantone.qc.kernel.catalogue.leavehospital;
|
|
|
|
+
|
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
|
+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.model.entity.Diag;
|
|
|
|
+import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
+
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Description: 出院记录出院诊断与首页出院诊断不一致
|
|
|
|
+ * @author: 胡敬
|
|
|
|
+ * @time: 2020/3/27 15:48
|
|
|
|
+ */
|
|
|
|
+@Component
|
|
|
|
+public class LEA0514 extends QCCatalogue {
|
|
|
|
+ @Override
|
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
|
+ status = "0";
|
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() != null || inputInfo.getFirstPageRecordDoc() != null) {
|
|
|
|
+ DiagLabel leaveDiagLabel = inputInfo.getLeaveHospitalDoc().getLeaveDiagLabel();
|
|
|
|
+ Map<String, Object> firstPageRecordStructureExtMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
|
|
|
|
+ List<Map<String, String>> dischargeDiagStructure = (List<Map<String, String>>) firstPageRecordStructureExtMap.get(Content.dischargeDiag);
|
|
|
|
+ if (ListUtil.isEmpty(dischargeDiagStructure)){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //首页出院诊断
|
|
|
|
+ List<Diag> dischargeDiags = new ArrayList<>();
|
|
|
|
+ for (Map<String, String> dischargeDiagMap:dischargeDiagStructure) {
|
|
|
|
+ String diagnoseName = dischargeDiagMap.get(Content.diagnoseName);
|
|
|
|
+ if (CatalogueUtil.isEmpty(diagnoseName)){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ Diag diag = new Diag();
|
|
|
|
+ diag.setName(diagnoseName);
|
|
|
|
+ dischargeDiags.add(diag);
|
|
|
|
+ }
|
|
|
|
+ if (leaveDiagLabel != null) {
|
|
|
|
+ //出院记录出院诊断
|
|
|
|
+ List<Diag> beHospitalizedDiags = leaveDiagLabel.getDiags();
|
|
|
|
+ if (!ListUtil.equals(beHospitalizedDiags, dischargeDiags)) {
|
|
|
|
+ status = "-1";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|