|
@@ -2931,7 +2931,7 @@
|
|
|
) t
|
|
|
where 1=1
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
- AND ifnull(t.checkStatus,0) = #{qcResultShortPageVO.checkStatus}
|
|
|
+ AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -3767,7 +3767,10 @@
|
|
|
|
|
|
<!-- 离院病人评分详情页-->
|
|
|
<select id="leaveHosMRPage" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
|
- SELECT DISTINCT
|
|
|
+ SELECT
|
|
|
+ t.*
|
|
|
+ FROM
|
|
|
+ (SELECT DISTINCT
|
|
|
t1.hospital_id AS hospitalId,
|
|
|
t1.behospital_code AS behospitalCode,
|
|
|
t1.bed_code AS bedCode,
|
|
@@ -3885,19 +3888,11 @@
|
|
|
AND tt3.`name` = '手术记录'
|
|
|
</if>
|
|
|
) be
|
|
|
- <if test="qcResultShortPageVO.checkStatus != null">
|
|
|
- ,med_check_info mci
|
|
|
- WHERE
|
|
|
- mci.is_deleted = 'N'
|
|
|
- AND be.hospital_id = mci.hospital_id
|
|
|
- AND be.behospital_code = mci.behospital_code
|
|
|
- AND ifnull(mci.status,0) = #{qcResultShortPageVO.checkStatus}
|
|
|
- </if>
|
|
|
- <if test="qcResultShortPageVO.checkStatus == null">
|
|
|
- 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
|
|
|
- </if>
|
|
|
+ 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
|
|
|
)t1
|
|
|
<if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==2">
|
|
|
,med_home_page t2
|
|
@@ -3931,6 +3926,11 @@
|
|
|
AND t1.hospital_id = t2.hospital_id
|
|
|
AND t1.behospital_code = t2.behospital_code
|
|
|
</if>
|
|
|
+ )t
|
|
|
+ where 1=1
|
|
|
+ <if test="qcResultShortPageVO.checkStatus != null">
|
|
|
+ and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 病案首页改善率统计(首页)-->
|