| | |
| | | |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | | <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename}, |
| | | AND '%') |
| | | <if test="templatename != null and templatename != ''"> |
| | | and templatename like concat('%', #{templatename},'%') |
| | | </if> |
| | | <if test="startOutHospTime != null"> |
| | | AND date_format(endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d') |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="visitTime != null"> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | and del_flag=0 |
| | | <if test="createStartTime != null and createEndTime != null"> |
| | | and create_time BETWEEN #{createStartTime} AND #{createEndTime} |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | AND del_flag=0 |
| | | and upid is not null |
| | | and visit_count > 1 |
| | |
| | | from service_task a |
| | | JOIN service_subtask b on a.taskid = b.taskid and a.pat_cycle = 0 and b.del_flag = 0 |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | AND b.taskid = #{taskid} |
| | | and b.patid = #{patid} |
| | | <if test="createTime != null and createTime != ''"> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND id in ( |
| | | AND SELECT id FROM |
| | |
| | | <if test="isabnormal != null">isabnormal=#{isabnormal},</if> |
| | | </trim> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | |
| | | FROM service_subtask_detail a |
| | | WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | |
| | | SELECT targetname joyName, |
| | | (select COUNT(sub_id) FROM service_subtask_detail WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | |
| | | ) AND targetid=a.id) joyCount , (SELECT COUNT(*) from (select sub_id FROM service_subtask_detail |
| | | WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">AND |
| | |
| | | FROM service_subtask_detail a |
| | | INNER JOIN service_subtask t ON a.sub_id = t.id |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND a.del_flag=0 |
| | | AND t.del_flag=0 |
| | |
| | | service_subtask_detail ssd |
| | | INNER JOIN service_subtask ss ON ssd.sub_id = ss.id |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND ss.del_flag=0 |
| | | AND IFNULL(ssd.matchedtext,ssd.asrtext) IS NOT NULL |
| | |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc |
| | | FROM service_subtask |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag = 0 |
| | | <if test="sendname != null and sendname != ''"> |