| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatMedOuthospMapper"> |
| | | |
| | | <resultMap type="PatMedOuthosp" id="PatMedOuthospResult"> |
| | | <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="serialnum" column="serialnum" /> |
| | | <result property="patid" column="patid" /> |
| | |
| | | <result property="schemetime" column="schemetime" /> |
| | | <result property="hpi" column="hpi" /> |
| | | <result property="mainsuit" column="mainsuit" /> |
| | | <result property="outhospno" column="outhospno"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedOuthospVo"> |
| | | select id, serialnum, patid, hospitalname, hospitalcode, icd10code, diagname, deptcode, deptname, drcode, drname, admitdate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, schemestatus, deptid, schemetime, hpi, mainsuit from pat_med_outhosp |
| | | select id, |
| | | outhospno, |
| | | serialnum, |
| | | patid, |
| | | hospitalname, |
| | | hospitalcode, |
| | | icd10code, |
| | | diagname, |
| | | deptcode, |
| | | deptname, |
| | | drcode, |
| | | drname, |
| | | admitdate, |
| | | orgid, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | schemestatus, |
| | | deptid, |
| | | schemetime, |
| | | hpi, |
| | | mainsuit |
| | | from pat_med_outhosp |
| | | </sql> |
| | | |
| | | <select id="selectPatMedOuthospList" parameterType="PatMedOuthosp" resultMap="PatMedOuthospResult"> |
| | | <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp" |
| | | resultMap="PatMedOuthospResult"> |
| | | <include refid="selectPatMedOuthospVo"/> |
| | | <where> |
| | | <if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |
| | | </if> |
| | | <if test="deptname != null and deptname != ''"> and deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="drname != null and drname != ''"> and drname like concat('%', #{drname}, '%')</if> |
| | | <if test="admitdate != null "> and admitdate = #{admitdate}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatMedOuthosp" parameterType="PatMedOuthosp" useGeneratedKeys="true" keyProperty="id"> |
| | | <insert id="insertPatMedOuthosp" parameterType="com.smartor.domain.PatMedOuthosp" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into pat_med_outhosp |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">serialnum,</if> |
| | |
| | | <if test="schemetime != null">schemetime,</if> |
| | | <if test="hpi != null">hpi,</if> |
| | | <if test="mainsuit != null">mainsuit,</if> |
| | | <if test="outhospno != null">outhospno,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="schemetime != null">#{schemetime},</if> |
| | | <if test="hpi != null">#{hpi},</if> |
| | | <if test="mainsuit != null">#{mainsuit},</if> |
| | | <if test="outhospno != null">#{outhospno},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatMedOuthosp" parameterType="PatMedOuthosp"> |
| | | <update id="updatePatMedOuthosp" parameterType="com.smartor.domain.PatMedOuthosp"> |
| | | update pat_med_outhosp |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="serialnum != null">serialnum = #{serialnum},</if> |
| | |
| | | <if test="schemetime != null">schemetime = #{schemetime},</if> |
| | | <if test="hpi != null">hpi = #{hpi},</if> |
| | | <if test="mainsuit != null">mainsuit = #{mainsuit},</if> |
| | | <if test="outhospno != null">outhospno = #{outhospno},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deletePatMedOuthospById" parameterType="Long"> |
| | | delete from pat_med_outhosp where id = #{id} |
| | | delete |
| | | from pat_med_outhosp |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletePatMedOuthospByIds" parameterType="String"> |