chengyao 4 years ago
parent
commit
2e2937e555

+ 6 - 0
src/main/java/com/diagbot/enums/QualityContent.java

@@ -141,6 +141,12 @@ public class QualityContent {
      */
     public static List<String> BLOODLIST = Arrays.asList(
             "交叉配血","血交叉","血常规");
+
+    /**
+     * 用于代码判断指标1、2、3执行路径
+     */
+    public static List<String> FOURSTR = Arrays.asList(
+            "住院病案管理人员月均负担出院患者病历数", "病案编码人员月均负担出院患者病历数", "门诊病案管理人员月均负担门诊患者病历数");
 }
 
 

+ 35 - 25
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -542,7 +542,15 @@ public class ConsoleFacade {
             System.out.println("qian" + (zz-x1));
             Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
         //指标一、二、三、二十七
-                hashMapArrayList = ManageIndexMethod(indexName,hashMapArrayList, baseIndex, filterVO);
+            if (QualityContent.FOURSTR.contains(indexName)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = ManageIndexMethod(indexName, hashMapArrayList, baseIndex, filterVO);
+            }
+
+            //指标二十七
+            if (indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = firMethod(indexName,hashMapArrayList,baseIndex);
+            }
+
             long x2 = System.currentTimeMillis();
             System.out.println("指标一、二、三、二十七 = " + (x2-x1));
             //指标十七 医师查房记录
@@ -573,7 +581,7 @@ public class ConsoleFacade {
             System.out.println("指标十四  = " + (x6-x5));
 
         //指标十六  临床用血相关记录符合率
-            if (indexName.equals(QualityContent.SS_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
+            if (indexName.equals(QualityContent.LCYX_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
                 filterVO.setFlagStr("1");
                 List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
                 long x7 = System.currentTimeMillis();
@@ -2863,7 +2871,6 @@ public class ConsoleFacade {
          FilterVO timeVo = new FilterVO();
          BeanUtils.copyProperties(filterVO,timeVo);
          QueryWrapper<MedManagementInfo> query = new QueryWrapper<>();
-         DecimalFormat df = new DecimalFormat("0.00");
          timeTrans(timeVo);
          query.eq("hospital_id", filterVO.getHospitalId())
                  .eq("is_deleted", IsDeleteEnum.N)
@@ -2872,8 +2879,6 @@ public class ConsoleFacade {
                  .ge("start_date",timeVo.getStartDate())
                  .le("end_date",timeVo.getEndDate())
                  .select("position_id","work_person");
-
-
          List<MedManagementInfo> list = medManagementInfoService.list(query);
          //单位时间同期门诊病案管理人员实际工作总月数
          if(indexName.equals(QualityContent.MZBA_CYHZ)||indexName.equals(QualityContent.QB)) {
@@ -2930,28 +2935,33 @@ public class ConsoleFacade {
              secMap.put("num",num2);
              retList.add(secMap);
          }
-
-
-         if(indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
-             //指标二十七 -甲级病历率
-             Double firRecord = 0d;
-             String num4= null;
-             if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString())){
-                 firRecord =Double.parseDouble(baseIndex.get("forWorkNum").toString());
-             }
-             if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixWorkNum").toString()) ){
-                 double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
-                 double firGradeStr = Double.parseDouble(df.format(retNum));
-                 num4 = String.valueOf(Math.ceil(firGradeStr));
-             }
-             LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
-             fouMap.put("name","甲级病历率");
-             fouMap.put("notCopiedStr",StringUtils.isEmpty(num4)? null:(num4+"%"));
-             fouMap.put("num",num4);
-             retList.add(fouMap);
-         }
          return retList;
      };
+
+
+    private List<Map<String, String>> firMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex){
+        DecimalFormat df = new DecimalFormat("0.00");
+        if(indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
+            //指标二十七 -甲级病历率
+            Double firRecord = 0d;
+            String num4= null;
+            if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString())){
+                firRecord =Double.parseDouble(baseIndex.get("forWorkNum").toString());
+            }
+            if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixWorkNum").toString()) ){
+                double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
+                double firGradeStr = Double.parseDouble(df.format(retNum));
+                num4 = String.valueOf(Math.ceil(firGradeStr));
+            }
+            LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
+            fouMap.put("name","甲级病历率");
+            fouMap.put("notCopiedStr",StringUtils.isEmpty(num4)? null:(num4+"%"));
+            fouMap.put("num",num4);
+            retList.add(fouMap);
+        }
+        return retList;
+    };
+
    private void timeTrans(FilterVO filterVO){
        SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd");
        Calendar cal1 = Calendar.getInstance();