Browse Source

病案指标方法修改

zhanghang 4 năm trước cách đây
mục cha
commit
a3e462726a

+ 47 - 17
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -407,7 +407,7 @@ public class ConsoleFacade {
         String indexName = filterVO.getIndexName();
         Map<String, Long> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
         //出院人数
-        Long endCount = selectOperationNumMap.get(QualityContent.NUMBER_OF_HOSPITAL);
+        Long startCount = selectOperationNumMap.get(QualityContent.DISCHARGED_PATIENTS);
         //各指标未完成人数情况 ---分子
         Map<String, Long> triggeringRulesMap = behospitalInfoFacade.triggeringRules(filterVO);
         Long operationCount = triggeringRulesMap.get(QualityContent.SSJLWCC_24H);
@@ -424,21 +424,51 @@ public class ConsoleFacade {
         Long antibiosis = 0L;
         //恶性肿瘤化学治疗
         Long chemotherapyMalignantTumors = 0L;
-        Map<String, Long> medicalRecordIndicator = medIndexResultFacade.medicalRecordIndicator(filterVO);
-        Long operationFeeNum = medicalRecordIndicator.get("同期手术出院患者总数");
-        Long CTNum = medicalRecordIndicator.get("同期接收CT检查的出院患者总数");
-        Long MRNum = medicalRecordIndicator.get("同期接收MRI检查的出院患者总数");
-        Long operationPathologyFeeNum = medicalRecordIndicator.get("同期开展病理检查的出院手术患者病历总数");
-        Long bacterialCultureNum = medicalRecordIndicator.get("同期开展细菌培养检查出院患者病历总数");
-        Long antibiosisFeeNum = medicalRecordIndicator.get("同期使用抗菌药物出院患者病历总数");
-        Long chemotherapyMalignantTumorsNum = medicalRecordIndicator.get("同期接受恶性肿瘤化学治疗出院患者病历总数");
+        Map<String, Double> medicalRecordIndicator = medIndexResultFacade.medicalRecordIndicator(filterVO);
+        Double operationFeeNum = medicalRecordIndicator.get("operationFeeNum");
+        Double CTNum = medicalRecordIndicator.get("CTNum");
+        Double MRNum = medicalRecordIndicator.get("MRNum");
+        Double operationPathologyFeeNum = medicalRecordIndicator.get("operationPathologyFeeNum");
+        Double bacterialCultureNum = medicalRecordIndicator.get("bacterialCultureNum");
+        Double antibiosisFeeNum = medicalRecordIndicator.get("antibiosisFeeNum");
+        Double chemotherapyMalignantTumorsNum = medicalRecordIndicator.get("chemotherapyMalignantTumorsNum");
+        //入院记录24小时完成率
+        if(indexName.equals(QualityContent.RYJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
+            if (InHospitalRecords != null && startCount != null) {
+                Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                stringStringHashMap.put("name", QualityContent.RYJL_24H_WCL);
+                stringStringHashMap.put("notCopiedStr", getResult(startCount - InHospitalRecords, startCount.doubleValue()));
+                stringStringHashMap.put("num", Double.valueOf(startCount).toString());
+                hashMapArrayList.add(stringStringHashMap);
+            }
+        }
         //手术记录完成率
         if (indexName.equals(QualityContent.SSJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
             if (operationFeeNum != null && operationCount != null) {
                 LinkedHashMap<String, String> stringStringHashMap = new LinkedHashMap<>();
                 stringStringHashMap.put("name", QualityContent.SSJL_24H_WCL);
                 stringStringHashMap.put("notCopiedStr", getResult(operationFeeNum - operationCount, operationFeeNum));
-                stringStringHashMap.put("num", Double.valueOf(operationFeeNum).toString());
+                stringStringHashMap.put("num", operationFeeNum.toString());
+                hashMapArrayList.add(stringStringHashMap);
+            }
+        }
+        //出院记录24小时完成率
+        if(indexName.equals(QualityContent.CYJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
+            if (OutHospitalRecords != null && startCount != null) {
+                Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                stringStringHashMap.put("name", QualityContent.CYJL_24H_WCL);
+                stringStringHashMap.put("notCopiedStr", getResult(startCount - OutHospitalRecords, startCount.doubleValue()));
+                stringStringHashMap.put("num", Double.valueOf(startCount).toString());
+                hashMapArrayList.add(stringStringHashMap);
+            }
+        }
+        //病案首页24小时完成率
+        if(indexName.equals(QualityContent.BASY_24H_WCL)||indexName.equals(QualityContent.QB)) {
+            if (recordHomePage != null && startCount != null) {
+                Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                stringStringHashMap.put("name", QualityContent.BASY_24H_WCL);
+                stringStringHashMap.put("notCopiedStr", getResult(startCount - recordHomePage, startCount.doubleValue()));
+                stringStringHashMap.put("num", Double.valueOf(startCount).toString());
                 hashMapArrayList.add(stringStringHashMap);
             }
         }
@@ -448,7 +478,7 @@ public class ConsoleFacade {
                 Map<String, String> stringStringHashMap = new LinkedHashMap<>();
                 stringStringHashMap.put("name", QualityContent.CT_JCJL_FHL);
                 stringStringHashMap.put("notCopiedStr", getResult(CTNum - ct, CTNum));
-                stringStringHashMap.put("num", Double.valueOf(CTNum).toString());
+                stringStringHashMap.put("num", CTNum.toString());
                 hashMapArrayList.add(stringStringHashMap);
             }
         }
@@ -458,7 +488,7 @@ public class ConsoleFacade {
                 Map<String, String> stringStringHashMap = new LinkedHashMap<>();
                 stringStringHashMap.put("name", QualityContent.MR_JCJL_FHL);
                 stringStringHashMap.put("notCopiedStr", getResult(MRNum - mr, MRNum));
-                stringStringHashMap.put("num", Double.valueOf(MRNum).toString());
+                stringStringHashMap.put("num", MRNum.toString());
                 hashMapArrayList.add(stringStringHashMap);
             }
         }
@@ -468,7 +498,7 @@ public class ConsoleFacade {
                 Map<String, String> stringStringHashMap = new LinkedHashMap<>();
                 stringStringHashMap.put("name", QualityContent.BL_JCJL_FHL);
                 stringStringHashMap.put("notCopiedStr", getResult(operationPathologyFeeNum - operationPathologyFee, operationPathologyFeeNum));
-                stringStringHashMap.put("num", Double.valueOf(operationPathologyFeeNum).toString());
+                stringStringHashMap.put("num", operationPathologyFeeNum.toString());
                 hashMapArrayList.add(stringStringHashMap);
             }
         }
@@ -478,7 +508,7 @@ public class ConsoleFacade {
                 Map<String, String> stringStringHashMap = new LinkedHashMap<>();
                 stringStringHashMap.put("name", QualityContent.KJYW_SY_FHL);
                 stringStringHashMap.put("notCopiedStr", getResult(antibiosisFeeNum - antibiosis, antibiosisFeeNum));
-                stringStringHashMap.put("num", Double.valueOf(antibiosisFeeNum).toString());
+                stringStringHashMap.put("num", antibiosisFeeNum.toString());
                 hashMapArrayList.add(stringStringHashMap);
             }
         }
@@ -488,7 +518,7 @@ public class ConsoleFacade {
                 Map<String, String> stringStringHashMap = new LinkedHashMap<>();
                 stringStringHashMap.put("name", QualityContent.EXZL_HXZL_FHL);
                 stringStringHashMap.put("notCopiedStr", getResult(chemotherapyMalignantTumorsNum - chemotherapyMalignantTumors, chemotherapyMalignantTumorsNum));
-                stringStringHashMap.put("num", Double.valueOf(chemotherapyMalignantTumorsNum).toString());
+                stringStringHashMap.put("num", chemotherapyMalignantTumorsNum.toString());
                 hashMapArrayList.add(stringStringHashMap);
             }
         }
