|
@@ -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
|