浏览代码

Attending查房记录无审核 添加

rengb 5 年之前
父节点
当前提交
09069eed94

+ 77 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03015.java

@@ -0,0 +1,77 @@
+package com.lantone.qc.kernel.catalogue.threelevelward;
+
+import com.lantone.qc.dbanaly.util.KernelConstants;
+import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
+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 com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
+import com.lantone.qc.pub.util.SpringContextUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : THR03015
+ * @Description : 主任查房记录无审核
+ * @Author : 胡敬
+ * @Date: 2020-03-25 10:21
+ */
+@Component
+public class THR03015 extends QCCatalogue {
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getLeaveHospitalDoc() == null || inputInfo.getThreeLevelWardDocs().size() == 0) {
+            return;
+        }
+        Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
+        String lengthOfStay = leaveHospitalStructureMap.get("住院天数");
+        if (StringUtil.isNotBlank(lengthOfStay) && CatalogueUtil.numbersOnly(lengthOfStay)) {
+            //如果住院天数小于2天则不判断该条规则
+            if (Integer.parseInt(lengthOfStay) <= 2) {
+                return;
+            }
+        }
+
+        boolean findIndications = false;
+        ThreeLevelWardDoc threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
+        List<DirectorDoctorWardDoc> directorDoctorWardDocs = threeLevelWardDoc.getDirectorDoctorWardDocs();
+        String jlDateStr, shDateStr, professor;
+        for (DirectorDoctorWardDoc directorDoctorWardDoc : directorDoctorWardDocs) {
+            jlDateStr = directorDoctorWardDoc.getStructureMap().get("病历日期");
+            shDateStr = directorDoctorWardDoc.getStructureMap().get("审核日期");
+            professor = getProfessor(directorDoctorWardDoc.getStructureMap().get("审核人"));
+            if (StringUtil.isBlank(professor)
+                    || !professor.contains("主任")
+                    || CatalogueUtil.compareTime(StringUtil.parseDateTime(jlDateStr), StringUtil.parseDateTime(shDateStr), 48 * 60L)) {
+                findIndications = false;
+                break;
+            }
+        }
+        if (!findIndications) {
+            status.set("-1");
+        }
+    }
+
+    private String getProfessor(String doctorSign) {
+        String professor = "";
+        if (StringUtil.isBlank(doctorSign)) {
+            return professor;
+        }
+        SpecialStorageUtil specialStorageUtil = SpringContextUtil.getBean("specialStorageUtil");
+        Map<String, Map<String, String>> surgeon = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
+        if (surgeon != null) {
+            Map<String, String> doctor = (Map) surgeon.get(doctorSign);
+            if (doctor != null) {
+                professor = doctor.get("professor");
+            }
+        }
+        return professor;
+    }
+
+}

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03017.java

@@ -17,7 +17,7 @@ import java.util.Map;
 
 /**
  * @ClassName : THR03017
- * @Description : Fellow查房记录无审核
+ * @Description : 主治查房记录无审核
  * @Author : 胡敬
  * @Date: 2020-03-25 10:21
  */