| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatMedInhospMapper"> |
| | | |
| | | <resultMap type="PatMedInhosp" id="PatMedInhospResult"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedInhosp" id="PatMedInhospResult"> |
| | | <result property="inhospid" column="inhospid" /> |
| | | <result property="inhospno" column="inhospno" /> |
| | | <result property="serialnum" column="serialnum" /> |
| | | <result property="hospitalname" column="hospitalname" /> |
| | | <result property="hospitalcode" column="hospitalcode" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInhospVo"> |
| | | select inhospid, serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bedno, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, leavediagname, leaveicd10code, drcode, drname, schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, deptid, leaveldeptid, schemetime from pat_med_inhosp |
| | | select inhospid,inhospno, serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bedno, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, leavediagname, leaveicd10code, drcode, drname, schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, deptid, leaveldeptid, schemetime from pat_med_inhosp |
| | | </sql> |
| | | |
| | | <select id="selectPatMedInhospList" parameterType="PatMedInhosp" resultMap="PatMedInhospResult"> |
| | | <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult"> |
| | | <include refid="selectPatMedInhospVo"/> |
| | | <where> |
| | | <where> |
| | | <if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''"> and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%')</if> |
| | | <if test="endtime != null "> and endtime = #{endtime}</if> |
| | |
| | | <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''"> and leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%')</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedInhospByInhospid" parameterType="Long" resultMap="PatMedInhospResult"> |
| | | <include refid="selectPatMedInhospVo"/> |
| | | where inhospid = #{inhospid} |
| | | </select> |
| | | |
| | | <insert id="insertPatMedInhosp" parameterType="PatMedInhosp" useGeneratedKeys="true" keyProperty="inhospid"> |
| | | |
| | | <insert id="insertPatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp" useGeneratedKeys="true" keyProperty="inhospid"> |
| | | insert into pat_med_inhosp |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">serialnum,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatMedInhosp" parameterType="PatMedInhosp"> |
| | | <update id="updatePatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp"> |
| | | update pat_med_inhosp |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="serialnum != null">serialnum = #{serialnum},</if> |
| | |
| | | </delete> |
| | | |
| | | <delete id="deletePatMedInhospByInhospids" parameterType="String"> |
| | | delete from pat_med_inhosp where inhospid in |
| | | delete from pat_med_inhosp where inhospid in |
| | | <foreach item="inhospid" collection="array" open="(" separator="," close=")"> |
| | | #{inhospid} |
| | | </foreach> |