@@ -604,11 +634,11 @@ public class ConsoleFacade {
      * @param y
      * @return
      */
-    public String getResult(Long i , Long y){
+    public String getResult(double i , Double y){
         DecimalFormat df = new DecimalFormat();
         df.setMaximumFractionDigits(2);
         df.setMinimumFractionDigits(2);
-        if(String.valueOf(y).equals("0")){
+        if(String.valueOf(y).equals("0.0")){
             return "0.00%";
         }
         String k= df.format((i * 100.00) / y) + "%";

+ 1 - 1
src/main/java/com/diagbot/mapper/MedIndexResultMapper.java

@@ -23,5 +23,5 @@ public interface MedIndexResultMapper extends BaseMapper<MedIndexResult> {
      * @param filterVO
      * @return
      */
-    public Map<String, Long> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO);
+    public Map<String, Double> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO);
 }

+ 1 - 1
src/main/java/com/diagbot/service/MedIndexResultService.java

@@ -22,5 +22,5 @@ public interface MedIndexResultService extends IService<MedIndexResult> {
      * @param filterVO
      * @return
      */
-    public Map<String, Long> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO);
+    public Map<String, Double> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO);
 }

+ 1 - 1
src/main/java/com/diagbot/service/impl/MedIndexResultServiceImpl.java

