Browse Source

首次病程由非执业医师书写 添加

rengb 5 years ago
parent
commit
feaf7c7961

+ 49 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0082.java

@@ -0,0 +1,49 @@
+package com.lantone.qc.kernel.catalogue.firstcourserecord;
+
+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.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRC0082
+ * @Description : 首次病程由非执业医师书写
+ * @Author : rengb
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class FIRC0082 extends QCCatalogue {
+    @Autowired
+    private SpecialStorageUtil specialStorageUtil;
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstCourseRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        String doctorName = inputInfo.getFirstCourseRecordDoc().getStructureMap().get("医师签名");
+        if (StringUtil.isNotBlank(doctorName)) {
+            Map<String, Map<String, String>> hospitalDoctorMap = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
+            if (hospitalDoctorMap != null) {
+                Map<String, String> doctor = (Map) hospitalDoctorMap.get(doctorName);
+                if (doctor != null) {
+                    String occup = doctor.get("occup");
+                    if (StringUtils.isNotEmpty(occup) && "1".equals(occup)) {
+                        status.set("0");
+                        return;
+                    }
+                }
+            }
+        } else {
+            status.set("0");
+        }
+    }
+
+}