| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatMedOuthospMapper"> |
| | | |
| | | <resultMap type="PatMedOuthosp" id="PatMedOuthospResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="serialnum" column="serialnum" /> |
| | | <result property="patid" column="patid" /> |
| | | <result property="hospitalname" column="hospitalname" /> |
| | | <result property="hospitalcode" column="hospitalcode" /> |
| | | <result property="icd10code" column="icd10code" /> |
| | | <result property="diagname" column="diagname" /> |
| | | <result property="deptcode" column="deptcode" /> |
| | | <result property="deptname" column="deptname" /> |
| | | <result property="drcode" column="drcode" /> |
| | | <result property="drname" column="drname" /> |
| | | <result property="admitdate" column="admitdate" /> |
| | | <result property="orgid" column="orgid" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="isupload" column="isupload" /> |
| | | <result property="uploadTime" column="upload_time" /> |
| | | <result property="schemestatus" column="schemestatus" /> |
| | | <result property="deptid" column="deptid" /> |
| | | <result property="schemetime" column="schemetime" /> |
| | | <result property="hpi" column="hpi" /> |
| | | <result property="mainsuit" column="mainsuit" /> |
| | | |
| | | <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="hospitalname" column="hospitalname"/> |
| | | <result property="hospitalcode" column="hospitalcode"/> |
| | | <result property="icd10code" column="icd10code"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="admitdate" column="admitdate"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="schemestatus" column="schemestatus"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <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="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> |
| | | <where> |
| | | <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> |
| | | |
| | | |
| | | <select id="selectPatMedOuthospById" parameterType="Long" resultMap="PatMedOuthospResult"> |
| | | <include refid="selectPatMedOuthospVo"/> |
| | | 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> |
| | | </trim> |
| | | <if test="outhospno != null">outhospno,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | | <if test="patid != null">#{patid},</if> |
| | |
| | | <if test="schemetime != null">#{schemetime},</if> |
| | | <if test="hpi != null">#{hpi},</if> |
| | | <if test="mainsuit != null">#{mainsuit},</if> |
| | | </trim> |
| | | <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"> |
| | | delete from pat_med_outhosp where id in |
| | | delete from pat_med_outhosp where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | | </mapper> |