Pārlūkot izejas kodu

病案首页bug及新加规则

kongwz 5 gadi atpakaļ
vecāks
revīzija
dba8f41092

+ 2 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0192.java

@@ -61,6 +61,8 @@ public class FIRP0192 extends QCCatalogue {
                         if (likeRate < 0.9) {
                             status.set("-1");
                             return;
+                        }else {
+                            return;
                         }
                     }
                 }

+ 45 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP02842.java

@@ -0,0 +1,45 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+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.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP02842
+ * @Description : 出院诊断疾病编码未填写
+ * @Author : kwz
+ * @Date: 2020-07-15 17:45
+ */
+@Component
+public class FIRP02842 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            JSONArray out_diag = (JSONArray)firstpageStructureMap.get("出院诊断");
+            if (out_diag.size() > 0) {
+                for (int i=0;i<out_diag.size();i++) {
+                    JSONObject jsonObject = out_diag.getJSONObject(i);
+                    String diag_code = (String)jsonObject.get("诊断编码");
+                    if(StringUtils.isBlank(diag_code)){
+                        status.set("-1");
+                        return;
+                    }
+
+                }
+
+            }
+        }
+    }
+}

+ 43 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP02844.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+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 : FIRP02844
+ * @Description : 手术及操作编码未填
+ * @Author : kwz
+ * @Date: 2020-07-15 17:45
+ */
+@Component
+public class FIRP02844 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            JSONArray out_diag = (JSONArray)firstpageStructureMap.get("手术信息");
+            if (out_diag.size() > 0) {
+                for (int i=0;i<out_diag.size();i++) {
+                    JSONObject jsonObject = out_diag.getJSONObject(i);
+                    String diag_code = (String)jsonObject.get("手术编码");
+                    if(StringUtils.isBlank(diag_code)){
+                        status.set("-1");
+                        return;
+                    }
+
+                }
+
+            }
+        }
+    }
+}

+ 58 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03038.java

@@ -0,0 +1,58 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+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 org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03038
+ * @Description : 出院诊断疾病编码填写错误
+ * @Author : kwz
+ * @Date: 2020-07-15 17:45
+ */
+@Component
+public class FIRP03038 extends QCCatalogue {
+    @Autowired
+    private SpecialStorageUtil specialStorageUtil;
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        Map<String, Map<String,String>> hostpital_standDiag = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DIAG_MAP);
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            JSONArray out_diag = (JSONArray)firstpageStructureMap.get("出院诊断");
+            if (out_diag.size() > 0) {
+                for (int i=0;i<out_diag.size();i++) {
+                    JSONObject jsonObject = out_diag.getJSONObject(i);
+                    String diag_code = (String)jsonObject.get("诊断编码");
+                    String diag_name = (String) jsonObject.get("诊断名称");
+                    if(StringUtils.isNotBlank(diag_code) && hostpital_standDiag.containsKey(diag_name)){
+                        Map<String,String> s = hostpital_standDiag.get(diag_name);
+                        if(s != null){
+                            String icd10 = s.get("icd10");
+                            if(StringUtils.isNotBlank(icd10) && icd10.equals(diag_code)){
+                                status.set("0");
+                            }else {
+                                status.set("-1");
+                                return;
+                            }
+                        }
+                    }
+
+                }
+
+            }
+        }
+    }
+}