|
@@ -15106,9 +15106,9 @@
|
|
|
</select>
|
|
|
|
|
|
<!-- 病案首页改善率质控评分页(内页)-科室-->
|
|
|
- <select id="hmImproveMRPageByDept" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
|
+ <select id="hmImproveMRPageByDept" resultType="com.diagbot.dto.QcResultShortDeptDTO">
|
|
|
SELECT
|
|
|
- t.*
|
|
|
+ t.*,t3.name as medoupName
|
|
|
FROM
|
|
|
(
|
|
|
SELECT DISTINCT
|
|
@@ -15214,6 +15214,9 @@
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ AND m1.ward_name = #{qcResultShortPageVO.wardName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND m1.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -15270,6 +15273,9 @@
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ AND a.ward_name = #{qcResultShortPageVO.wardName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == 0">
|
|
|
<if test="qcResultShortPageVO.startDate != null ">
|
|
|
<![CDATA[ AND a.behospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
@@ -15332,9 +15338,16 @@
|
|
|
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
|
|
|
+ ) t LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
|
|
|
+ AND t.hospitalId = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
+ AND t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
@@ -16285,6 +16298,8 @@
|
|
|
SELECT
|
|
|
f1.behDeptId,
|
|
|
f1.behDeptName,
|
|
|
+ f1.wardName,
|
|
|
+ f1.medoupName,
|
|
|
f1.doctorId,
|
|
|
f1.doctorName,
|
|
|
f1.patName,
|
|
@@ -16320,6 +16335,9 @@
|
|
|
</if>
|
|
|
t.behDeptId,
|
|
|
t.behDeptName,
|
|
|
+ t.wardName,
|
|
|
+ t.scoreBn,
|
|
|
+ t3.name as medoupName,
|
|
|
t.hospitalId,
|
|
|
t.checkStatus,
|
|
|
t.mrStatus,
|
|
@@ -16431,6 +16449,9 @@
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ and m1.ward_name = #{qcResultShortPageVO.wardName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND m1.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -16484,6 +16505,9 @@
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ and a.ward_name = #{qcResultShortPageVO.wardName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -16553,6 +16577,11 @@
|
|
|
LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
|
|
|
AND t.hospitalId = qi.hospital_id
|
|
|
AND t.behospitalCode = qi.behospital_code
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
|
|
|
+ AND t.hospitalId = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
<if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
|
|
|
LEFT JOIN med_qcresult_detail qd ON qd.is_deleted = 'N'
|
|
|
AND t.hospitalId = qd.hospital_id
|
|
@@ -16561,6 +16590,9 @@
|
|
|
AND qd.cases_id = qc.id
|
|
|
</if>
|
|
|
where 1=1
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName!=''">
|
|
|
+ AND t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
@@ -16695,6 +16727,9 @@
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ and m1.ward_name = #{qcResultShortPageVO.wardName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND m1.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -16745,6 +16780,9 @@
|
|
|
<if test="qcResultShortPageVO.userId!=null">
|
|
|
AND f.user_id = #{qcResultShortPageVO.userId}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ and a.ward_name = #{qcResultShortPageVO.wardName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
@@ -16812,7 +16850,15 @@
|
|
|
LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
|
|
|
AND t.hospitalId = qi.hospital_id
|
|
|
AND t.behospitalCode = qi.behospital_code
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
|
|
|
+ AND t.hospitalId = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
where 1=1
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName!=''">
|
|
|
+ AND t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|