| | |
| | | LEFT JOIN |
| | | pat_archivetag c ON c.patid = a.id AND (c.del_flag = 0 OR c.del_flag IS NULL) |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND a.del_flag = 0 |
| | | AND b.del_flag = 0 |
| | |
| | | <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <= |
| | | AND date_format(#{endInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | AND '%') |
| | | <if test="hospitalname != null and hospitalname != ''"> |
| | | and hospitalname like concat('%', #{hospitalname},'%') |
| | | </if> |
| | | <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''">and hospitaldistrictname like |
| | | AND concat('%', #{hospitaldistrictname}, '%') |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''"> |
| | | and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if> |
| | |
| | | pat_med_inhosp b |
| | | |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | |
| | |
| | | pat_med_inhosp b, |
| | | pat_archive a |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND a.del_flag=0 |
| | | and b.del_flag=0 |
| | | and a.id = b.patid |
| | | AND a.idcardno != '' |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | AND '%') |
| | | <if test="hospitalname != null and hospitalname != ''"> |
| | | and hospitalname like concat('%', #{hospitalname},'%') |
| | | </if> |
| | | <if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if> |
| | | <if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''">and hospitaldistrictname like |
| | | AND concat('%', #{hospitaldistrictname}, '%') |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''"> |
| | | and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | |
| | | SELECT deptname |
| | | FROM pat_med_outhosp |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | |
| | | SELECT deptname |
| | | FROM pat_med_inhosp |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | and inhospstate=0 |
| | |
| | | SELECT deptname |
| | | FROM pat_med_inhosp |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | and inhospstate=1 |
| | |
| | | SELECT deptname |
| | | FROM pat_med_inhosp |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag=0 |
| | | and inhospstate=1 |
| | |
| | | FROM |
| | | pat_med_inhosp |
| | | 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=2 |
| | |
| | | FROM |
| | | service_subtask |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag = 0 |
| | | and service_type=2 |
| | |
| | | FROM |
| | | service_subtask |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag = 0 |
| | | and service_type=2 |
| | |
| | | FROM |
| | | service_subtask |
| | | WHERE 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | |
| | | AND del_flag = 0 |
| | | and service_type=13 |