<?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">
|
<mapper namespace="com.smartor.mapper.ExternalInfoMapper">
|
|
<resultMap type="com.smartor.domain.ExternalPatientInfo" id="ExternalPatientInfoResult">
|
<result property="brid" column="BRID"/>
|
<result property="brxz" column="BRXZ"/>
|
<result property="jzkh" column="JZKH"/>
|
<result property="mzhm" column="MZHM"/>
|
<result property="zyhm" column="ZYHM"/>
|
<result property="brxm" column="BRXM"/>
|
<result property="brxb" column="BRXB"/>
|
<result property="csny" column="CSNY"/>
|
<result property="hyzk" column="HYZK"/>
|
<result property="csd_x" column="CSD_X"/>
|
<result property="gj" column="GJ"/>
|
<result property="mz" column="MZ"/>
|
<result property="zymc" column="ZYMC"/>
|
<result property="jtdh" column="JTDH"/>
|
<result property="lxrm" column="LXRM"/>
|
<result property="lxgx" column="LXGX"/>
|
<result property="lxdz" column="LXDZ"/>
|
<result property="lxdh" column="LXDH"/>
|
<result property="dwmc" column="DWMC"/>
|
<result property="ryrq" column="RYRQ"/>
|
<result property="jdr" column="JDR"/>
|
<result property="sfzh" column="SFZH"/>
|
</resultMap>
|
|
<resultMap type="com.smartor.domain.ExternalInHospPatientInfo" id="ExternalInHospPatientInfoResult">
|
<result property="brid" column="brid"/>
|
<result property="jgid" column="jgid"/>
|
<result property="ryly" column="ryly"/>
|
<result property="zyhm" column="zyhm"/>
|
<result property="bahm" column="bahm"/>
|
<result property="mzhm" column="mzhm"/>
|
<result property="brxz" column="brxz"/>
|
<result property="zjlx" column="zjlx"/>
|
<result property="sfzh" column="sfzh"/>
|
<result property="brks" column="brks"/>
|
<result property="brksmc" column="brksmc"/>
|
<result property="brbqdm" column="brbqdm"/>
|
<result property="brbq" column="brbq"/>
|
<result property="brch" column="brch"/>
|
<result property="djrq" column="djrq"/>
|
<result property="ryrq" column="ryrq"/>
|
<result property="ryqk" column="ryqk"/>
|
<result property="brqk" column="brqk"/>
|
<result property="zrhsbm" column="zrhsbm"/>
|
<result property="zrhs" column="zrhs"/>
|
<result property="hljb" column="hljb"/>
|
<result property="syysbm" column="syysbm"/>
|
<result property="szys" column="szys"/>
|
<result property="zzysbm" column="zzysbm"/>
|
<result property="zzys" column="zzys"/>
|
<result property="zrysbm" column="zrysbm"/>
|
<result property="zrys" column="zrys"/>
|
</resultMap>
|
|
<resultMap type="com.smartor.domain.ExternalLeaveHospPatientInfo" id="ExternalLeaveHospPatientInfoResult">
|
<result property="brid" column="brid"/>
|
<result property="zybm" column="zybm"/>
|
<result property="cyfs" column="cyfs"/>
|
<result property="cysq" column="cysq"/>
|
<result property="cyxj" column="cyxj"/>
|
<result property="cyyz" column="cyyz"/>
|
<result property="sfyq" column="sfyq"/>
|
<result property="fzyq" column="fzyq"/>
|
<result property="ryqk" column="ryqk"/>
|
<result property="yqzd" column="yqzd"/>
|
<result property="zlgc" column="zlgc"/>
|
<result property="cybq" column="cybq"/>
|
<result property="cybqdm" column="cybqdm"/>
|
<result property="cyks" column="cyks"/>
|
<result property="cyksdm" column="cyksdm"/>
|
<result property="zrysbm" column="zrysbm"/>
|
<result property="zrys" column="zrys"/>
|
<result property="zrhsbm" column="zrhsbm"/>
|
<result property="zrhs" column="zrhs"/>
|
<result property="cyzd" column="cyzd"/>
|
</resultMap>
|
|
<resultMap type="com.smartor.domain.ExternalUserInfo" id="ExternalUserInfoResult">
|
<result property="hisUserId" column="id"/>
|
<result property="orgCode" column="org_code"/>
|
<result property="deptName" column="dept_name"/>
|
<result property="deptCode" column="dept_code"/>
|
<result property="deptsjName" column="deptsj_name"/>
|
<result property="sex" column="sex"/>
|
<result property="gzlb" column="gzlb"/>
|
<result property="zc" column="zc"/>
|
<result property="userName" column="user_name"/>
|
<result property="idCardTypeCode" column="id_card_type_code"/>
|
<result property="idCard" column="id_card"/>
|
<result property="tel" column="tel"/>
|
<result property="physicianNo" column="physician_no"/>
|
<result property="loginName" column="login_name"/>
|
</resultMap>
|
|
<resultMap type="com.smartor.domain.ExternalDeptInfo" id="ExternalDeptInfoResult">
|
<result property="deptName" column="dept_name"/>
|
<result property="deptCode" column="dept_code"/>
|
<result property="bqmc" column="bqbm"/>
|
<result property="sjksdm" column="sjksdm"/>
|
<result property="sjksmc" column="sjksmc"/>
|
</resultMap>
|
|
<resultMap type="com.smartor.domain.ExternalOutHospInfo" id="ExternalOutHospInfResult">
|
<result property="brid" column="brid"/>
|
<result property="jzkh" column="jzkh"/>
|
<result property="lb" column="lb"/>
|
<result property="jzrq" column="jzrq"/>
|
<result property="jzxh" column="jzxh"/>
|
<result property="czbz" column="czbz"/>
|
<result property="ksdm" column="Ksdm"/>
|
<result property="ksmc" column="ksmc"/>
|
<result property="ysdm" column="ysdm"/>
|
<result property="ysmc" column="ysmc"/>
|
<result property="zs" column="zs"/>
|
<result property="xbs" column="xbs"/>
|
<result property="jws" column="jws"/>
|
<result property="zdmc" column="zdmc"/>
|
<result property="zddm" column="zddm"/>
|
<result property="tjbz" column="tjbz"/>
|
<result property="qzbz" column="qzbz"/>
|
</resultMap>
|
|
|
<!-- 患者基本信息 -->
|
<sql id="selectHospitalRecordVo">
|
select BRID,
|
BRXZ,
|
JZKH,
|
MZHM,
|
ZYHM,
|
BRXM,
|
BRXB,
|
CSNY,
|
HYZK,
|
CSD_X,
|
GJ,
|
MZ,
|
ZYMC,
|
JTDH,
|
LXRM,
|
LXGX,
|
LXDZ,
|
LXDH,
|
DWMC,
|
RYRQ,
|
SFZH,
|
JDR
|
from HIT.HF_RYJDXX
|
</sql>
|
|
<!-- 患者入院本信息 -->
|
<sql id="selectInHospitalRecordVo">
|
select brid,
|
jgid,
|
ryly,
|
zyhm,
|
bahm,
|
mzhm,
|
brxz,
|
zjlx,
|
sfzh,
|
brks,
|
brksmc,
|
brbqdm,
|
brbq,
|
brch,
|
djrq,
|
ryrq,
|
ryqk,
|
brqk,
|
zrhsbm,
|
zrhs,
|
hljb,
|
syysbm,
|
szys,
|
zzysbm,
|
zzys,
|
zrysbm,
|
zrys
|
from HIT.HF_ZYXX
|
</sql>
|
|
<!-- 门急诊患者基本信息 -->
|
<!-- 出院记录 -->
|
<sql id="selectLeaveHospitalRecordVo">
|
select brid,
|
zybm,
|
cyfs,
|
cysq,
|
cyxj,
|
cyyz,
|
sfyq,
|
fzyq,
|
ryqk,
|
yqzd,
|
cyks,
|
cyksdm,
|
cybq,
|
cybqdm,
|
zrysbm,
|
zrys,
|
zrhsbm,
|
zrhs,
|
cybqdm,
|
cyzd,
|
zlgc
|
from HIT.HF_CYJL
|
</sql>
|
|
<!-- 医院职工信息 -->
|
<sql id="selectUserVo">
|
select id,
|
org_code,
|
dept_code,
|
dept_name,
|
deptsj_name,
|
sex,
|
gzlb,
|
zc,
|
user_name,
|
id_card_type_code,
|
id_card,
|
tel,
|
physician_no,
|
mm,
|
login_name
|
from HIT.HF_USER
|
</sql>
|
<!-- 医院部门信息 -->
|
<sql id="selectDeptVo">
|
select dept_code,
|
dept_name,
|
bqmc,
|
sjksdm,
|
sjksmc
|
from HIT.HF_DEPT
|
</sql>
|
|
<!-- 门诊患者基本信息 -->
|
<sql id="selectOutHospitalPatientRecordVo">
|
select brid,
|
brxz,
|
jzkh,
|
mzhm,
|
brxm,
|
brxb,
|
csny,
|
hyzk,
|
csd_x,
|
gj,
|
mz,
|
zjlx,
|
sfzh,
|
zymc,
|
jtdh,
|
hkdz,
|
lxrm,
|
lxgx,
|
lxdz,
|
lxdh,
|
dwmc,
|
jdsj,
|
jdr
|
from HIT.HF_HZMZJBXX
|
</sql>
|
|
<!-- 患者门诊基本信息 -->
|
<sql id="selectOutHospitalRecordVo">
|
select brid,
|
jzkh,
|
lb,
|
jzrq,
|
jzxh,
|
czbz,
|
Ksdm,
|
ksmc,
|
ysdm,
|
ysmc,
|
zs,
|
xbs,
|
jws,
|
zdmc,
|
zddm,
|
tjbz,
|
qzbz
|
from HIT.HF_MJZXX
|
</sql>
|
|
<select id="getExternalPatientInfo" resultMap="ExternalPatientInfoResult" parameterType="String">
|
<include refid="selectHospitalRecordVo"/>
|
<where>
|
<if test="brid != null ">and BRID = #{brid}</if>
|
</where>
|
</select>
|
|
<select id="getExternalOutHospInfo" resultMap="ExternalOutHospInfResult">
|
<include refid="selectOutHospitalRecordVo"/>
|
<where>
|
<if test="startTime != null and endTime != null ">and jzrq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
|
TO_DATE(#{endTime},'YYYY-MM-DD')
|
</if>
|
</where>
|
</select>
|
|
<select id="getExternalOutHospPatientInfo" resultMap="ExternalPatientInfoResult">
|
<include refid="selectOutHospitalPatientRecordVo"/>
|
<where>
|
<if test="startTime != null and endTime != null ">and jdsj between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
|
TO_DATE(#{endTime},'YYYY-MM-DD')
|
</if>
|
<if test="brid != null ">and BRID = #{brid}</if>
|
</where>
|
</select>
|
|
<select id="getExternalLeaveHospPatientInfo" resultMap="ExternalLeaveHospPatientInfoResult">
|
<include refid="selectLeaveHospitalRecordVo"/>
|
<where>
|
<if test="startTime != null and endTime != null ">and cysq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
|
TO_DATE(#{endTime},'YYYY-MM-DD')
|
</if>
|
</where>
|
</select>
|
|
<select id="getExternalInHospPatientInfo" resultMap="ExternalInHospPatientInfoResult">
|
<include refid="selectInHospitalRecordVo"/>
|
<where>
|
<if test="startTime != null and endTime != null ">and ryrq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
|
TO_DATE(#{endTime},'YYYY-MM-DD')
|
</if>
|
<if test="brid != null ">and BRID = #{brid}</if>
|
</where>
|
</select>
|
|
<select id="getExternalUserInfo" resultMap="ExternalUserInfoResult">
|
<include refid="selectUserVo"/>
|
<where>
|
<if test="startTime != null and endTime != null ">and create_time between TO_DATE(#{startTime},
|
'YYYY-MM-DD') AND
|
TO_DATE(#{endTime},'YYYY-MM-DD')
|
</if>
|
</where>
|
</select>
|
|
<select id="getExternalDeptInfo" resultMap="ExternalDeptInfoResult">
|
<include refid="selectDeptVo"/>
|
<where>
|
<if test="startTime != null and endTime != null ">and create_time between TO_DATE(#{startTime},
|
'YYYY-MM-DD') AND
|
TO_DATE(#{endTime},'YYYY-MM-DD')
|
</if>
|
</where>
|
</select>
|
|
</mapper>
|