| | |
| | | "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> |
| | | <if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if> |
| | |
| | | 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> |