| | |
| | | JOIN |
| | | pat_archive a ON a.id = b.patid |
| | | LEFT JOIN |
| | | pat_archivetag c ON c.patid = a.id AND (C.del_flag = 0 OR C.del_flag IS NULL) |
| | | pat_archivetag c ON c.patid = a.id AND (c.del_flag = 0 OR c.del_flag IS NULL) |
| | | <where> |
| | | a.del_flag = 0 |
| | | AND b.del_flag = 0 |
| | |
| | | <if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | | <if test="orgid != null ">and b.orgid = #{orgid}</if> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="patno != null ">and b.patno = #{patno}</if> |