| | |
| | | pmo.mainsuit |
| | | from pat_med_outhosp pmo |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND pmo.del_flag=0 |
| | | <if test="orgid != null ">and pmo.orgid = #{orgid}</if> |
| | |
| | | <if test="serverState != null ">and pmo.server_state = #{serverState}</if> |
| | | <if test="hospitalname != null and hospitalname != ''">and pmo.hospitalname like concat('%', |
| | | #{hospitalname}, |
| | | AND '%') |
| | | '%') |
| | | </if> |
| | | <if test="deptcodes != null and deptcodes.size()>0"> |
| | | AND pmo.deptcode IN |
| | | <foreach collection="deptcodes" item="deptcode" open="(" separator="," |
| | | AND close=")"> |
| | | <foreach collection="deptcodes" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | |
| | | FROM |
| | | pat_med_outhosp |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="orgid != null"> |
| | |
| | | FROM |
| | | service_subtask |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag = 0 |
| | | and service_type=3 |
| | |
| | | SELECT deptname, COUNT(1) AS rc |
| | | FROM pat_med_outhosp |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="inhospstate != null"> |