소스 검색

Merge remote-tracking branch 'origin/dev/20200716_1.3.8' into debug

# Conflicts:
#	src/main/java/com/diagbot/vo/QcResultShortPageVO.java
zhaops 4 년 전
부모
커밋
fc27c648ef

+ 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;
 }

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

@@ -76,7 +76,34 @@ 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;
     /**
      * 是否归档(0:未归档,1:已归档)
      */

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

@@ -3068,7 +3068,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
@@ -3076,7 +3081,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
@@ -3176,8 +3186,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
@@ -3214,6 +3230,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>
 
     <!-- 条目缺陷质控评分页-科室(内页)-->
@@ -4101,12 +4138,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
@@ -4197,8 +4245,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
@@ -4237,6 +4291,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>
@@ -4648,7 +4723,12 @@
         f2.avgScore,
         f1.msg,
         f1.caseName,
-        f1.checkStatus
+        f1.checkStatus,
+        f1.mrStatus,
+        f1.chName,
+        f1.mrName,
+        f1.chTime,
+        f1.mrTime
         FROM
         (SELECT
         CONCAT(
@@ -4666,7 +4746,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,
@@ -4692,12 +4777,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
@@ -4788,8 +4884,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
@@ -4836,6 +4938,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
@@ -4867,12 +4990,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
@@ -4963,8 +5097,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
@@ -5006,6 +5146,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>
@@ -5033,7 +5194,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,
@@ -5047,7 +5213,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,
@@ -5075,7 +5246,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
@@ -5083,7 +5259,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
@@ -5183,8 +5364,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
@@ -5229,6 +5416,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,
@@ -5261,7 +5469,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
@@ -5269,7 +5482,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
@@ -5369,8 +5587,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
@@ -5410,6 +5634,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
@@ -5501,11 +5746,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
@@ -5599,8 +5854,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
@@ -5610,6 +5871,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>
 
     <!-- 未整改病历缺陷评分详情页导出-->
@@ -5627,7 +5909,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,
@@ -5641,7 +5928,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,
@@ -5669,11 +5961,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
@@ -5767,8 +6069,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
@@ -5786,6 +6094,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,
@@ -5818,11 +6147,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
@@ -5916,14 +6255,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
@@ -5932,6 +6275,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