123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <?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.xinxin.topro.pubservice.mysqlmapper.InpPatientInfoMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.base.sqlservermodel.PatientInfo" >
- <result column="VisitZone" property="visitzone" jdbcType="INTEGER" />
- <result column="DepartNo" property="departno" jdbcType="VARCHAR" />
- <result column="VisitNo" property="visitno" jdbcType="VARCHAR" />
- <result column="ChartNo" property="chartno" jdbcType="VARCHAR" />
- <result column="PtName" property="ptname" jdbcType="VARCHAR" />
- <result column="Gender" property="gender" jdbcType="VARCHAR" />
- <result column="NursingLevel" property="nursinglevel" jdbcType="CHAR" />
- <result column="CriticalPatient" property="criticalpatient" jdbcType="CHAR" />
- <result column="FoodCategory" property="foodcategory" jdbcType="CHAR" />
- <result column="Age" property="age" jdbcType="VARCHAR" />
- <result column="BirthDay" property="birthday" jdbcType="DATE" />
- <result column="DivNo" property="divno" jdbcType="VARCHAR" />
- <result column="BedNo" property="bedno" jdbcType="VARCHAR" />
- <result column="AdmitTime" property="admittime" jdbcType="TIMESTAMP" />
- <result column="PreDischargeTime" property="predischargetime" jdbcType="CHAR" />
- <result column="DischargeTime" property="dischargetime" jdbcType="CHAR" />
- <result column="PtWeight" property="ptweight" jdbcType="DOUBLE" />
- <result column="VisitCardNum" property="visitcardnum" jdbcType="CHAR" />
- <result column="IdNo" property="idno" jdbcType="VARCHAR" />
- <result column="PhyDoctor" property="phydoctor" jdbcType="VARCHAR" />
- <result column="NationalityName" property="nationalityname" jdbcType="VARCHAR" />
- <result column="NationName" property="nationname" jdbcType="VARCHAR" />
- <result column="HomeAddress" property="homeaddress" jdbcType="VARCHAR" />
- <result column="Tel" property="tel" jdbcType="VARCHAR" />
- <result column="ConRelationshipName" property="conrelationshipname" jdbcType="VARCHAR" />
- <result column="ConName" property="conname" jdbcType="VARCHAR" />
- <result column="ConTel" property="contel" jdbcType="VARCHAR" />
- <result column="CardNo" property="cardno" jdbcType="VARCHAR" />
- <result column="HISID" property="hisid" jdbcType="CHAR" />
- <result column="InfantID" property="infantid" jdbcType="INTEGER" />
- <result column="AdmissDivNo" property="admissdivno" jdbcType="VARCHAR" />
- <result column="DischargeDivNo" property="dischargedivno" jdbcType="CHAR" />
- <result column="DiagName" property="diagname" jdbcType="VARCHAR" />
- <result column="InHospitalStatus" property="inhospitalstatus" jdbcType="INTEGER" />
- <result column="ResidentDoctor" property="residentdoctor" jdbcType="VARCHAR" />
- <result column="ChiefDoctor" property="chiefdoctor" jdbcType="CHAR" />
- <result column="ResponsibleNurse" property="responsiblenurse" jdbcType="VARCHAR" />
- <result column="FileFlag" property="fileflag" jdbcType="INTEGER" />
- <result column="JobType" property="jobtype" jdbcType="CHAR" />
- <result column="Marriage" property="marriage" jdbcType="VARCHAR" />
- <result column="NativeName" property="nativename" jdbcType="CHAR" />
- <result column="DivName" property="divname" jdbcType="CHAR" />
- <result column="DepartName" property="departname" jdbcType="CHAR" />
- <result column="AdmissDivName" property="admissdivname" jdbcType="CHAR" />
- <result column="MedAllergy" property="medallergy" jdbcType="CHAR" />
- <result column="departTime" property="departTime" jdbcType="CHAR"/>
- </resultMap>
- <select id="getBedRatio" resultMap="BaseResultMap" >
- SELECT DISTINCT bedNo from V_PatientInfo
- where AdmitTime <= #{etime,jdbcType=TIMESTAMP}
- and DischargeTime >= #{stime,jdbcType=TIMESTAMP}
- and DepartNo = #{DepartNo}
- </select>
- <insert id="insert" parameterType="com.xinxin.topro.base.sqlservermodel.PatientInfo" >
- insert into v_patientinfo (VisitZone, DepartNo, VisitNo,
- ChartNo, PtName, Gender,
- NursingLevel, CriticalPatient, FoodCategory,
- Name_exp_10, BirthDay, DivNo,
- BedNo, AdmitTime, PreDischargeTime,
- DischargeTime, PtWeight, VisitCardNum,
- IdNo, PhyDoctor, NationalityName,
- NationName, HomeAddress, Tel,
- ConRelationshipName, ConName, ConTel,
- CardNo, HISID, InfantID,
- AdmissDivNo, DischargeDivNo, DiagName,
- InHospitalStatus, ResidentDoctor, ChiefDoctor,
- ResponsibleNurse, FileFlag, JobType,
- Marriage, NativeName, DivName,
- DepartName, AdmissDivName, MedAllergy
- )
- values (#{visitzone,jdbcType=INTEGER}, #{departno,jdbcType=VARCHAR}, #{visitno,jdbcType=VARCHAR},
- #{chartno,jdbcType=VARCHAR}, #{ptname,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR},
- #{nursinglevel,jdbcType=CHAR}, #{criticalpatient,jdbcType=CHAR}, #{foodcategory,jdbcType=CHAR},
- #{nameExp10,jdbcType=BIGINT}, #{birthday,jdbcType=DATE}, #{divno,jdbcType=VARCHAR},
- #{bedno,jdbcType=VARCHAR}, #{admittime,jdbcType=TIMESTAMP}, #{predischargetime,jdbcType=CHAR},
- #{dischargetime,jdbcType=CHAR}, #{ptweight,jdbcType=DOUBLE}, #{visitcardnum,jdbcType=CHAR},
- #{idno,jdbcType=VARCHAR}, #{phydoctor,jdbcType=VARCHAR}, #{nationalityname,jdbcType=VARCHAR},
- #{nationname,jdbcType=VARCHAR}, #{homeaddress,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR},
- #{conrelationshipname,jdbcType=VARCHAR}, #{conname,jdbcType=VARCHAR}, #{contel,jdbcType=VARCHAR},
- #{cardno,jdbcType=VARCHAR}, #{hisid,jdbcType=CHAR}, #{infantid,jdbcType=INTEGER},
- #{admissdivno,jdbcType=VARCHAR}, #{dischargedivno,jdbcType=CHAR}, #{diagname,jdbcType=VARCHAR},
- #{inhospitalstatus,jdbcType=INTEGER}, #{residentdoctor,jdbcType=VARCHAR}, #{chiefdoctor,jdbcType=CHAR},
- #{responsiblenurse,jdbcType=VARCHAR}, #{fileflag,jdbcType=INTEGER}, #{jobtype,jdbcType=CHAR},
- #{marriage,jdbcType=VARCHAR}, #{nativename,jdbcType=CHAR}, #{divname,jdbcType=CHAR},
- #{departname,jdbcType=CHAR}, #{admissdivname,jdbcType=CHAR}, #{medallergy,jdbcType=CHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.base.sqlservermodel.PatientInfo" >
- insert into v_patientinfo
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="visitzone != null" >
- VisitZone,
- </if>
- <if test="departno != null" >
- DepartNo,
- </if>
- <if test="visitno != null" >
- VisitNo,
- </if>
- <if test="chartno != null" >
- ChartNo,
- </if>
- <if test="ptname != null" >
- PtName,
- </if>
- <if test="gender != null" >
- Gender,
- </if>
- <if test="nursinglevel != null" >
- NursingLevel,
- </if>
- <if test="criticalpatient != null" >
- CriticalPatient,
- </if>
- <if test="foodcategory != null" >
- FoodCategory,
- </if>
- <if test="nameExp10 != null" >
- Name_exp_10,
- </if>
- <if test="birthday != null" >
- BirthDay,
- </if>
- <if test="divno != null" >
- DivNo,
- </if>
- <if test="bedno != null" >
- BedNo,
- </if>
- <if test="admittime != null" >
- AdmitTime,
- </if>
- <if test="predischargetime != null" >
- PreDischargeTime,
- </if>
- <if test="dischargetime != null" >
- DischargeTime,
- </if>
- <if test="ptweight != null" >
- PtWeight,
- </if>
- <if test="visitcardnum != null" >
- VisitCardNum,
- </if>
- <if test="idno != null" >
- IdNo,
- </if>
- <if test="phydoctor != null" >
- PhyDoctor,
- </if>
- <if test="nationalityname != null" >
- NationalityName,
- </if>
- <if test="nationname != null" >
- NationName,
- </if>
- <if test="homeaddress != null" >
- HomeAddress,
- </if>
- <if test="tel != null" >
- Tel,
- </if>
- <if test="conrelationshipname != null" >
- ConRelationshipName,
- </if>
- <if test="conname != null" >
- ConName,
- </if>
- <if test="contel != null" >
- ConTel,
- </if>
- <if test="cardno != null" >
- CardNo,
- </if>
- <if test="hisid != null" >
- HISID,
- </if>
- <if test="infantid != null" >
- InfantID,
- </if>
- <if test="admissdivno != null" >
- AdmissDivNo,
- </if>
- <if test="dischargedivno != null" >
- DischargeDivNo,
- </if>
- <if test="diagname != null" >
- DiagName,
- </if>
- <if test="inhospitalstatus != null" >
- InHospitalStatus,
- </if>
- <if test="residentdoctor != null" >
- ResidentDoctor,
- </if>
- <if test="chiefdoctor != null" >
- ChiefDoctor,
- </if>
- <if test="responsiblenurse != null" >
- ResponsibleNurse,
- </if>
- <if test="fileflag != null" >
- FileFlag,
- </if>
- <if test="jobtype != null" >
- JobType,
- </if>
- <if test="marriage != null" >
- Marriage,
- </if>
- <if test="nativename != null" >
- NativeName,
- </if>
- <if test="divname != null" >
- DivName,
- </if>
- <if test="departname != null" >
- DepartName,
- </if>
- <if test="admissdivname != null" >
- AdmissDivName,
- </if>
- <if test="medallergy != null" >
- MedAllergy,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="visitzone != null" >
- #{visitzone,jdbcType=INTEGER},
- </if>
- <if test="departno != null" >
- #{departno,jdbcType=VARCHAR},
- </if>
- <if test="visitno != null" >
- #{visitno,jdbcType=VARCHAR},
- </if>
- <if test="chartno != null" >
- #{chartno,jdbcType=VARCHAR},
- </if>
- <if test="ptname != null" >
- #{ptname,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- #{gender,jdbcType=VARCHAR},
- </if>
- <if test="nursinglevel != null" >
- #{nursinglevel,jdbcType=CHAR},
- </if>
- <if test="criticalpatient != null" >
- #{criticalpatient,jdbcType=CHAR},
- </if>
- <if test="foodcategory != null" >
- #{foodcategory,jdbcType=CHAR},
- </if>
- <if test="nameExp10 != null" >
- #{nameExp10,jdbcType=BIGINT},
- </if>
- <if test="birthday != null" >
- #{birthday,jdbcType=DATE},
- </if>
- <if test="divno != null" >
- #{divno,jdbcType=VARCHAR},
- </if>
- <if test="bedno != null" >
- #{bedno,jdbcType=VARCHAR},
- </if>
- <if test="admittime != null" >
- #{admittime,jdbcType=TIMESTAMP},
- </if>
- <if test="predischargetime != null" >
- #{predischargetime,jdbcType=CHAR},
- </if>
- <if test="dischargetime != null" >
- #{dischargetime,jdbcType=CHAR},
- </if>
- <if test="ptweight != null" >
- #{ptweight,jdbcType=DOUBLE},
- </if>
- <if test="visitcardnum != null" >
- #{visitcardnum,jdbcType=CHAR},
- </if>
- <if test="idno != null" >
- #{idno,jdbcType=VARCHAR},
- </if>
- <if test="phydoctor != null" >
- #{phydoctor,jdbcType=VARCHAR},
- </if>
- <if test="nationalityname != null" >
- #{nationalityname,jdbcType=VARCHAR},
- </if>
- <if test="nationname != null" >
- #{nationname,jdbcType=VARCHAR},
- </if>
- <if test="homeaddress != null" >
- #{homeaddress,jdbcType=VARCHAR},
- </if>
- <if test="tel != null" >
- #{tel,jdbcType=VARCHAR},
- </if>
- <if test="conrelationshipname != null" >
- #{conrelationshipname,jdbcType=VARCHAR},
- </if>
- <if test="conname != null" >
- #{conname,jdbcType=VARCHAR},
- </if>
- <if test="contel != null" >
- #{contel,jdbcType=VARCHAR},
- </if>
- <if test="cardno != null" >
- #{cardno,jdbcType=VARCHAR},
- </if>
- <if test="hisid != null" >
- #{hisid,jdbcType=CHAR},
- </if>
- <if test="infantid != null" >
- #{infantid,jdbcType=INTEGER},
- </if>
- <if test="admissdivno != null" >
- #{admissdivno,jdbcType=VARCHAR},
- </if>
- <if test="dischargedivno != null" >
- #{dischargedivno,jdbcType=CHAR},
- </if>
- <if test="diagname != null" >
- #{diagname,jdbcType=VARCHAR},
- </if>
- <if test="inhospitalstatus != null" >
- #{inhospitalstatus,jdbcType=INTEGER},
- </if>
- <if test="residentdoctor != null" >
- #{residentdoctor,jdbcType=VARCHAR},
- </if>
- <if test="chiefdoctor != null" >
- #{chiefdoctor,jdbcType=CHAR},
- </if>
- <if test="responsiblenurse != null" >
- #{responsiblenurse,jdbcType=VARCHAR},
- </if>
- <if test="fileflag != null" >
- #{fileflag,jdbcType=INTEGER},
- </if>
- <if test="jobtype != null" >
- #{jobtype,jdbcType=CHAR},
- </if>
- <if test="marriage != null" >
- #{marriage,jdbcType=VARCHAR},
- </if>
- <if test="nativename != null" >
- #{nativename,jdbcType=CHAR},
- </if>
- <if test="divname != null" >
- #{divname,jdbcType=CHAR},
- </if>
- <if test="departname != null" >
- #{departname,jdbcType=CHAR},
- </if>
- <if test="admissdivname != null" >
- #{admissdivname,jdbcType=CHAR},
- </if>
- <if test="medallergy != null" >
- #{medallergy,jdbcType=CHAR},
- </if>
- </trim>
- </insert>
- </mapper>
|