| | |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if> |
| | | <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="id != null and id != ''">and id = #{id}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | |
| | | <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if> |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="campusid != null ">and campusid = #{campusid}</if> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | |
| | |
| | | d.leavehospitaldistrictcode AS leavehospitaldistrictcode |
| | | FROM |
| | | pat_med_inhosp d |
| | | JOIN pat_archive a ON a.id = d.patid |
| | | LEFT JOIN pat_archive a ON a.id = d.patid |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if> |
| | |
| | | </if> |
| | | |
| | | <if test="pids != null"> |
| | | AND a.id NOT IN |
| | | AND d.patid NOT IN |
| | | <foreach collection="pids" item="pid" open="(" separator="," close=")"> |
| | | #{pid} |
| | | </foreach> |
| | |
| | | |
| | | <!-- 住院患者总数统计(去重) --> |
| | | <select id="countPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq" resultType="long"> |
| | | SELECT COUNT(DISTINCT a.id) |
| | | SELECT COUNT(DISTINCT d.patid) |
| | | FROM pat_med_inhosp d |
| | | JOIN pat_archive a ON a.id = d.patid |
| | | WHERE 1=1 |
| | | AND d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | AND d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">AND a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">AND a.idcardno = #{idcardno}</if> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="pids != null"> |
| | | AND a.id NOT IN |
| | | AND d.patid NOT IN |
| | | <foreach collection="pids" item="pid" open="(" separator="," close=")"> |
| | | #{pid} |
| | | </foreach> |