123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856 |
- <?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.inpnurseservice.mysqlmapper.InpPatientMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient" >
- <id column="IP_ID" property="ipId" jdbcType="INTEGER" />
- <result column="IP_PatientNo" property="ipPatientno" jdbcType="VARCHAR" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
- <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
- <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
- <result column="IP_Visit_No" property="ipVisitNo" jdbcType="VARCHAR" />
- <result column="IP_Med_Rec" property="ipMedRec" jdbcType="VARCHAR" />
- <result column="IP_Height" property="ipHeight" jdbcType="DOUBLE" />
- <result column="IP_Weight" property="ipWeight" jdbcType="DOUBLE" />
- <result column="IP_Name" property="ipName" jdbcType="VARCHAR" />
- <result column="IP_Sex" property="ipSex" jdbcType="INTEGER" />
- <result column="IP_Birth" property="ipBirth" jdbcType="TIMESTAMP" />
- <result column="IP_ID_Number" property="ipIdNumber" jdbcType="VARCHAR" />
- <result column="IP_Citizenship" property="ipCitizenship" jdbcType="VARCHAR" />
- <result column="IP_IsMarried" property="ipIsmarried" jdbcType="INTEGER" />
- <result column="IP_Nationality" property="ipNationality" jdbcType="VARCHAR" />
- <result column="IP_Blood" property="ipBlood" jdbcType="VARCHAR" />
- <result column="IP_Home_Address" property="ipHomeAddress" jdbcType="VARCHAR" />
- <result column="IP_Telephone" property="ipTelephone" jdbcType="VARCHAR" />
- <result column="IP_Contact_Person" property="ipContactPerson" jdbcType="VARCHAR" />
- <result column="IP_Relationship" property="ipRelationship" jdbcType="VARCHAR" />
- <result column="IP_Contact_Tel" property="ipContactTel" jdbcType="VARCHAR" />
- <result column="IP_Medicare_Card" property="ipMedicareCard" jdbcType="VARCHAR" />
- <result column="IP_Attending_Doctor" property="ipAttendingDoctor" jdbcType="VARCHAR" />
- <result column="IP_Admit_Diagnosis" property="ipAdmitDiagnosis" jdbcType="VARCHAR" />
- <result column="IP_Resident_Doctor" property="ipResidentDoctor" jdbcType="VARCHAR" />
- <result column="IP_Outpatient_Doctor" property="ipOutpatientDoctor" jdbcType="VARCHAR" />
- <result column="IP_Duty_Nurse" property="ipDutyNurse" jdbcType="VARCHAR" />
- <result column="IP_Duty_Leader" property="ipDutyLeader" jdbcType="VARCHAR" />
- <result column="IP_Hospitalized_Times" property="ipHospitalizedTimes" jdbcType="INTEGER" />
- <result column="IP_Status" property="ipStatus" jdbcType="INTEGER" />
- <result column="IP_Admit_Time" property="ipAdmitTime" jdbcType="TIMESTAMP" />
- <result column="IP_Admit_Dep" property="ipAdmitDep" jdbcType="VARCHAR" />
- <result column="IP_Admit_Ward" property="ipAdmitWard" jdbcType="VARCHAR" />
- <result column="IP_Admit_Bed" property="ipAdmitBed" jdbcType="VARCHAR" />
- <result column="IP_Out_Direction" property="ipOutDirection" jdbcType="VARCHAR" />
- <result column="IP_IsInfant" property="ipIsinfant" jdbcType="INTEGER" />
- <result column="IP_IsFreeze" property="ipIsfreeze" jdbcType="INTEGER" />
- <result column="IP_IsFile" property="ipIsfile" jdbcType="INTEGER" />
- <result column="IP_Recall_Reason" property="ipRecallReason" jdbcType="INTEGER" />
- <result column="IP_IsArrears" property="ipIsarrears" jdbcType="INTEGER" />
- <result column="IP_IsPressure" property="ipIspressure" jdbcType="INTEGER" />
- <result column="IP_IsFall" property="ipIsfall" jdbcType="INTEGER" />
- <result column="IP_IsConstraint" property="ipIsconstraint" jdbcType="INTEGER" />
- <result column="IP_IsInhibition" property="ipIsinhibition" jdbcType="INTEGER" />
- <result column="IP_IsFragile" property="ipIsfragile" jdbcType="INTEGER" />
- <result column="IP_IsAllergy" property="ipIsallergy" jdbcType="INTEGER" />
- <result column="IP_IsPostoperative" property="ipIspostoperative" jdbcType="INTEGER" />
- <result column="IP_Operation_Time" property="ipOperationTime" jdbcType="TIMESTAMP" />
- <result column="IP_Operator" property="ipOperator" jdbcType="VARCHAR" />
- <result column="IP_IsDel" property="ipIsdel" jdbcType="INTEGER" />
- <result column="IP_Discharge_Time" property="ipDischargeTime" jdbcType="TIMESTAMP" />
- <result column="IP_PreDischarge_Time" property="ipPredischargeTime" jdbcType="TIMESTAMP" />
- <result column="IP_Patient_Type" property="ipPatientType" jdbcType="VARCHAR" />
- <result column="IP_Nursing_Level" property="ipNursingLevel" jdbcType="VARCHAR" />
- <result column="IP_Isolate" property="ipIsolate" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IP_ID, IP_PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IP_Visit_No, IP_Med_Rec,
- IP_Height, IP_Weight, IP_Name, IP_Sex, IP_Birth, IP_ID_Number, IP_Citizenship, IP_IsMarried,
- IP_Nationality, IP_Blood, IP_Home_Address, IP_Telephone, IP_Contact_Person, IP_Relationship,
- IP_Contact_Tel, IP_Medicare_Card, IP_Attending_Doctor, IP_Admit_Diagnosis, IP_Resident_Doctor,
- IP_Outpatient_Doctor, IP_Duty_Nurse, IP_Duty_Leader, IP_Hospitalized_Times, IP_Status,
- IP_Admit_Time, IP_Admit_Dep, IP_Admit_Ward, IP_Admit_Bed, IP_Out_Direction, IP_IsInfant,
- IP_IsFreeze, IP_IsFile, IP_Recall_Reason, IP_IsArrears, IP_IsPressure, IP_IsFall,
- IP_IsConstraint, IP_IsInhibition, IP_IsFragile, IP_IsAllergy, IP_IsPostoperative,
- IP_Operation_Time, IP_Operator, IP_IsDel, IP_Discharge_Time, IP_PreDischarge_Time,
- IP_Patient_Type, IP_Nursing_Level, IP_Isolate
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_patient
- where IP_ID = #{ipId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_patient
- where IP_ID = #{ipId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient" >
- insert into inp_patient (IP_ID, IP_PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IP_Visit_No, IP_Med_Rec, IP_Height,
- IP_Weight, IP_Name, IP_Sex,
- IP_Birth, IP_ID_Number, IP_Citizenship,
- IP_IsMarried, IP_Nationality, IP_Blood,
- IP_Home_Address, IP_Telephone, IP_Contact_Person,
- IP_Relationship, IP_Contact_Tel, IP_Medicare_Card,
- IP_Attending_Doctor, IP_Admit_Diagnosis, IP_Resident_Doctor,
- IP_Outpatient_Doctor, IP_Duty_Nurse, IP_Duty_Leader,
- IP_Hospitalized_Times, IP_Status, IP_Admit_Time,
- IP_Admit_Dep, IP_Admit_Ward, IP_Admit_Bed,
- IP_Out_Direction, IP_IsInfant, IP_IsFreeze,
- IP_IsFile, IP_Recall_Reason, IP_IsArrears,
- IP_IsPressure, IP_IsFall, IP_IsConstraint,
- IP_IsInhibition, IP_IsFragile, IP_IsAllergy,
- IP_IsPostoperative, IP_Operation_Time, IP_Operator,
- IP_IsDel, IP_Discharge_Time, IP_PreDischarge_Time,
- IP_Patient_Type, IP_Nursing_Level, IP_Isolate
- )
- values (#{ipId,jdbcType=INTEGER}, #{ipPatientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{ipVisitNo,jdbcType=VARCHAR}, #{ipMedRec,jdbcType=VARCHAR}, #{ipHeight,jdbcType=DOUBLE},
- #{ipWeight,jdbcType=DOUBLE}, #{ipName,jdbcType=VARCHAR}, #{ipSex,jdbcType=INTEGER},
- #{ipBirth,jdbcType=TIMESTAMP}, #{ipIdNumber,jdbcType=VARCHAR}, #{ipCitizenship,jdbcType=VARCHAR},
- #{ipIsmarried,jdbcType=INTEGER}, #{ipNationality,jdbcType=VARCHAR}, #{ipBlood,jdbcType=VARCHAR},
- #{ipHomeAddress,jdbcType=VARCHAR}, #{ipTelephone,jdbcType=VARCHAR}, #{ipContactPerson,jdbcType=VARCHAR},
- #{ipRelationship,jdbcType=VARCHAR}, #{ipContactTel,jdbcType=VARCHAR}, #{ipMedicareCard,jdbcType=VARCHAR},
- #{ipAttendingDoctor,jdbcType=VARCHAR}, #{ipAdmitDiagnosis,jdbcType=VARCHAR}, #{ipResidentDoctor,jdbcType=VARCHAR},
- #{ipOutpatientDoctor,jdbcType=VARCHAR}, #{ipDutyNurse,jdbcType=VARCHAR}, #{ipDutyLeader,jdbcType=VARCHAR},
- #{ipHospitalizedTimes,jdbcType=INTEGER}, #{ipStatus,jdbcType=INTEGER}, #{ipAdmitTime,jdbcType=TIMESTAMP},
- #{ipAdmitDep,jdbcType=VARCHAR}, #{ipAdmitWard,jdbcType=VARCHAR}, #{ipAdmitBed,jdbcType=VARCHAR},
- #{ipOutDirection,jdbcType=VARCHAR}, #{ipIsinfant,jdbcType=INTEGER}, #{ipIsfreeze,jdbcType=INTEGER},
- #{ipIsfile,jdbcType=INTEGER}, #{ipRecallReason,jdbcType=INTEGER}, #{ipIsarrears,jdbcType=INTEGER},
- #{ipIspressure,jdbcType=INTEGER}, #{ipIsfall,jdbcType=INTEGER}, #{ipIsconstraint,jdbcType=INTEGER},
- #{ipIsinhibition,jdbcType=INTEGER}, #{ipIsfragile,jdbcType=INTEGER}, #{ipIsallergy,jdbcType=INTEGER},
- #{ipIspostoperative,jdbcType=INTEGER}, #{ipOperationTime,jdbcType=TIMESTAMP}, #{ipOperator,jdbcType=VARCHAR},
- #{ipIsdel,jdbcType=INTEGER}, #{ipDischargeTime,jdbcType=TIMESTAMP}, #{ipPredischargeTime,jdbcType=TIMESTAMP},
- #{ipPatientType,jdbcType=VARCHAR}, #{ipNursingLevel,jdbcType=VARCHAR}, #{ipIsolate,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient" >
- insert into inp_patient
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ipId != null" >
- IP_ID,
- </if>
- <if test="ipPatientno != null" >
- IP_PatientNo,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm,
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm,
- </if>
- <if test="dbBedno != null" >
- DB_BedNo,
- </if>
- <if test="ipVisitNo != null" >
- IP_Visit_No,
- </if>
- <if test="ipMedRec != null" >
- IP_Med_Rec,
- </if>
- <if test="ipHeight != null" >
- IP_Height,
- </if>
- <if test="ipWeight != null" >
- IP_Weight,
- </if>
- <if test="ipName != null" >
- IP_Name,
- </if>
- <if test="ipSex != null" >
- IP_Sex,
- </if>
- <if test="ipBirth != null" >
- IP_Birth,
- </if>
- <if test="ipIdNumber != null" >
- IP_ID_Number,
- </if>
- <if test="ipCitizenship != null" >
- IP_Citizenship,
- </if>
- <if test="ipIsmarried != null" >
- IP_IsMarried,
- </if>
- <if test="ipNationality != null" >
- IP_Nationality,
- </if>
- <if test="ipBlood != null" >
- IP_Blood,
- </if>
- <if test="ipHomeAddress != null" >
- IP_Home_Address,
- </if>
- <if test="ipTelephone != null" >
- IP_Telephone,
- </if>
- <if test="ipContactPerson != null" >
- IP_Contact_Person,
- </if>
- <if test="ipRelationship != null" >
- IP_Relationship,
- </if>
- <if test="ipContactTel != null" >
- IP_Contact_Tel,
- </if>
- <if test="ipMedicareCard != null" >
- IP_Medicare_Card,
- </if>
- <if test="ipAttendingDoctor != null" >
- IP_Attending_Doctor,
- </if>
- <if test="ipAdmitDiagnosis != null" >
- IP_Admit_Diagnosis,
- </if>
- <if test="ipResidentDoctor != null" >
- IP_Resident_Doctor,
- </if>
- <if test="ipOutpatientDoctor != null" >
- IP_Outpatient_Doctor,
- </if>
- <if test="ipDutyNurse != null" >
- IP_Duty_Nurse,
- </if>
- <if test="ipDutyLeader != null" >
- IP_Duty_Leader,
- </if>
- <if test="ipHospitalizedTimes != null" >
- IP_Hospitalized_Times,
- </if>
- <if test="ipStatus != null" >
- IP_Status,
- </if>
- <if test="ipAdmitTime != null" >
- IP_Admit_Time,
- </if>
- <if test="ipAdmitDep != null" >
- IP_Admit_Dep,
- </if>
- <if test="ipAdmitWard != null" >
- IP_Admit_Ward,
- </if>
- <if test="ipAdmitBed != null" >
- IP_Admit_Bed,
- </if>
- <if test="ipOutDirection != null" >
- IP_Out_Direction,
- </if>
- <if test="ipIsinfant != null" >
- IP_IsInfant,
- </if>
- <if test="ipIsfreeze != null" >
- IP_IsFreeze,
- </if>
- <if test="ipIsfile != null" >
- IP_IsFile,
- </if>
- <if test="ipRecallReason != null" >
- IP_Recall_Reason,
- </if>
- <if test="ipIsarrears != null" >
- IP_IsArrears,
- </if>
- <if test="ipIspressure != null" >
- IP_IsPressure,
- </if>
- <if test="ipIsfall != null" >
- IP_IsFall,
- </if>
- <if test="ipIsconstraint != null" >
- IP_IsConstraint,
- </if>
- <if test="ipIsinhibition != null" >
- IP_IsInhibition,
- </if>
- <if test="ipIsfragile != null" >
- IP_IsFragile,
- </if>
- <if test="ipIsallergy != null" >
- IP_IsAllergy,
- </if>
- <if test="ipIspostoperative != null" >
- IP_IsPostoperative,
- </if>
- <if test="ipOperationTime != null" >
- IP_Operation_Time,
- </if>
- <if test="ipOperator != null" >
- IP_Operator,
- </if>
- <if test="ipIsdel != null" >
- IP_IsDel,
- </if>
- <if test="ipDischargeTime != null" >
- IP_Discharge_Time,
- </if>
- <if test="ipPredischargeTime != null" >
- IP_PreDischarge_Time,
- </if>
- <if test="ipPatientType != null" >
- IP_Patient_Type,
- </if>
- <if test="ipNursingLevel != null" >
- IP_Nursing_Level,
- </if>
- <if test="ipIsolate != null" >
- IP_Isolate,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ipId != null" >
- #{ipId,jdbcType=INTEGER},
- </if>
- <if test="ipPatientno != null" >
- #{ipPatientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ddDepdm != null" >
- #{ddDepdm,jdbcType=VARCHAR},
- </if>
- <if test="dwWarddm != null" >
- #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dbBedno != null" >
- #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="ipVisitNo != null" >
- #{ipVisitNo,jdbcType=VARCHAR},
- </if>
- <if test="ipMedRec != null" >
- #{ipMedRec,jdbcType=VARCHAR},
- </if>
- <if test="ipHeight != null" >
- #{ipHeight,jdbcType=DOUBLE},
- </if>
- <if test="ipWeight != null" >
- #{ipWeight,jdbcType=DOUBLE},
- </if>
- <if test="ipName != null" >
- #{ipName,jdbcType=VARCHAR},
- </if>
- <if test="ipSex != null" >
- #{ipSex,jdbcType=INTEGER},
- </if>
- <if test="ipBirth != null" >
- #{ipBirth,jdbcType=TIMESTAMP},
- </if>
- <if test="ipIdNumber != null" >
- #{ipIdNumber,jdbcType=VARCHAR},
- </if>
- <if test="ipCitizenship != null" >
- #{ipCitizenship,jdbcType=VARCHAR},
- </if>
- <if test="ipIsmarried != null" >
- #{ipIsmarried,jdbcType=INTEGER},
- </if>
- <if test="ipNationality != null" >
- #{ipNationality,jdbcType=VARCHAR},
- </if>
- <if test="ipBlood != null" >
- #{ipBlood,jdbcType=VARCHAR},
- </if>
- <if test="ipHomeAddress != null" >
- #{ipHomeAddress,jdbcType=VARCHAR},
- </if>
- <if test="ipTelephone != null" >
- #{ipTelephone,jdbcType=VARCHAR},
- </if>
- <if test="ipContactPerson != null" >
- #{ipContactPerson,jdbcType=VARCHAR},
- </if>
- <if test="ipRelationship != null" >
- #{ipRelationship,jdbcType=VARCHAR},
- </if>
- <if test="ipContactTel != null" >
- #{ipContactTel,jdbcType=VARCHAR},
- </if>
- <if test="ipMedicareCard != null" >
- #{ipMedicareCard,jdbcType=VARCHAR},
- </if>
- <if test="ipAttendingDoctor != null" >
- #{ipAttendingDoctor,jdbcType=VARCHAR},
- </if>
- <if test="ipAdmitDiagnosis != null" >
- #{ipAdmitDiagnosis,jdbcType=VARCHAR},
- </if>
- <if test="ipResidentDoctor != null" >
- #{ipResidentDoctor,jdbcType=VARCHAR},
- </if>
- <if test="ipOutpatientDoctor != null" >
- #{ipOutpatientDoctor,jdbcType=VARCHAR},
- </if>
- <if test="ipDutyNurse != null" >
- #{ipDutyNurse,jdbcType=VARCHAR},
- </if>
- <if test="ipDutyLeader != null" >
- #{ipDutyLeader,jdbcType=VARCHAR},
- </if>
- <if test="ipHospitalizedTimes != null" >
- #{ipHospitalizedTimes,jdbcType=INTEGER},
- </if>
- <if test="ipStatus != null" >
- #{ipStatus,jdbcType=INTEGER},
- </if>
- <if test="ipAdmitTime != null" >
- #{ipAdmitTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipAdmitDep != null" >
- #{ipAdmitDep,jdbcType=VARCHAR},
- </if>
- <if test="ipAdmitWard != null" >
- #{ipAdmitWard,jdbcType=VARCHAR},
- </if>
- <if test="ipAdmitBed != null" >
- #{ipAdmitBed,jdbcType=VARCHAR},
- </if>
- <if test="ipOutDirection != null" >
- #{ipOutDirection,jdbcType=VARCHAR},
- </if>
- <if test="ipIsinfant != null" >
- #{ipIsinfant,jdbcType=INTEGER},
- </if>
- <if test="ipIsfreeze != null" >
- #{ipIsfreeze,jdbcType=INTEGER},
- </if>
- <if test="ipIsfile != null" >
- #{ipIsfile,jdbcType=INTEGER},
- </if>
- <if test="ipRecallReason != null" >
- #{ipRecallReason,jdbcType=INTEGER},
- </if>
- <if test="ipIsarrears != null" >
- #{ipIsarrears,jdbcType=INTEGER},
- </if>
- <if test="ipIspressure != null" >
- #{ipIspressure,jdbcType=INTEGER},
- </if>
- <if test="ipIsfall != null" >
- #{ipIsfall,jdbcType=INTEGER},
- </if>
- <if test="ipIsconstraint != null" >
- #{ipIsconstraint,jdbcType=INTEGER},
- </if>
- <if test="ipIsinhibition != null" >
- #{ipIsinhibition,jdbcType=INTEGER},
- </if>
- <if test="ipIsfragile != null" >
- #{ipIsfragile,jdbcType=INTEGER},
- </if>
- <if test="ipIsallergy != null" >
- #{ipIsallergy,jdbcType=INTEGER},
- </if>
- <if test="ipIspostoperative != null" >
- #{ipIspostoperative,jdbcType=INTEGER},
- </if>
- <if test="ipOperationTime != null" >
- #{ipOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipOperator != null" >
- #{ipOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipIsdel != null" >
- #{ipIsdel,jdbcType=INTEGER},
- </if>
- <if test="ipDischargeTime != null" >
- #{ipDischargeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipPredischargeTime != null" >
- #{ipPredischargeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipPatientType != null" >
- #{ipPatientType,jdbcType=VARCHAR},
- </if>
- <if test="ipNursingLevel != null" >
- #{ipNursingLevel,jdbcType=VARCHAR},
- </if>
- <if test="ipIsolate != null" >
- #{ipIsolate,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient" >
- update inp_patient
- <set >
- <if test="ipPatientno != null" >
- IP_PatientNo = #{ipPatientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dbBedno != null" >
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="ipVisitNo != null" >
- IP_Visit_No = #{ipVisitNo,jdbcType=VARCHAR},
- </if>
- <if test="ipMedRec != null" >
- IP_Med_Rec = #{ipMedRec,jdbcType=VARCHAR},
- </if>
- <if test="ipHeight != null" >
- IP_Height = #{ipHeight,jdbcType=DOUBLE},
- </if>
- <if test="ipWeight != null" >
- IP_Weight = #{ipWeight,jdbcType=DOUBLE},
- </if>
- <if test="ipName != null" >
- IP_Name = #{ipName,jdbcType=VARCHAR},
- </if>
- <if test="ipSex != null" >
- IP_Sex = #{ipSex,jdbcType=INTEGER},
- </if>
- <if test="ipBirth != null" >
- IP_Birth = #{ipBirth,jdbcType=TIMESTAMP},
- </if>
- <if test="ipIdNumber != null" >
- IP_ID_Number = #{ipIdNumber,jdbcType=VARCHAR},
- </if>
- <if test="ipCitizenship != null" >
- IP_Citizenship = #{ipCitizenship,jdbcType=VARCHAR},
- </if>
- <if test="ipIsmarried != null" >
- IP_IsMarried = #{ipIsmarried,jdbcType=INTEGER},
- </if>
- <if test="ipNationality != null" >
- IP_Nationality = #{ipNationality,jdbcType=VARCHAR},
- </if>
- <if test="ipBlood != null" >
- IP_Blood = #{ipBlood,jdbcType=VARCHAR},
- </if>
- <if test="ipHomeAddress != null" >
- IP_Home_Address = #{ipHomeAddress,jdbcType=VARCHAR},
- </if>
- <if test="ipTelephone != null" >
- IP_Telephone = #{ipTelephone,jdbcType=VARCHAR},
- </if>
- <if test="ipContactPerson != null" >
- IP_Contact_Person = #{ipContactPerson,jdbcType=VARCHAR},
- </if>
- <if test="ipRelationship != null" >
- IP_Relationship = #{ipRelationship,jdbcType=VARCHAR},
- </if>
- <if test="ipContactTel != null" >
- IP_Contact_Tel = #{ipContactTel,jdbcType=VARCHAR},
- </if>
- <if test="ipMedicareCard != null" >
- IP_Medicare_Card = #{ipMedicareCard,jdbcType=VARCHAR},
- </if>
- <if test="ipAttendingDoctor != null" >
- IP_Attending_Doctor = #{ipAttendingDoctor,jdbcType=VARCHAR},
- </if>
- <if test="ipAdmitDiagnosis != null" >
- IP_Admit_Diagnosis = #{ipAdmitDiagnosis,jdbcType=VARCHAR},
- </if>
- <if test="ipResidentDoctor != null" >
- IP_Resident_Doctor = #{ipResidentDoctor,jdbcType=VARCHAR},
- </if>
- <if test="ipOutpatientDoctor != null" >
- IP_Outpatient_Doctor = #{ipOutpatientDoctor,jdbcType=VARCHAR},
- </if>
- <if test="ipDutyNurse != null" >
- IP_Duty_Nurse = #{ipDutyNurse,jdbcType=VARCHAR},
- </if>
- <if test="ipDutyLeader != null" >
- IP_Duty_Leader = #{ipDutyLeader,jdbcType=VARCHAR},
- </if>
- <if test="ipHospitalizedTimes != null" >
- IP_Hospitalized_Times = #{ipHospitalizedTimes,jdbcType=INTEGER},
- </if>
- <if test="ipStatus != null" >
- IP_Status = #{ipStatus,jdbcType=INTEGER},
- </if>
- <if test="ipAdmitTime != null" >
- IP_Admit_Time = #{ipAdmitTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipAdmitDep != null" >
- IP_Admit_Dep = #{ipAdmitDep,jdbcType=VARCHAR},
- </if>
- <if test="ipAdmitWard != null" >
- IP_Admit_Ward = #{ipAdmitWard,jdbcType=VARCHAR},
- </if>
- <if test="ipAdmitBed != null" >
- IP_Admit_Bed = #{ipAdmitBed,jdbcType=VARCHAR},
- </if>
- <if test="ipOutDirection != null" >
- IP_Out_Direction = #{ipOutDirection,jdbcType=VARCHAR},
- </if>
- <if test="ipIsinfant != null" >
- IP_IsInfant = #{ipIsinfant,jdbcType=INTEGER},
- </if>
- <if test="ipIsfreeze != null" >
- IP_IsFreeze = #{ipIsfreeze,jdbcType=INTEGER},
- </if>
- <if test="ipIsfile != null" >
- IP_IsFile = #{ipIsfile,jdbcType=INTEGER},
- </if>
- <if test="ipRecallReason != null" >
- IP_Recall_Reason = #{ipRecallReason,jdbcType=INTEGER},
- </if>
- <if test="ipIsarrears != null" >
- IP_IsArrears = #{ipIsarrears,jdbcType=INTEGER},
- </if>
- <if test="ipIspressure != null" >
- IP_IsPressure = #{ipIspressure,jdbcType=INTEGER},
- </if>
- <if test="ipIsfall != null" >
- IP_IsFall = #{ipIsfall,jdbcType=INTEGER},
- </if>
- <if test="ipIsconstraint != null" >
- IP_IsConstraint = #{ipIsconstraint,jdbcType=INTEGER},
- </if>
- <if test="ipIsinhibition != null" >
- IP_IsInhibition = #{ipIsinhibition,jdbcType=INTEGER},
- </if>
- <if test="ipIsfragile != null" >
- IP_IsFragile = #{ipIsfragile,jdbcType=INTEGER},
- </if>
- <if test="ipIsallergy != null" >
- IP_IsAllergy = #{ipIsallergy,jdbcType=INTEGER},
- </if>
- <if test="ipIspostoperative != null" >
- IP_IsPostoperative = #{ipIspostoperative,jdbcType=INTEGER},
- </if>
- <if test="ipOperationTime != null" >
- IP_Operation_Time = #{ipOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipOperator != null" >
- IP_Operator = #{ipOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipIsdel != null" >
- IP_IsDel = #{ipIsdel,jdbcType=INTEGER},
- </if>
- <if test="ipDischargeTime != null" >
- IP_Discharge_Time = #{ipDischargeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipPredischargeTime != null" >
- IP_PreDischarge_Time = #{ipPredischargeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipPatientType != null" >
- IP_Patient_Type = #{ipPatientType,jdbcType=VARCHAR},
- </if>
- <if test="ipNursingLevel != null" >
- IP_Nursing_Level = #{ipNursingLevel,jdbcType=VARCHAR},
- </if>
- <if test="ipIsolate != null" >
- IP_Isolate = #{ipIsolate,jdbcType=INTEGER},
- </if>
- </set>
- where IP_ID = #{ipId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient" >
- update inp_patient
- set IP_PatientNo = #{ipPatientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- IP_Visit_No = #{ipVisitNo,jdbcType=VARCHAR},
- IP_Med_Rec = #{ipMedRec,jdbcType=VARCHAR},
- IP_Height = #{ipHeight,jdbcType=DOUBLE},
- IP_Weight = #{ipWeight,jdbcType=DOUBLE},
- IP_Name = #{ipName,jdbcType=VARCHAR},
- IP_Sex = #{ipSex,jdbcType=INTEGER},
- IP_Birth = #{ipBirth,jdbcType=TIMESTAMP},
- IP_ID_Number = #{ipIdNumber,jdbcType=VARCHAR},
- IP_Citizenship = #{ipCitizenship,jdbcType=VARCHAR},
- IP_IsMarried = #{ipIsmarried,jdbcType=INTEGER},
- IP_Nationality = #{ipNationality,jdbcType=VARCHAR},
- IP_Blood = #{ipBlood,jdbcType=VARCHAR},
- IP_Home_Address = #{ipHomeAddress,jdbcType=VARCHAR},
- IP_Telephone = #{ipTelephone,jdbcType=VARCHAR},
- IP_Contact_Person = #{ipContactPerson,jdbcType=VARCHAR},
- IP_Relationship = #{ipRelationship,jdbcType=VARCHAR},
- IP_Contact_Tel = #{ipContactTel,jdbcType=VARCHAR},
- IP_Medicare_Card = #{ipMedicareCard,jdbcType=VARCHAR},
- IP_Attending_Doctor = #{ipAttendingDoctor,jdbcType=VARCHAR},
- IP_Admit_Diagnosis = #{ipAdmitDiagnosis,jdbcType=VARCHAR},
- IP_Resident_Doctor = #{ipResidentDoctor,jdbcType=VARCHAR},
- IP_Outpatient_Doctor = #{ipOutpatientDoctor,jdbcType=VARCHAR},
- IP_Duty_Nurse = #{ipDutyNurse,jdbcType=VARCHAR},
- IP_Duty_Leader = #{ipDutyLeader,jdbcType=VARCHAR},
- IP_Hospitalized_Times = #{ipHospitalizedTimes,jdbcType=INTEGER},
- IP_Status = #{ipStatus,jdbcType=INTEGER},
- IP_Admit_Time = #{ipAdmitTime,jdbcType=TIMESTAMP},
- IP_Admit_Dep = #{ipAdmitDep,jdbcType=VARCHAR},
- IP_Admit_Ward = #{ipAdmitWard,jdbcType=VARCHAR},
- IP_Admit_Bed = #{ipAdmitBed,jdbcType=VARCHAR},
- IP_Out_Direction = #{ipOutDirection,jdbcType=VARCHAR},
- IP_IsInfant = #{ipIsinfant,jdbcType=INTEGER},
- IP_IsFreeze = #{ipIsfreeze,jdbcType=INTEGER},
- IP_IsFile = #{ipIsfile,jdbcType=INTEGER},
- IP_Recall_Reason = #{ipRecallReason,jdbcType=INTEGER},
- IP_IsArrears = #{ipIsarrears,jdbcType=INTEGER},
- IP_IsPressure = #{ipIspressure,jdbcType=INTEGER},
- IP_IsFall = #{ipIsfall,jdbcType=INTEGER},
- IP_IsConstraint = #{ipIsconstraint,jdbcType=INTEGER},
- IP_IsInhibition = #{ipIsinhibition,jdbcType=INTEGER},
- IP_IsFragile = #{ipIsfragile,jdbcType=INTEGER},
- IP_IsAllergy = #{ipIsallergy,jdbcType=INTEGER},
- IP_IsPostoperative = #{ipIspostoperative,jdbcType=INTEGER},
- IP_Operation_Time = #{ipOperationTime,jdbcType=TIMESTAMP},
- IP_Operator = #{ipOperator,jdbcType=VARCHAR},
- IP_IsDel = #{ipIsdel,jdbcType=INTEGER},
- IP_Discharge_Time = #{ipDischargeTime,jdbcType=TIMESTAMP},
- IP_PreDischarge_Time = #{ipPredischargeTime,jdbcType=TIMESTAMP},
- IP_Patient_Type = #{ipPatientType,jdbcType=VARCHAR},
- IP_Nursing_Level = #{ipNursingLevel,jdbcType=VARCHAR},
- IP_Isolate = #{ipIsolate,jdbcType=INTEGER}
- where IP_ID = #{ipId,jdbcType=INTEGER}
- </update>
- <select id="selectByNoHiId" resultMap="BaseResultMap">
- select IP_Admit_Time, IP_Status,IP_Discharge_Time,DB_BedNo
- from inp_patient
- where IP_IsDel = 0
- and IP_PatientNo = #{ipPatientno,jdbcType=VARCHAR}
- and HI_ID = #{hiId,jdbcType=INTEGER}
- limit 1
- </select>
- <select id="selectPatientInfoByStatusAndWardDm" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM inp_patient
- WHERE IP_IsDel = 0
- and DW_WardDm = #{wardDm,jdbcType=VARCHAR}
- AND IP_Status in <foreach item='item' index='index' collection='ipStatus' open='(' separator=',' close=')'> #{item} </foreach>
- </select>
- <select id="selectByIpPatientNo" resultMap="BaseResultMap">
- select <include refid="Base_Column_List" />
- from inp_patient
- where IP_IsDel = 0
- and IP_PatientNo = #{ipPatientno,jdbcType=VARCHAR}
- and HI_ID = #{hiId,jdbcType=INTEGER}
- limit 1
- </select>
- <select id="selectPatientInfoListByStatus" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM inp_patient
- WHERE IP_IsDel = 0
- AND IP_Status = #{ipStatus,jdbcType=INTEGER}
- </select>
- <select id="selectPatientInfoList" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient">
- SELECT
- IP_PatientNo ipPatientno,
- DD_DepDm ddDepdm,
- DW_WardDm dwWarddm,
- DB_BedNo dbBedno,
- IP_Med_Rec ipMedRec,
- IP_Name ipName,
- IP_Sex ipSex,
- IP_Birth ipBirth,
- IP_Status ipStatus,
- IP_Admit_Time ipAdmitTime
- FROM inp_patient
- WHERE IP_IsDel = 0
- <if test="ipStatus != null" >
- AND IP_Status = #{ipStatus,jdbcType=INTEGER}
- </if>
- <if test="dwWardDm != null" >
- AND DW_WardDm = #{dwWardDm,jdbcType=VARCHAR}
- </if>
- <if test="end != null" >
- AND IP_Admit_Time <![CDATA[<]]> #{end,jdbcType=TIMESTAMP}
- </if>
- <if test="begin != null" >
- AND (IP_Discharge_Time <![CDATA[>=]]> #{begin,jdbcType=TIMESTAMP} or IP_Discharge_Time is null)
- </if>
- </select>
- <select id="selectAllList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM inp_patient
- WHERE IP_IsDel = 0
- and HI_ID = #{hiId,jdbcType=INTEGER}
- and IP_PatientNo in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=VARCHAR}
- </foreach>
- </select>
- <select id="selectPatientInfoNewList" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPatient">
- SELECT
- IP_PatientNo ipPatientno,
- DD_DepDm ddDepdm,
- DW_WardDm dwWarddm,
- DB_BedNo dbBedno,
- IP_Med_Rec ipMedRec,
- IP_Name ipName,
- IP_Sex ipSex,
- IP_Birth ipBirth,
- IP_Status ipStatus,
- IP_Admit_Time ipAdmitTime
- FROM inp_patient
- WHERE IP_IsDel = 0
- and HI_ID = #{hiId,jdbcType=INTEGER}
- and IP_PatientNo in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=VARCHAR}
- </foreach>
- </select>
- <select id="selectLNBAllPatientInfo" resultMap="BaseResultMap">
- SELECT
- IP_ID, IP_PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo,IP_Admit_Time
- FROM inp_patient
- WHERE IP_IsDel = 0
- AND IP_Status = 0
- AND hi_id = 1
- </select>
- <select id="selectByPatientNos" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM inp_patient
- WHERE IP_IsDel = 0
- and IP_PatientNo in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=VARCHAR}
- </foreach>
- </select>
- <select id="selectByDwWardDm" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM inp_patient
- WHERE IP_IsDel = 0
- AND IP_Status = #{ipStatus,jdbcType=INTEGER}
- AND DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
- </select>
- <select id="selectByWardSyncOpen" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/>
- from inp_patient ip
- where ip.IP_IsDel = 0
- and #{pointDate,jdbcType=TIMESTAMP} >= ip.IP_Admit_Time
- and (ip.IP_PreDischarge_Time > #{pointDate,jdbcType=TIMESTAMP} or ip.IP_PreDischarge_Time is null)
- and ip.DW_WardDm in
- <foreach collection="wards" open="(" close=")" item="item" separator=",">
- #{item,jdbcType=VARCHAR}
- </foreach>
- and HI_ID = #{hiId,jdbcType=INTEGER}
- and exists(select 1 from inp_icu_sync_patient sp where ip.IP_PatientNo = sp.PatientNo and ip.HI_ID = sp.HI_ID
- and sp.isp_is_del = 0
- <!--and DATE_FORMAT(sp.isp_record_time,'%Y-%m-%d %H:00:00') != #{pointDate,jdbcType=TIMESTAMP} -->
- and #{pointDate,jdbcType=TIMESTAMP} > sp.isp_record_time
- )
- </select>
- <select id="selectByStatus" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM inp_patient
- WHERE IP_IsDel = 0
- AND IP_Status = #{ipStatus,jdbcType=INTEGER}
- </select>
- </mapper>
|