Browse Source

出院患者病历归档完整率

chengyao 4 years ago
parent
commit
a2a70c3a08

+ 1 - 1
doc/031.20210326v2.0.2/qc_initv2.0.2.sql

@@ -293,7 +293,7 @@ CREATE TABLE `med_index_result` (
   `ward_round_result` double(5,0) DEFAULT NULL COMMENT '医师查房记录完整率-分母',
   `rescue_result` double(5,0) DEFAULT NULL COMMENT '患者抢救记录及时完成率-分母',
   `sec_file_result` double(5,0) DEFAULT NULL COMMENT '出院患者病历2日归档率-分子',
-  `file_complete_result` double(5,0) DEFAULT NULL COMMENT '出院患者病历归档完整率-分',
+  `file_complete_result` double(5,0) DEFAULT NULL COMMENT '出院患者病历归档完整率-分',
   `no_copy_result` double(5,0) DEFAULT NULL COMMENT '不合理复制病历发生率-分母',
   `record_sign_result` double(5,0) DEFAULT NULL COMMENT '知情同意书规范签署率-分母',
   `start_date` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,

+ 1 - 1
src/main/java/com/diagbot/entity/MedIndexResult.java

@@ -114,7 +114,7 @@ public class MedIndexResult implements Serializable {
     private Double secFileResult;
 
     /**
-     * 出院患者病历归档完整率--分
+     * 出院患者病历归档完整率--分
      */
     private Double fileCompleteResult;
 

+ 1 - 1
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -320,7 +320,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         List<RecordContentDTO> recordContentDTOList = medicalRecordFacade.getRecordContentFac(recordContentVO);
         String recTitle = "";
         // 解密数据
-        if (encryptFlag) {
+        if (false  && encryptFlag) {
             try {
                 EncrypDES encrypDES = new EncrypDES();
                 for (RecordContentDTO recordContentDTO : recordContentDTOList) {

+ 40 - 5
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -570,9 +570,15 @@ public class ConsoleFacade {
             hashMapArrayList = getfileSecAmount(medicalRecordIndicator,hashMapArrayList, baseIndex);
         }
 
-        //指标二十七
+        //指标二十一 出院患者病历归档完整率
+        if (indexName.equals(QualityContent.CCHZ_GD_WZL)||indexName.equals(QualityContent.QB)) {
+            hashMapArrayList = fileCompleteMethod(medicalRecordIndicator,hashMapArrayList, baseIndex);
+        }
+
+
+        //指标二十七 甲级率
         if (indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
-            hashMapArrayList = firMethod(indexName,hashMapArrayList,baseIndex);
+            hashMapArrayList = firMethod(hashMapArrayList,baseIndex);
         }
         return hashMapArrayList;
     }
@@ -785,6 +791,8 @@ public class ConsoleFacade {
         rescueMethods(doctorAdviceMedManageParams,medIndexResult,rescueCode);
         //指标20 出院患者病历2日归档
         getfileSecAmounts(filterVO,medIndexResult);
+        //指标21 出院患者病历归档完整率
+        fileCompleteMethods(filterVO,medIndexResult);
         //指标15 手术记录
         medIndexResult.setOperationCompleteResult(Double.parseDouble(operationFeeNum+""));
         //指标17  临床用血相关记录符合率
@@ -3115,6 +3123,25 @@ public class ConsoleFacade {
         return retList;
     };
 
+    //指标21 --出院患者病历归档完整率
+    private  List<Map<String, String>> fileCompleteMethod(Map<String, Double> medManageParams, List<Map<String, String>>retList, Map<String, Object> baseIndex){
+        DecimalFormat df = new DecimalFormat("#0.00");
+        LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
+        double count = medManageParams.get("fileCompleteResult");
+        String num = null;
+        if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString()) && ! baseIndex.get("forWorkNum").toString().equals("0") ){
+            double retNum =count* 100/Double.parseDouble(baseIndex.get("forWorkNum").toString());
+            double firGradeStr = Double.parseDouble(df.format(retNum));
+            num = String.valueOf(firGradeStr);
+            firMap.put("num",baseIndex.get("forWorkNum").toString());
+        }
+
+        firMap.put("name","出院患者病历归档完整率");
+        firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
+        retList.add(firMap);
+        return retList;
+    }
+
 
     private List<Map<String, String>> ManageIndexMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex, MedIndexFilterVO timeVo){
         QueryWrapper<MedManagementInfo> query = new QueryWrapper<>();
@@ -3195,9 +3222,8 @@ public class ConsoleFacade {
     };
 
 
-    private List<Map<String, String>> firMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex){
+    private List<Map<String, String>> firMethod(List<Map<String, String>> retList, Map<String, Object> baseIndex){
         DecimalFormat df = new DecimalFormat("0.00");
-        if(indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
             //指标二十七 -甲级病历率
         LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
             Double firRecord = 0d;
@@ -3214,7 +3240,6 @@ public class ConsoleFacade {
             fouMap.put("name","甲级病历率");
             fouMap.put("notCopiedStr",StringUtils.isEmpty(num4) ? "0.00%":(num4+"%"));
             retList.add(fouMap);
-        }
         return retList;
     };
 
@@ -3368,6 +3393,16 @@ public class ConsoleFacade {
         filterVO.setLastEndDate(endTime);
     };
 
+    //指标21 出院患者病历归档完整率
+    private void fileCompleteMethods(FilterVO filterVO,MedIndexResult medIndexResult){
+        filterVO.setFlagStr("3");
+        List<MedManageParamsDTO> fileLists = behospitalInfoFacade.getMedManageParams(filterVO);
+        double count = fileLists.stream().map(MedManageParamsDTO::getBehospitalCode).distinct().count();
+        if(StringUtils.isNotEmpty(String.valueOf(count)) &&  count != 0d){
+            medIndexResult.setFileCompleteResult(count);
+        }
+    }
+
 
 
     /**

+ 7 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -836,6 +836,13 @@
         AND f1.hospitalId = f3.hospital_id
         AND f1.behospitalCode = f3.behospital_code
         </if>
+        <if test="flagStr != null and flagStr == 3">
+            join  med_qcresult_detail f4
+            on  f4.is_deleted = 'N'
+            AND f1.hospitalId = f4.hospital_id
+            AND f1.behospitalCode = f4.behospital_code
+            AND f4.is_reject = 1
+        </if>
     </select>
 
 

+ 2 - 2
src/main/resources/mapper/MedIndexResultMapper.xml

@@ -51,8 +51,8 @@
             COALESCE (sum(a.implants_result), 0) AS 'implants_result',
             COALESCE (sum(a.blood_result), 0) AS 'blood_result',
             COALESCE (sum(a.rescue_result), 0) AS 'rescue_result',
-            COALESCE (sum(a.sec_file_result), 0) AS 'sec_file_result'
-
+            COALESCE (sum(a.sec_file_result), 0) AS 'sec_file_result',
+            COALESCE (sum(a.file_complete_result), 0) AS 'fileCompleteResult'
         FROM
             med_index_result a
         WHERE