Przeglądaj źródła

统计相关质控评分页增加核查状态

zhaops 4 lat temu
rodzic
commit
44252675a2

+ 27 - 2
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -32,8 +32,6 @@ public class QcResultShortDTO {
     private Double scoreRes;
     @Excel(name = "病人住院序号", width = 40, orderNum = "3")
     private String behospitalCode;
-    //@Excel(name = "核查状态", width = 20, orderNum = "4",replace = { "已核查_1", "未核查_0", "_null" })
-    private Integer checkStatus;
     @Excel(name = "病案号", width = 30, orderNum = "5")
     private String fileCode;
     @Excel(name = "病人姓名", width = 30, orderNum = "6")
@@ -94,4 +92,31 @@ public class QcResultShortDTO {
      */
     private String wardName;
 
+    /**
+     * 病历核查状态
+     */
+    //@Excel(name = "核查状态", width = 20, orderNum = "4",replace = { "已核查_1", "未核查_0", "_null" })
+    private Integer checkStatus;
+    /**
+     * 首页核查状态
+     */
+    private Integer mrStatus;
+    /**
+     * 病历核查人员
+     */
+    private String chName;
+    /**
+     * 首页核查人员
+     */
+    private String mrName;
+    /**
+     * 病历核查时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+    /**
+     * 首页核查时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
 }

+ 29 - 1
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -76,4 +76,32 @@ public class QcResultShortPageVO extends Page {
      * 核查状态(1:已核查,0:未核查)
      */
     private Integer checkStatus;
-}
+    /**
+     * 首页核查状态(1:已核查,0:未核查)
+     */
+    private Integer mrStatus;
+    /**
+     * 病历核查人员
+     */
+    private String chName;
+    /**
+     * 首页核查人员
+     */
+    private String mrName;
+    /**
+     * 病历核查起始时间
+     */
+    private Date chTimeStart;
+    /**
+     * 病历核查截止时间
+     */
+    private Date chTimeEnd;
+    /**
+     * 首页核查起始时间
+     */
+    private Date mrTimeStart;
+    /**
+     * 首页核查截止时间
+     */
+    private Date mrTimeEnd;
+}

+ 396 - 32
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -3002,7 +3002,12 @@
         t1.ward_name AS wardName,
         t2.age,
         t1.file_code AS fileCode,
-        t1.checkStatus
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime
         FROM
         (
         SELECT DISTINCT
@@ -3010,7 +3015,12 @@
         FROM
         (SELECT
         be.*,
-        ifnull(mci.status,0) AS checkStatus
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -3108,8 +3118,14 @@
         )be
         left join med_check_info mci
         on mci.is_deleted = 'N'
+        and mci.check_type = 0
         and be.hospital_id = mci.hospital_id
         and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         )tt1
         <if test="qcResultShortPageVO.casesEntryId != null and qcResultShortPageVO.casesEntryId==2511">
             ,med_medical_record tt2
@@ -3146,6 +3162,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
     </select>
 
     <!-- 条目缺陷质控评分页-科室(内页)-->
@@ -4009,12 +4046,23 @@
         t1.gmt_create AS gradeTime,
         t1.diagnose,
         t1.ward_name AS wardName,
-        ifnull(t1.status,0) AS checkStatus,
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime,
         t2.age,
         t1.file_code AS fileCode
         FROM
         (
-        SELECT be.*,mci.status
+        SELECT be.*,
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -4103,8 +4151,14 @@
         ) be
         left join med_check_info mci
         on mci.is_deleted = 'N'
-        AND be.hospital_id = mci.hospital_id
-        AND be.behospital_code = mci.behospital_code
+        and mci.check_type = 0
+        and be.hospital_id = mci.hospital_id
+        and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         )t1
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==2">
             ,med_home_page t2
@@ -4143,6 +4197,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             and t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND t.`level` = #{qcResultShortPageVO.level}
         </if>
@@ -4540,7 +4615,12 @@
         f2.avgScore,
         f1.msg,
         f1.caseName,