@@ -26,7 +26,7 @@ public class MedIndexResultServiceImpl extends ServiceImpl<MedIndexResultMapper,
      * @param filterVO
      * @return
      */
-    public Map<String, Long> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO){
+    public Map<String, Double> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO){
         return baseMapper.medicalRecordIndicator(filterVO);
     }
 }

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

@@ -41,24 +41,24 @@ wardRoundResult" />
 
     <select id="medicalRecordIndicator" parameterType="com.diagbot.vo.FilterVO" resultType="java.util.Map">
          SELECT
-            sum(a.operation_result) AS '同期手术出院患者总数',
-            sum(a.ct_result) AS '同期接收CT检查的出院患者总数',
-            sum(a.mri_result) AS '同期接收MRI检查的出院患者总数',
-            sum(a.pathology_result) AS '同期开展病理检查的出院手术患者病历总数',
-            sum(a.germ_result) AS '同期开展细菌培养检查出院患者病历总数',
-            sum(a.antibiosis_result) AS '同期使用抗菌药物出院患者病历总数',
-            sum(a.tumor_chemistry_result) AS '同期接受恶性肿瘤化学治疗出院患者病历总数',
-            sum(a.tumor_radiation_result) AS '同期开展恶性肿瘤放射治疗出院患者病历总数',
-            sum(a.implants_result) AS '同期使用植入物的出院患者病历总数',
-            sum(a.blood_result) AS '同期存在临床用血的出院胡宗南和病历总数',
-            sum(a.rescue_result) AS '同期接受抢救的出院患者病总数'
+            COALESCE (sum(a.operation_result), 0) AS 'operationFeeNum',
+            COALESCE (sum(a.ct_result), 0) AS 'CTNum',
+            COALESCE (sum(a.mri_result), 0) AS 'MRNum',
+            COALESCE (sum(a.pathology_result), 0) AS 'operationPathologyFeeNum',
+            COALESCE (sum(a.germ_result), 0) AS 'bacterialCultureNum',
+            COALESCE (sum(a.antibiosis_result), 0) AS 'antibiosisFeeNum',
+            COALESCE (sum(a.tumor_chemistry_result),0) AS 'chemotherapyMalignantTumorsNum',
+            COALESCE (sum(a.tumor_radiation_result),0) AS '同期开展恶性肿瘤放射治疗出院患者病历总数',
+            COALESCE (sum(a.implants_result), 0) AS '同期使用植入物的出院患者病历总数',
+            COALESCE (sum(a.blood_result), 0) AS '同期存在临床用血的出院胡宗南和病历总数',
+            COALESCE (sum(a.rescue_result), 0) AS '同期接受抢救的出院患者病总数'
         FROM
             med_index_result a
         WHERE
             a.hospital_id = #{filterVO.hospitalId}
         AND a.is_deleted = 'N'
-        AND (a.start_date BETWEEN '2020-02-20 00:00:00'AND '2021-04-20 23:59:59')
-        AND (a.end_date BETWEEN '2020-02-20 00:00:00'AND '2021-04-20 23:59:59')
+        AND (a.start_date BETWEEN #{filterVO.startDate} AND #{filterVO.endDate} )
+        AND (a.end_date BETWEEN #{filterVO.startDate} AND #{filterVO.endDate} )
  </select>
 
 </mapper>