| | |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | and visit_count is not null |
| | | and visit_count = 1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | and visit_count is not null |
| | | and visit_count > 1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | |
| | | ) AS combined_data |
| | | </select> |
| | | |
| | | <!-- 查询三个维度任意一个未处理的出院患者 --> |
| | | <select id="selectNeedProcessList" resultMap="PatMedInhospResult"> |
| | | SELECT * FROM pat_med_inhosp |
| | | WHERE inhospstate = '1' |
| | | AND fuflag = '1' |
| | | AND del_flag = '0' |
| | | AND ( |
| | | dept_check_flag = '0' |
| | | OR ward_check_flag = '0' |
| | | OR diag_check_flag = '0' |
| | | ) |
| | | </select> |
| | | </mapper> |