|
@@ -7804,9 +7804,12 @@
|
|
|
<!-- 离院病人评分详情页-->
|
|
|
<select id="leaveHosMRPage" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
|
SELECT DISTINCT
|
|
|
- t.*,
|
|
|
- t4.operation_doctor_id AS operationDocterName,
|
|
|
- t4.operation_level AS operationLevel
|
|
|
+ t.*
|
|
|
+ <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
+ ,
|
|
|
+ GROUP_CONCAT(case when t4.operation_doctor_id is not null then t4.operation_doctor_id else '' end separator ',') AS operationDoctorName,
|
|
|
+ GROUP_CONCAT(case when t4.operation_level is not null then t4.operation_level else '' end separator ',') AS operationLevel
|
|
|
+ </if>
|
|
|
FROM
|
|
|
(SELECT
|
|
|
t1.hospital_id AS hospitalId,
|
|
@@ -8013,7 +8016,7 @@
|
|
|
AND t1.hospital_id = t2.hospital_id
|
|
|
AND t1.behospital_code = t2.behospital_code
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 6">
|
|
|
+ <if test='qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 6 and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
,med_home_page t2
|
|
|
WHERE
|
|
|
t2.is_deleted = 'N'
|
|
@@ -8025,7 +8028,7 @@
|
|
|
or t2.blood_fee != null
|
|
|
)
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 7">
|
|
|
+ <if test='qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 7 and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
,med_home_page t2
|
|
|
,med_doctor_advice b
|
|
|
WHERE
|
|
@@ -8040,13 +8043,17 @@
|
|
|
AND b.da_status != '作废'
|
|
|
</if>
|
|
|
)t
|
|
|
+ <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != "" and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
,med_home_page t3
|
|
|
,med_home_operation_info t4
|
|
|
+ </if>
|
|
|
where 1=1
|
|
|
+ <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != "" and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
AND t.hospitalId = t3.hospital_id
|
|
|
AND t.hospitalId = t4.hospital_id
|
|
|
AND t.behospitalCode = t3.behospital_code
|
|
|
AND t3.home_page_id = t4.home_page_id
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
@@ -8074,11 +8081,15 @@
|
|
|
<if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
|
|
|
AND t.`level` = #{qcResultShortPageVO.level}
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.operationDoctor != null and qcResultShortPageVO.operationDoctor != ''">
|
|
|
- AND t4.`operationDocterName` = #{qcResultShortPageVO.operationDoctor}
|
|
|
- </if>
|
|
|
- <if test="qcResultShortPageVO.operationLevel != null and qcResultShortPageVO.operationLevel != ''">
|
|
|
- AND t4.`operationLevel` = #{qcResultShortPageVO.operationLevel}
|
|
|
+ <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != "" and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
+ <if test="qcResultShortPageVO.operationDoctor != null and qcResultShortPageVO.operationDoctor != ''">
|
|
|
+ AND t4.`operation_doctor_id` = #{qcResultShortPageVO.operationDoctor}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.operationLevel != null and qcResultShortPageVO.operationLevel != ''">
|
|
|
+ AND t4.`operation_level` = #{qcResultShortPageVO.operationLevel}
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ t.behospitalCode
|
|
|
</if>
|
|
|
</select>
|
|
|
|