|
@@ -7309,9 +7309,9 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 离院病人评分详情页-科室-->
|
|
<!-- 离院病人评分详情页-科室-->
|
|
- <select id="leaveHosMRPageByDept" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
|
|
|
|
+ <select id="leaveHosMRPageByDept" resultType="com.diagbot.dto.QcResultShortDeptDTO">
|
|
SELECT
|
|
SELECT
|
|
- t.*
|
|
|
|
|
|
+ t.*,t3.name as medoupName
|
|
FROM
|
|
FROM
|
|
(SELECT DISTINCT
|
|
(SELECT DISTINCT
|
|
t1.hospital_id AS hospitalId,
|
|
t1.hospital_id AS hospitalId,
|
|
@@ -7428,6 +7428,9 @@
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
|
+ AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
</if>
|
|
</if>
|
|
@@ -7520,8 +7523,17 @@
|
|
AND t1.hospital_id = t2.hospital_id
|
|
AND t1.hospital_id = t2.hospital_id
|
|
AND t1.behospital_code = t2.behospital_code
|
|
AND t1.behospital_code = t2.behospital_code
|
|
</if>
|
|
</if>
|
|
- )t
|
|
|
|
|
|
+ )t LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_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
|
|
where 1=1
|
|
|
|
+ <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
|
+ AND t2.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
|
+ AND t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
</if>
|
|
</if>
|
|
@@ -8915,6 +8927,8 @@
|
|
f1.behospitalDate,
|
|
f1.behospitalDate,
|
|
f1.leaveHospitalDate,
|
|
f1.leaveHospitalDate,
|
|
f1.score,
|
|
f1.score,
|
|
|
|
+ f1.medoupName,
|
|
|
|
+ f1.wardName,
|
|
f2.avgScore,
|
|
f2.avgScore,
|
|
f1.scoreBn,
|
|
f1.scoreBn,
|
|
<if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
|
|
<if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
|
|
@@ -8932,6 +8946,7 @@
|
|
t.doctorName,
|
|
t.doctorName,
|
|
t.doctorId,
|
|
t.doctorId,
|
|
t.`name` AS patName,
|
|
t.`name` AS patName,
|
|
|
|
+ t3.name as medoupName,
|
|
t.behospitalCode AS behospitalCode,
|
|
t.behospitalCode AS behospitalCode,
|
|
t.behospitalDate AS behospitalDate,
|
|
t.behospitalDate AS behospitalDate,
|
|
t.leaveHospitalDate AS leaveHospitalDate,
|
|
t.leaveHospitalDate AS leaveHospitalDate,
|
|
@@ -8943,6 +8958,7 @@
|
|
</if>
|
|
</if>
|
|
t.behDeptId,
|
|
t.behDeptId,
|
|
t.behDeptName,
|
|
t.behDeptName,
|
|
|
|
+ t.wardName,
|
|
t.hospitalId,
|
|
t.hospitalId,
|
|
t.checkStatus,
|
|
t.checkStatus,
|
|
t.mrStatus,
|
|
t.mrStatus,
|
|
@@ -9066,6 +9082,9 @@
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
|
+ AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
</if>
|
|
</if>
|
|
@@ -9154,6 +9173,10 @@
|
|
LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
|
|
LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
|
|
AND t.hospitalId = qi.hospital_id
|
|
AND t.hospitalId = qi.hospital_id
|
|
AND t.behospitalCode = qi.behospital_code
|
|
AND t.behospitalCode = qi.behospital_code
|
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_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">
|
|
<if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
|
|
LEFT JOIN med_qcresult_detail qd ON qd.is_deleted = 'N'
|
|
LEFT JOIN med_qcresult_detail qd ON qd.is_deleted = 'N'
|
|
AND t.hospitalId = qd.hospital_id
|
|
AND t.hospitalId = qd.hospital_id
|
|
@@ -9162,6 +9185,12 @@
|
|
AND qd.cases_id = qc.id
|
|
AND qd.cases_id = qc.id
|
|
</if>
|
|
</if>
|
|
where 1=1
|
|
where 1=1
|
|
|
|
+ <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
|
+ AND t2.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
|
+ AND t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
</if>
|
|
</if>
|
|
@@ -9308,6 +9337,9 @@
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
|
+ AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
</if>
|
|
</if>
|
|
@@ -9391,7 +9423,17 @@
|
|
LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
|
|
LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
|
|
AND t.hospitalId = qi.hospital_id
|
|
AND t.hospitalId = qi.hospital_id
|
|
AND t.behospitalCode = qi.behospital_code
|
|
AND t.behospitalCode = qi.behospital_code
|
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_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
|
|
where 1=1
|
|
|
|
+ <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
|
+ AND t2.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
|
+ AND t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
</if>
|
|
</if>
|