| | |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="telshortcode" column="telshortcode"/> |
| | | <result property="relativetelcode" column="relativetelcode"/> |
| | | <result property="idcardtype" column="idcardtype"/> |
| | | <result property="orgid" column="orgid"/> |
| | |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="telshortcode" column="telshortcode"/> |
| | | <result property="relativetelcode" column="relativetelcode"/> |
| | | <result property="idcardtype" column="idcardtype"/> |
| | | <result property="orgid" column="orgid"/> |
| | |
| | | archivetime, |
| | | archiveby, |
| | | telcode, |
| | | telshortcode, |
| | | relativetelcode, |
| | | idcardtype, |
| | | orgid, |
| | |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveByPatidHiss" resultMap="PatArchiveResult"> |
| | | SELECT id, patid_his |
| | | FROM pat_archive |
| | | WHERE patid_his IN |
| | | <foreach item="patidHis" collection="patidHiss" open="(" separator="," close=")"> |
| | | #{patidHis} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertPatArchiveSingle" parameterType="com.smartor.domain.PatArchive" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into pat_archive |
| | |
| | | <if test="archivetime != null">archivetime,</if> |
| | | <if test="archiveby != null">archiveby,</if> |
| | | <if test="telcode != null">telcode,</if> |
| | | <if test="telshortcode != null">telshortcode,</if> |
| | | <if test="relativetelcode != null">relativetelcode,</if> |
| | | <if test="idcardtype != null">idcardtype,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | |
| | | <if test="archivetime != null">#{archivetime},</if> |
| | | <if test="archiveby != null">#{archiveby},</if> |
| | | <if test="telcode != null">#{telcode},</if> |
| | | <if test="telshortcode != null">#{telshortcode},</if> |
| | | <if test="relativetelcode != null">#{relativetelcode},</if> |
| | | <if test="idcardtype != null">#{idcardtype},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | |
| | | <if test="archivetime != null">archivetime = #{archivetime},</if> |
| | | <if test="archiveby != null">archiveby = #{archiveby},</if> |
| | | <if test="telcode != null">telcode = #{telcode},</if> |
| | | <if test="telshortcode != null">telshortcode = #{telshortcode},</if> |
| | | <if test="relativetelcode != null">relativetelcode = #{relativetelcode},</if> |
| | | <if test="idcardtype != null">idcardtype = #{idcardtype},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.telshortcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.telshortcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.telshortcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.telshortcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.telshortcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | |
| | | 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> |
| | |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.telshortcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | |
| | | |
| | | <!-- 住院患者总数统计(去重) --> |
| | | <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> |