|
@@ -9,23 +9,50 @@
|
|
rec_id,
|
|
rec_id,
|
|
rec_title,
|
|
rec_title,
|
|
loss_cause,
|
|
loss_cause,
|
|
- loss_type,
|
|
|
|
- loss_way,
|
|
|
|
|
|
+ CASE WHEN loss_type = '0' THEN '文书丢失'
|
|
|
|
+ WHEN loss_type = '1' THEN '病案首页丢失'
|
|
|
|
+ ELSE '患者信息丢失' END AS loss_type,
|
|
|
|
+ CASE WHEN loss_way = '0' THEN '外部丢失'
|
|
|
|
+ ELSE '内部丢失' END AS loss_way,
|
|
gmt_modified,
|
|
gmt_modified,
|
|
- `status`,
|
|
|
|
- is_audited
|
|
|
|
|
|
+ CASE WHEN `status` = '0' THEN '已丢失'
|
|
|
|
+ ELSE '已恢复' END AS `status`,
|
|
|
|
+ CASE WHEN loss_type = '0' THEN '未通过'
|
|
|
|
+ WHEN loss_type = '1' THEN '已通过'
|
|
|
|
+ ELSE '未核查' END AS is_audited
|
|
FROM
|
|
FROM
|
|
`dc_blockloss_result`
|
|
`dc_blockloss_result`
|
|
WHERE
|
|
WHERE
|
|
is_deleted = "N"
|
|
is_deleted = "N"
|
|
-<!-- AND gmt_create >= ""-->
|
|
|
|
-<!-- AND gmt_create < ""-->
|
|
|
|
- AND behospital_code = ""
|
|
|
|
- AND rec_id = ""
|
|
|
|
- AND rec_title LIKE "%%"
|
|
|
|
- AND loss_type = ""
|
|
|
|
- AND loss_way = ""
|
|
|
|
- AND is_audited = ""
|
|
|
|
- AND `status` = ""
|
|
|
|
|
|
+ <if test="getBlockLossPageVO.hospitalId != null">
|
|
|
|
+ AND hospital_id = #{getBlockLossPageVO.hospitalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.startDate != null">
|
|
|
|
+ <![CDATA[AND gmt_create >= #{getBlockLossPageVO.startDate}]]>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.endDate != null">
|
|
|
|
+ <![CDATA[ AND gmt_create <= #{getBlockLossPageVO.endDate}]]>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.behospitalCode != null and getBlockLossPageVO.behospitalCode != ''">
|
|
|
|
+ AND behospital_code = #{getBlockLossPageVO.behospitalCode}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
|
|
|
|
+ AND rec_id = #{getBlockLossPageVO.recId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.recTitle != null and getBlockLossPageVO.recTitle != ''">
|
|
|
|
+ AND rec_title LIKE CONCAT('%',#{getBlockLossPageVO.recTitle},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
|
|
|
|
+ AND loss_type = #{getBlockLossPageVO.lossType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
|
|
|
|
+ AND loss_way = #{getBlockLossPageVO.lossWay}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
|
|
|
|
+ AND is_audited = #{getBlockLossPageVO.isAudited}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
|
|
|
|
+ AND `status` = #{getBlockLossPageVO.status}
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|