Browse Source

1、条目缺陷病历详情页导出
2、时效性统计病历详情页导出

zhaops 4 years ago
parent
commit
ec98014672

+ 5 - 5
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -225,13 +225,13 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setHospitalId(hospitalId);
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
-        //时间间隔7
-        long interval = 7 * 24 * 60 * 60 * 1000;
+        //时间间隔90
+        long interval = 90 * 24 * 60 * 60 * 1000;
         if (endDate.getTime() < startDate.getTime()) {
             throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
         }
         if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
         }
 
         qcResultShortPageVO.setCurrent(1L);
@@ -294,12 +294,12 @@ public class ConsoleExportFacade {
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
         //时间间隔7天
-        long interval = 7 * 24 * 60 * 60 * 1000;
+        long interval = 90 * 24 * 60 * 60 * 1000;
         if (endDate.getTime() < startDate.getTime()) {
             throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
         }
         if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
         }
 
         qcResultShortPageVO.setCurrent(1L);

+ 27 - 3
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -6116,6 +6116,9 @@
         AND t.behospitalCode = qd.behospital_code
         LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
         AND qd.cases_id = qc.id
+        LEFT JOIN qc_cases_entry qce ON qce.is_deleted = 'N'
+        AND qd.cases_id = qce.cases_id
+        AND qd.cases_entry_id = qce.id
         where 1=1
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
@@ -6141,6 +6144,18 @@
         <if test="qcResultShortPageVO.mrTimeEnd != null ">
             <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
         </if>
+        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
+            AND qce.NAME = #{qcResultShortPageVO.casesEntryName}
+        </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND qce.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
+        <if test="qcResultShortPageVO.casesName != null and qcResultShortPageVO.casesName != ''">
+            AND qce.cases_name = #{qcResultShortPageVO.casesName}
+        </if>
+        <if test="qcResultShortPageVO.casesId != null">
+            AND qce.cases_id = #{qcResultShortPageVO.casesId}
+        </if>
         )f1,
         (SELECT
         ROUND( AVG( qi.score_res ), 2 ) AS avgScore,
@@ -6800,9 +6815,6 @@
         <if test="qcResultShortPageVO.patName != null and qcResultShortPageVO.patName != ''">
             AND a.NAME LIKE CONCAT( '%', #{qcResultShortPageVO.patName}, '%' )
         </if>
-        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
-            AND d.NAME = #{qcResultShortPageVO.casesEntryName}
-        </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
             AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
             OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
@@ -6813,6 +6825,9 @@
             OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
             OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
         </if>
+        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
+            AND d.NAME = #{qcResultShortPageVO.casesEntryName}
+        </if>
         <if test="qcResultShortPageVO.casesEntryId != null ">
             AND d.id = #{qcResultShortPageVO.casesEntryId}
         </if>
@@ -6846,6 +6861,9 @@
         AND t.behospitalCode = qd.behospital_code
         LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
         AND qd.cases_id = qc.id
+        LEFT JOIN qc_cases_entry qce ON qce.is_deleted = 'N'
+        AND qd.cases_id = qce.cases_id
+        AND qd.cases_entry_id = qce.id
         where 1=1
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
@@ -6871,6 +6889,12 @@
         <if test="qcResultShortPageVO.mrTimeEnd != null ">
             <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
         </if>
+        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
+            AND qce.NAME = #{qcResultShortPageVO.casesEntryName}
+        </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND qce.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
         )f1,
         (SELECT
         ROUND( AVG( qi.score_res ), 2 ) AS avgScore,