| | |
| | | from pat_med_outhosp pmo left join pat_archive pa on pmo.patid = pa.id |
| | | <where> |
| | | pmo.del_flag=0 |
| | | and pmo.orgid =#{orgid} |
| | | <if test="hospitalname != null and hospitalname != ''">and pmo.hospitalname like concat('%', |
| | | #{hospitalname}, |
| | | '%') |
| | |
| | | <if test="deptname != null and deptname != ''">and pmo.deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="drname != null and drname != ''">and pmo.drname like concat('%', #{drname}, '%')</if> |
| | | <if test="patname != null and patname != ''">and pmo.patname like concat('%', #{patname}, '%')</if> |
| | | <if test="admitdate != null ">and pmo.admitdate = #{admitdate}</if> |
| | | |
| | | <!--<if test="beginTime != null ">and date_format(pmo.admitdate,'%Y%m%d%H%i%s') >= |
| | | date_format(#{beginTime},'%Y%m%d%H%i%s') |
| | | </if> |
| | | <if test="endTime != null ">and date_format(pmo.admitdate,'%Y%m%d%H%i%s') <= |
| | | date_format(#{endTime},'%Y%m%d%H%i%s') |
| | | </if>--> |
| | | <if test="beginTime != null ">and date_format(pmo.admitdate,'%y%m%d') >= |
| | | date_format(#{beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="endTime != null ">and date_format(pmo.admitdate,'%y%m%d') <= |
| | | date_format(#{endTime},'%y%m%d') |
| | | </if> |
| | | <if test="patid != null ">and pmo.patid = #{patid}</if> |
| | | <if test="patno != null ">and pmo.patno = #{patno}</if> |
| | | <if test="orgid != null and orgid != ''">and pmo.orgid = #{orgid}</if> |