-        f1.checkStatus
+        f1.checkStatus,
+        f1.mrStatus,
+        f1.chName,
+        f1.mrName,
+        f1.chTime,
+        f1.mrTime
         FROM
         (SELECT
         CONCAT(
@@ -4558,7 +4638,12 @@
         t.behDeptId,
         t.behDeptName,
         t.hospitalId,
-        t.checkStatus
+        t.checkStatus,
+        t.mrStatus,
+        t.chName,
+        t.mrName,
+        t.chTime,
+        t.mrTime
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,
@@ -4584,12 +4669,23 @@
         t1.gmt_create AS gradeTime,
         t1.diagnose,
         t1.ward_name AS wardName,
-        ifnull(t1.status,0) AS checkStatus,
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime,
         t2.age,
         t1.file_code AS fileCode
         FROM
         (
-        SELECT be.*,mci.status
+        SELECT be.*,
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -4678,8 +4774,14 @@
         ) be
         left join med_check_info mci
         on mci.is_deleted = 'N'
-        AND be.hospital_id = mci.hospital_id
-        AND be.behospital_code = mci.behospital_code
+        and mci.check_type = 0
+        and be.hospital_id = mci.hospital_id
+        and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         )t1
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==2">
             ,med_home_page t2
@@ -4726,6 +4828,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             and t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND t.`level` = #{qcResultShortPageVO.level}
         </if>)f1,(SELECT
@@ -4757,12 +4880,23 @@
         t1.gmt_create AS gradeTime,
         t1.diagnose,
         t1.ward_name AS wardName,
-        ifnull(t1.status,0) AS checkStatus,
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime,
         t2.age,
         t1.file_code AS fileCode
         FROM
         (
-        SELECT be.*,mci.status
+        SELECT be.*,
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -4851,8 +4985,14 @@
         ) be
         left join med_check_info mci
         on mci.is_deleted = 'N'
-        AND be.hospital_id = mci.hospital_id
-        AND be.behospital_code = mci.behospital_code
+        and mci.check_type = 0
+        and be.hospital_id = mci.hospital_id
+        and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         )t1
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==2">
             ,med_home_page t2
@@ -4894,6 +5034,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             and t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND t.`level` = #{qcResultShortPageVO.level}
         </if>
@@ -4921,7 +5082,12 @@
         f2.avgScore,
         f1.msg,
         f1.caseName,
-        f1.checkStatus
+        f1.checkStatus,
+        f1.mrStatus,
+        f1.chName,
+        f1.mrName,
+        f1.chTime,
+        f1.mrTime
         FROM
         (SELECT
         CONCAT( ifnull( t.directorDoctorName, '' ), '\n', t.doctorName ) AS behDoctorName,
@@ -4935,7 +5101,12 @@
         t.behDeptId,
         t.behDeptName,
         t.hospitalId,
-        t.checkStatus
+        t.checkStatus,
+        t.mrStatus,
+        t.chName,
+        t.mrName,
+        t.chTime,
+        t.mrTime
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,
@@ -4963,7 +5134,12 @@
         t1.ward_name AS wardName,
         t2.age,
         t1.file_code AS fileCode,
-        t1.checkStatus
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime
         FROM
         (
         SELECT DISTINCT
@@ -4971,7 +5147,12 @@
         FROM
         (SELECT
         be.*,
-        ifnull(mci.status,0) AS checkStatus
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -5069,8 +5250,14 @@
         )be
         left join med_check_info mci
         on mci.is_deleted = 'N'
+        and mci.check_type = 0
         and be.hospital_id = mci.hospital_id
         and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         )tt1
         <if test="qcResultShortPageVO.casesEntryId != null and qcResultShortPageVO.casesEntryId==2511">
             ,med_medical_record tt2
@@ -5115,6 +5302,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         )f1,
         (SELECT
         ROUND( AVG( qi.score_res ), 2 ) AS avgScore,
@@ -5147,7 +5355,12 @@
         t1.ward_name AS wardName,
         t2.age,
         t1.file_code AS fileCode,
-        t1.checkStatus
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime
         FROM
         (
         SELECT DISTINCT
@@ -5155,7 +5368,12 @@
         FROM
         (SELECT
         be.*,
-        ifnull(mci.status,0) AS checkStatus
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -5253,8 +5471,14 @@
         )be
         left join med_check_info mci
         on mci.is_deleted = 'N'
+        and mci.check_type = 0
         and be.hospital_id = mci.hospital_id
         and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         )tt1
         <if test="qcResultShortPageVO.casesEntryId != null and qcResultShortPageVO.casesEntryId==2511">
             ,med_medical_record tt2
@@ -5294,6 +5518,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         GROUP BY
         t.behDeptId,
         t.behDeptName
@@ -5383,11 +5628,21 @@
         t1.ward_name AS wardName,
         t2.age,
         t1.file_code AS fileCode,
-        t1.checkStatus
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime
         FROM
         (SELECT
         be.*,
-        ifnull(mci.status,0) AS checkStatus
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -5479,8 +5734,14 @@
         )be
         left join med_check_info mci
         on mci.is_deleted = 'N'
+        and mci.check_type = 0
         and be.hospital_id = mci.hospital_id
         and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         ) t1
         LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
         AND t1.behospital_code = t2.behospital_code
@@ -5490,6 +5751,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
     </select>
 
     <!-- 未整改病历缺陷评分详情页导出-->
@@ -5507,7 +5789,12 @@
         f2.avgScore,
         f1.msg,
         f1.caseName,
-        f1.checkStatus
+        f1.checkStatus,
+        f1.mrStatus,
+        f1.chName,
+        f1.mrName,
+        f1.chTime,
+        f1.mrTime
         FROM
         (SELECT
         CONCAT( ifnull( t.directorDoctorName, '' ), '\n', t.doctorName ) AS behDoctorName,
@@ -5521,7 +5808,12 @@
         t.behDeptId,
         t.behDeptName,
         t.hospitalId,
-        t.checkStatus
+        t.checkStatus,
+        t.mrStatus,
+        t.chName,
+        t.mrName,
+        t.chTime,
+        t.mrTime
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,
@@ -5549,11 +5841,21 @@
         t1.ward_name AS wardName,
         t2.age,
         t1.file_code AS fileCode,
-        t1.checkStatus
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime
         FROM
         (SELECT
         be.*,
-        ifnull(mci.status,0) AS checkStatus
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -5645,8 +5947,14 @@
         )be
         left join med_check_info mci
         on mci.is_deleted = 'N'
+        and mci.check_type = 0
         and be.hospital_id = mci.hospital_id
         and be.behospital_code = mci.behospital_code
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         ) t1
         LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
         AND t1.behospital_code = t2.behospital_code
@@ -5664,6 +5972,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         )f1,
         (SELECT
         ROUND( AVG( qi.score_res ), 2 ) AS avgScore,
@@ -5696,11 +6025,21 @@
         t1.ward_name AS wardName,
         t2.age,
         t1.file_code AS fileCode,
-        t1.checkStatus
+        t1.checkStatus,
+        t1.mrStatus,
+        t1.chName,
+        t1.mrName,
+        t1.chTime,
+        t1.mrTime
         FROM
         (SELECT
         be.*,
-        ifnull(mci.status,0) AS checkStatus
+        ifnull(mci.status,0) AS checkStatus,
+        ifnull(hm_mci.status,0) AS mrStatus,
+        mci.check_name as chName,
+        hm_mci.check_name as mrName,
+        mci.gmt_create as chTime,
+        hm_mci.gmt_create as mrTime
         FROM
         (
         SELECT DISTINCT
@@ -5792,14 +6131,18 @@
         )be
         left join med_check_info mci
         on mci.is_deleted = 'N'
+        and mci.check_type = 0
         and be.hospital_id = mci.hospital_id
         and be.behospital_code = mci.behospital_code
-
+        left join med_check_info hm_mci
+        on hm_mci.is_deleted = 'N'
+        and hm_mci.check_type = 1
+        and be.hospital_id = hm_mci.hospital_id
+        and be.behospital_code = hm_mci.behospital_code
         ) t1
         LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
         AND t1.behospital_code = t2.behospital_code
         AND t2.is_deleted = 'N'
-
         ) t
         LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
         AND t.hospitalId = qi.hospital_id
@@ -5808,6 +6151,27 @@
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
+        <if test="qcResultShortPageVO.mrStatus != null">
+            AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
+        </if>
+        <if test="qcResultShortPageVO.chName != null and qcResultShortPageVO.chName!=''">
+            AND t.chName like concat('%', #{qcResultShortPageVO.chName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.mrName != null and qcResultShortPageVO.mrName!=''">
+            AND t.mrName like concat('%', #{qcResultShortPageVO.mrName}, '%')
+        </if>
+        <if test="qcResultShortPageVO.chTimeStart != null ">
+            <![CDATA[ AND t.chTime >= #{qcResultShortPageVO.chTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.chTimeEnd != null ">
+            <![CDATA[ AND t.chTime <= #{qcResultShortPageVO.chTimeEnd}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeStart != null ">
+            <![CDATA[ AND t.mrTime >= #{qcResultShortPageVO.mrTimeStart}]]>
+        </if>
+        <if test="qcResultShortPageVO.mrTimeEnd != null ">
+            <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
+        </if>
         GROUP BY
         t.behDeptId,
         t.behDeptName