| | |
| | | and b.del_flag=0 |
| | | and a.id = b.patid |
| | | AND a.idcardno != '' |
| | | <if test="startOutHospTime != null"> |
| | | AND date_format(b.endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endOutHospTime != null"> |
| | | AND date_format(b.endtime,'%y%m%d') <= date_format(#{endOutHospTime},'%y%m%d') |
| | | </if> |
| | | |
| | | |
| | | <if test="startInHospTime != null"> |
| | | AND date_format(b.starttime,'%y%m%d') >= date_format(#{startInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endInHospTime != null"> |
| | | AND date_format(b.starttime,'%y%m%d') <= date_format(#{endInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |
| | | </if> |
| | |
| | | b.leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%') |
| | | </if> |
| | | |
| | | <if test="leavehospitaldistrictcodes != null"> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0"> |
| | | AND b.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="leaveldeptcodes != null"> |
| | | <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND b.leaveldeptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | |
| | | #{leavediagname}, '%') |
| | | </if> |
| | | <if test="drname != null and drname != ''">and b.drname like concat('%', #{drname}, '%')</if> |
| | | <if test="leavehospitaldistrictcodes != null "> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0"> |
| | | AND b.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="leaveldeptcodes != null"> |
| | | <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND b.leaveldeptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |