| | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUserDept" id="SysUserDeptResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="userCode" column="user_code"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.SysUserOrg" id="SysUserOrgResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="campusid" column="campusid"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUserRole" id="SysUserRoleResult"> |
| | | <result property="userId" column="user_id"/> |
| | |
| | | <result property="inhospstate" column="inhospstate"/> |
| | | <result property="deptcheckFlag" column="deptcheck_flag"/> |
| | | <result property="wardcheckFlag" column="wardcheck_flag"/> |
| | | <result property="inDeptcheckFlag" column="in_deptcheck_flag"/> |
| | | <result property="inWardcheckFlag" column="in_wardcheck_flag"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="age" column="age"/> |
| | | <result property="sex" column="sex"/> |
| | |
| | | <result property="guid" column="guid"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedOperation" id="PatMedOperationResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="patcode" column="patcode"/> |
| | | <result property="paname" column="paname"/> |
| | | <result property="opreqid" column="opreqid"/> |
| | | <result property="opreqcode" column="opreqcode"/> |
| | | <result property="opsstatus" column="opsstatus"/> |
| | | <result property="optypecode" column="optypecode"/> |
| | | <result property="optypename" column="optypename"/> |
| | | <result property="operatortime" column="operatortime"/> |
| | | <result property="opreqtime" column="opreqtime"/> |
| | | <result property="reqdoccode" column="reqdoccode"/> |
| | | <result property="reqdocname" column="reqdocname"/> |
| | | <result property="reqdeptcode" column="reqdeptcode"/> |
| | | <result property="reqdeptname" column="reqdeptname"/> |
| | | <result property="reqloccode" column="reqloccode"/> |
| | | <result property="reqlocname" column="reqlocname"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="surgeoncode" column="surgeoncode"/> |
| | | <result property="surgeonname" column="surgeonname"/> |
| | | <result property="firasscode" column="firasscode"/> |
| | | <result property="firassname" column="firassname"/> |
| | | <result property="secasscode" column="secasscode"/> |
| | | <result property="secassname" column="secassname"/> |
| | | <result property="thrasscode" column="thrasscode"/> |
| | | <result property="thrassname" column="thrassname"/> |
| | | <result property="canceltime" column="canceltime"/> |
| | | <result property="cancelreason" column="cancelreason"/> |
| | | <result property="cancelcode" column="cancelcode"/> |
| | | <result property="cancelname" column="cancelname"/> |
| | | <result property="visittype" column="visittype"/> |
| | | <result property="status" column="status"/> |
| | | <result property="schemetime" column="schemetime"/> |
| | | <result property="schemestatus" column="schemestatus"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="pguid" column="pguid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="inhospstate" column="inhospstate"/> |
| | | <result property="patno" column="patno"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="visitid" column="visitid"/> |
| | | <result property="serialnum" column="serialnum"/> |
| | | <result property="inhospno" column="inhospno"/> |
| | | <result property="hospitalname" column="hospitalname"/> |
| | | <result property="hospitalcode" column="hospitalcode"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="hospitaldistrictcode" column="hospitaldistrictcode"/> |
| | | <result property="hospitaldistrictname" column="hospitaldistrictname"/> |
| | | <result property="roomno" column="roomno"/> |
| | | <result property="bedNo" column="bed_no"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="nurseId" column="nurse_id"/> |
| | | <result property="nurseName" column="nurse_name"/> |
| | | <result property="checkFlag" column="check_flag"/> |
| | | <result property="longTaskReason" column="long_task_reason"/> |
| | | <result property="opid" column="opid"/> |
| | | <result property="opcode" column="opcode"/> |
| | | <result property="opdesc" column="opdesc"/> |
| | | <result property="oplevelcode" column="oplevelcode"/> |
| | | <result property="opleveldesc" column="opleveldesc"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedOperationItem" id="PatMedOperationItemResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="operationid" column="operationid"/> |
| | | <result property="opid" column="opid"/> |
| | | <result property="opcode" column="opcode"/> |
| | | <result property="opdesc" column="opdesc"/> |
| | | <result property="mainFlag" column="main_flag"/> |
| | | <result property="incitypecode" column="incitypecode"/> |
| | | <result property="incitypedesc" column="incitypedesc"/> |
| | | <result property="oplevelcode" column="oplevelcode"/> |
| | | <result property="opleveldesc" column="opleveldesc"/> |
| | | <result property="opposition" column="opposition"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="pguid" column="pguid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="opercheckFlag" column="opercheck_flag"/> |
| | | <result property="longTaskReason" column="long_task_reason"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | | select notrequired_flag, |
| | | notrequiredreason, |
| | |
| | | <select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult"> |
| | | select user_id, role_id, orgid |
| | | FROM healthy_user_role |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult"> |
| | | select user_id, user_code, dept_type,dept_code as |
| | | dept_id,dept_name,deptparent,del_flag,orgid |
| | | select user_id , user_code , dept_type ,dept_code,dept_name,deptparent,del_flag,orgid |
| | | FROM healthy_user_dept |
| | | <where> |
| | | user_id != 'admin' |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | where 1=1 |
| | | and user_id != 'admin' |
| | | and dept_type = '1' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </select> |
| | | |
| | | <select id="yhybfxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult"> |
| | | select user_id , user_code , dept_type ,dept_code,dept_name,deptparent,del_flag,orgid |
| | | FROM healthy_user_dept |
| | | where 1=1 |
| | | and user_id != 'admin' |
| | | and dept_type = '2' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </select> |
| | | |
| | | <select id="yhyyqxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserOrgResult"> |
| | | select |
| | | d.orgid as campusid, |
| | | ud.user_id as user_id, |
| | | ud.orgid as orgid |
| | | FROM healthy_dept d |
| | | JOIN healthy_user_dept ud ON d.his_dept_id = ud.dept_code |
| | | where 1=1 |
| | | and ud.user_id != 'admin' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND ud.orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null "> |
| | | AND ud.user_id = #{hisUserId} |
| | | </if> |
| | | <if test="campusid != null"> |
| | | AND d.orgid = #{campusid} |
| | | </if> |
| | | union all |
| | | select |
| | | d.orgid as campusid, |
| | | udb.user_id as user_id, |
| | | udb.orgid as orgid |
| | | FROM healthy_dept d |
| | | JOIN healthy_user_dept_bf udb ON d.his_dept_id = udb.dept_code |
| | | where 1=1 |
| | | and udb.user_id != 'admin' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND udb.orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null "> |
| | | AND udb.user_id = #{hisUserId} |
| | | </if> |
| | | <if test="campusid != null"> |
| | | AND d.orgid = #{campusid} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> |
| | | <include refid="selectPatArchiveVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if> |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="viptype != null ">and viptype = #{viptype}</if> |
| | | <if test="pattype != null ">and pattype = #{pattype}</if> |
| | | <if test="patientno != null ">and patientno = CAST(#{patientno} AS INTEGER)</if> |
| | | <if test="patientno != null ">and patientno = #{patientno} </if> |
| | | <if test="patidHis != null ">and patid_his = #{patidHis}</if> |
| | | <if test="sdFlag != null ">and sd_flag = #{sdFlag}</if> |
| | | <if test="ageUnit != null ">and age_unit = #{ageUnit}</if> |
| | |
| | | <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if> |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | </where> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and last_Update_Time >= to_date(#{lastStartTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and last_Update_Time <= to_date(#{lastEndTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="pageSize != null and pageSize!='' ">and rownum<#{pageSize}</if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | FROM |
| | | healthy_inhosp b |
| | | <where> |
| | | |
| | | <if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >= |
| | | to_char(#{startOutHospTime}::date,'YYMMDD') |
| | | where 1=1 |
| | | <if test="startOutHospTime != null "> |
| | | and b.endtime >= #{startOutHospTime} |
| | | </if> |
| | | <if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') <= |
| | | to_char(#{endOutHospTime}::date,'YYMMDD') |
| | | <if test="endOutHospTime != null "> |
| | | and b.endtime <= #{endOutHospTime} |
| | | </if> |
| | | <if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') >= |
| | | to_char(#{startInHospTime}::date,'%y%m%d') |
| | | <if test="startInHospTime != null "> |
| | | and starttime >= #{startInHospTime} |
| | | </if> |
| | | <if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') <= |
| | | to_char(#{endInHospTime}::date,'YYMMDD') |
| | | <if test="endInHospTime != null "> |
| | | and starttime <= #{endInHospTime} |
| | | </if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | |
| | | <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if> |
| | | <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if> |
| | | <if test="orgid != null ">and b.orgid = #{orgid}</if> |
| | | </where> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and last_Update_Time >= to_date(#{lastStartTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and last_Update_Time <= to_date(#{lastEndTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | patname, |
| | | mainsuit |
| | | from healthy_outhosp |
| | | <where> |
| | | |
| | | <if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >= |
| | | to_char(#{beginTime}::date,'YYMMDD') |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="endTime != null ">and to_char( admitdate,'YYMMDD') <= |
| | | to_char(#{endTime}::date,'YYMMDD') |
| | | <if test="beginTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | |
| | | </where> |
| | | <if test="endTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | icdname, |
| | | icdpym |
| | | from healthy_disease |
| | | <where> |
| | | where 1=1 |
| | | <if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if> |
| | | <if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if> |
| | | <if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | u.nick_name, u.user_name, u.email,u.id_card, u.avatar, |
| | | u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status |
| | | from healthy_user u |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND u.orgid = #{orgid} |
| | | </if> |
| | | <if test="userId != null and userId != 0"> |
| | | AND u.user_id = #{userId} |
| | | </if> |
| | |
| | | <if test="phonenumber != null and phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> |
| | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | | <select id="selectOperList" parameterType="com.smartor.domain.PatMedOperation" |
| | | resultMap="PatMedOperationResult"> |
| | | select |
| | | o.patid, |
| | | o.patcode, |
| | | o.paname, |
| | | o.opreqid, |
| | | o.opreqcode, |
| | | o.opsstatus, |
| | | o.optypecode, |
| | | o.optypename, |
| | | o.operatortime, |
| | | o.opreqtime, |
| | | o.reqdoccode, |
| | | o.reqdocname, |
| | | o.reqdeptcode, |
| | | o.reqdeptname, |
| | | o.reqloccode, |
| | | o.reqlocname, |
| | | o.remark, |
| | | o.surgeoncode, |
| | | o.surgeonname, |
| | | o.firasscode , |
| | | o.firassname, |
| | | o.secasscode, |
| | | o.secassname , |
| | | o.thrasscode, |
| | | o.thrassname, |
| | | o.endcancelname, |
| | | o.visittype, |
| | | o.status, |
| | | o.schemetime, |
| | | o.schemestatus, |
| | | o.del_flag, |
| | | o.update_by, |
| | | o.update_time, |
| | | o.create_by, |
| | | o.create_time, |
| | | o.isupload, |
| | | o.upload_time, |
| | | o.orgid , |
| | | o.guid, |
| | | o.pguid, |
| | | o.pid , |
| | | o.inhospstate, |
| | | o.patno, |
| | | o.patname, |
| | | o.visitid, |
| | | o.serialnum, |
| | | o.inhospno , |
| | | o.hospitalname, |
| | | o.hospitalcode, |
| | | o.deptid , |
| | | o.deptcode , |
| | | o.deptname , |
| | | o.hospitaldistrictcode, |
| | | o.hospitaldistrictname , |
| | | o.roomno , |
| | | o.bed_no , |
| | | o.drcode , |
| | | o.drname , |
| | | o.nurse_id, |
| | | o.nurse_name , |
| | | o.check_flag , |
| | | o.long_task_reason, |
| | | o.opid , |
| | | o.vopcode , |
| | | o.opdesc, |
| | | o.oplevelcode , |
| | | o.opleveldesc |
| | | from PAT_MED_OPERATION o |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND o.orgid = #{orgid} |
| | | </if> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(o.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(o.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectOperItemList" parameterType="com.smartor.domain.PatMedOperationItem" |
| | | resultMap="PatMedOperationItemResult"> |
| | | select |
| | | oi.operationid, |
| | | oi.opid, |
| | | oi.opcode, |
| | | oi.opdesc, |
| | | oi.main_flag, |
| | | oi.incitypecode, |
| | | oi.incitypedesc, |
| | | oi.oplevelcode, |
| | | oi.opleveldesc, |
| | | oi.opposition, |
| | | oi.del_flag, |
| | | oi.update_by, |
| | | oi.update_time, |
| | | oi.create_by, |
| | | oi.create_time, |
| | | oi.isupload, |
| | | oi.upload_time, |
| | | oi.orgid, |
| | | oi.pguid, |
| | | oi.guid, |
| | | oi.pid, |
| | | oi.opercheck_flag, |
| | | oi.long_task_reason |
| | | from PAT_MED_OPERATION_ITEM oi |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND oi.orgid = #{orgid} |
| | | </if> |
| | | <if test="opid != null and opid != ''"> |
| | | AND oi.opid = #{opid} |
| | | </if> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(oi.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(oi.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | </select> |
| | | </mapper> |