¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.quartz.mapper.CollectHISMapper"> |
| | | |
| | | <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="deptId" column="dept_id"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="deptName" column="dept_name"/> |
| | | <result property="deptType" column="dept_type"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUserRole" id="SysUserRoleResult"> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="roleId" column="role_id"/> |
| | | <result property="orgid" column="orgid"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.smartor.domain.PatArchive" id="PatArchiveResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="patientno" column="patientno"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="notrequiredFlag" column="notrequired_flag"/> |
| | | <result property="notrequiredreason" column="notrequiredreason"/> |
| | | <result property="patidHis" column="patid_his"/> |
| | | <result property="sdFlag" column="sd_flag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="viptype" column="viptype"/> |
| | | <result property="name" column="name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nativePlace" column="native_place"/> |
| | | <result property="placeOfResidence" column="place_of_residence"/> |
| | | <result property="birthplace" column="birthplace"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="birthdate" column="birthdate"/> |
| | | <result property="age" column="age"/> |
| | | <result property="age2" column="age2"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="relativetelcode" column="relativetelcode"/> |
| | | <result property="idcardtype" column="idcardtype"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="dept" column="deptname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <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="tag" column="tag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="bedNo" column="bedno"/> |
| | | <result property="inhosptime" column="inhosptime"/> |
| | | <result property="ageUnit" column="age_unit"/> |
| | | <result property="ageUnit2" column="age_unit2"/> |
| | | <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/> |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="careFacilities" column="care_facilities"/> |
| | | <result property="casePath" column="case_path"/> |
| | | <result property="degreeOfEducation" column="degree_of_education"/> |
| | | <result property="maritalStatus" column="marital_status"/> |
| | | <result property="income" column="income"/> |
| | | <result property="medicareType" column="medicare_type"/> |
| | | <result property="carePerson" column="care_person"/> |
| | | <result property="casePersonAge" column="case_person_age"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="filterDrname" column="filter_drname"/> |
| | | <result property="filterDrcode" column="filter_drcode"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.smartor.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="notrequiredFlag" column="notrequired_flag"/> |
| | | <result property="notrequiredreason" column="notrequiredreason"/> |
| | | <result property="patientno" column="patientno"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="patidHis" column="patid_his"/> |
| | | <result property="sdFlag" column="sd_flag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="viptype" column="viptype"/> |
| | | <result property="name" column="name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nativePlace" column="native_place"/> |
| | | <result property="placeOfResidence" column="place_of_residence"/> |
| | | <result property="birthplace" column="birthplace"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="birthdate" column="birthdate"/> |
| | | <result property="age" column="age"/> |
| | | <result property="age2" column="age2"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="relativetelcode" column="relativetelcode"/> |
| | | <result property="idcardtype" column="idcardtype"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="dept" column="deptname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <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="tag" column="tag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="bedNo" column="bedno"/> |
| | | <result property="starttime" column="starttime"/> |
| | | <result property="endtime" column="endtime"/> |
| | | <result property="ageUnit" column="age_unit"/> |
| | | <result property="ageUnit2" column="age_unit2"/> |
| | | <result property="inhospno" column="inhospno"/> |
| | | <result property="nurseId" column="nurse_id"/> |
| | | <result property="nurseName" column="nurse_name"/> |
| | | <result property="outWayName" column="out_way_name"/> |
| | | <result property="outWayId" column="out_way_id"/> |
| | | <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/> |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="leaveicd10code" column="leaveicd10code"/> |
| | | <result property="filterDrname" column="filter_drname"/> |
| | | <result property="filterDrcode" column="filter_drcode"/> |
| | | </resultMap> |
| | | |
| | | <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"/> |
| | | <result property="hospitaldistrictcode" column="hospitaldistrictcode"/> |
| | | <result property="hospitaldistrictname" column="hospitaldistrictname"/> |
| | | <result property="icd10code" column="icd10code"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="starttime" column="starttime"/> |
| | | <result property="endtime" column="endtime"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="roomno" column="roomno"/> |
| | | <result property="bedNo" column="bed_no"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <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="patid" column="patid"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="leaveicd10code" column="leaveicd10code"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="schemestatus" column="schemestatus"/> |
| | | <result property="generalschemestatus" column="generalschemestatus"/> |
| | | <result property="leaveldeptcode" column="leaveldeptcode"/> |
| | | <result property="leaveldeptname" column="leaveldeptname"/> |
| | | <result property="hospitaldistrictid" column="hospitaldistrictid"/> |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/> |
| | | <result property="leavehospitaldistrictid" column="leavehospitaldistrictid"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <result property="leaveldeptid" column="leaveldeptid"/> |
| | | <result property="schemetime" column="schemetime"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="patno" column="patno"/> |
| | | <result property="inhospstate" column="inhospstate"/> |
| | | <result property="deptcheckFlag" column="deptcheck_flag"/> |
| | | <result property="wardcheckFlag" column="wardcheck_flag"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="age" column="age"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="longTaskReason" column="long_task_reason"/> |
| | | <result property="nurseId" column="nurse_id"/> |
| | | <result property="nurseName" column="nurse_name"/> |
| | | <result property="outWayId" column="out_way_id"/> |
| | | <result property="outWayName" column="out_way_name"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="operator" column="operator"/> |
| | | <result property="operatorId" column="operator_id"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="tagname" column="tagname"/> |
| | | <result property="fuflag" column="fuflag"/> |
| | | <result property="fudate" column="fudate"/> |
| | | <result property="fuperiod" column="fuperiod"/> |
| | | <result property="futypecode" column="futypecode"/> |
| | | <result property="futypedesc" column="futypedesc"/> |
| | | <result property="fuadvice" column="fuadvice"/> |
| | | <result property="fuspecialadvice" column="fuspecialadvice"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="serialnum" column="serialnum"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="hospitalname" column="hospitalname"/> |
| | | <result property="hospitalcode" column="hospitalcode"/> |
| | | <result property="icd10code" column="icd10code"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="admitdate" column="admitdate"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <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="schemestatus" column="schemestatus"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <result property="schemetime" column="schemetime"/> |
| | | <result property="hpi" column="hpi"/> |
| | | <result property="mainsuit" column="mainsuit"/> |
| | | <result property="outhospno" column="outhospno"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="patno" column="patno"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="remark" column="remark"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.smartor.domain.Icd10" id="Icd10Result"> |
| | | <result property="icdid" column="icdid"/> |
| | | <result property="icdcode" column="icdcode"/> |
| | | <result property="icdname" column="icdname"/> |
| | | <result property="icdpym" column="icdpym"/> |
| | | <result property="icdwbm" column="icdwbm"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="lastflag" column="lastflag"/> |
| | | <result property="chimedflag" column="chimedflag"/> |
| | | <result property="hisIcdid" column="his_icdid"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult"> |
| | | <id property="deptId" column="dept_id"/> |
| | | <id property="hisDeptId" column="his_dept_id"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="hisParentId" column="his_parent_id"/> |
| | | <result property="ancestors" column="ancestors"/> |
| | | <result property="deptName" column="dept_name"/> |
| | | <result property="orderNum" column="order_num"/> |
| | | <result property="leader" column="leader"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="email" column="email"/> |
| | | <result property="status" column="status"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="parentName" column="parent_name"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="deptType" column="dept_type"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="type" column="type"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult"> |
| | | <id property="userId" column="user_id"/> |
| | | <id property="orgid" column="orgid"/> |
| | | <id property="hisUserId" column="his_user_id"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="hospInfo" column="hosp_info"/> |
| | | <result property="deptInfo" column="dept_info"/> |
| | | <result property="userName" column="user_name"/> |
| | | <result property="nickName" column="nick_name"/> |
| | | <result property="email" column="email"/> |
| | | <result property="phonenumber" column="phonenumber"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="avatar" column="avatar"/> |
| | | <result property="password" column="password"/> |
| | | <result property="status" column="status"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="loginIp" column="login_ip"/> |
| | | <result property="loginDate" column="login_date"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="idCard" column="id_card"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="title" column="title"/> |
| | | <result property="birthday" column="birthday"/> |
| | | <result property="jobPhone" column="job_phone"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="userType" column="user_type"/> |
| | | <result property="searchscope" column="searchscope"/> |
| | | <result property="guid" column="guid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | | select notrequired_flag, |
| | | notrequiredreason, |
| | | patientno, |
| | | patid_his, |
| | | sd_flag, |
| | | name, |
| | | sex, |
| | | idcardno, |
| | | birthdate, |
| | | age, |
| | | nation, |
| | | native_place, |
| | | place_of_residence, |
| | | birthplace, |
| | | sourcefrom, |
| | | archivetime, |
| | | archiveby, |
| | | telcode, |
| | | relativetelcode, |
| | | idcardtype, |
| | | orgid, |
| | | openid, |
| | | viptype, |
| | | care_facilities, |
| | | case_path, |
| | | degree_of_education, |
| | | marital_status, |
| | | income, |
| | | medicare_type, |
| | | care_person, |
| | | case_person_age |
| | | from healthy_archive |
| | | </sql> |
| | | |
| | | |
| | | <select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult"> |
| | | select user_id, role_id, orgid |
| | | FROM yhyjsxx |
| | | <where> |
| | | <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,department_id as |
| | | dept_id,dept_name,deptparent,del_flag,orgid,create_time,create_by,update_time,update_by |
| | | FROM yhyksxx |
| | | <where> |
| | | user_id != 'admin' |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> |
| | | <include refid="selectPatArchiveVo"/> |
| | | <where> |
| | | <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="telcode != null and telcode != ''">and telcode = #{telcode}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="id != null and id != ''">and id = #{id}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</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="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="age != null ">and age = #{age}</if> |
| | | <if test="age2 != null ">and age2 = #{age2}</if> |
| | | <if test="ageUnit2 != null ">and age_unit2 = #{ageUnit2}</if> |
| | | <if test="notrequiredFlag != null ">and notrequired_flag = #{notrequiredFlag}</if> |
| | | <if test="notrequiredreason != null ">and notrequiredreason = #{notrequiredreason}</if> |
| | | <if test="careFacilities != null ">and care_facilities = #{careFacilities}</if> |
| | | <if test="casePath != null ">and case_path = #{casePath}</if> |
| | | <if test="degreeOfEducation != null ">and degree_of_education = #{degreeOfEducation}</if> |
| | | <if test="maritalStatus != null ">and marital_status = #{maritalStatus}</if> |
| | | <if test="income != null ">and income = #{income}</if> |
| | | <if test="medicareType != null ">and medicare_type = #{medicareType}</if> |
| | | <if test="carePerson != null ">and care_person = #{carePerson}</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> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedInhospListCount" parameterType="com.smartor.domain.PatMedInhosp" resultType="Long"> |
| | | select count(*) |
| | | FROM healthy_inhosp |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveListByLastId" resultMap="PatArchiveResult"> |
| | | SELECT * |
| | | FROM ( |
| | | SELECT *, |
| | | ROW_NUMBER() OVER (ORDER BY patid_his) as row_num |
| | | FROM healthy_archive |
| | | ) a |
| | | WHERE row_num > #{lastRowNumber} LIMIT #{ps} |
| | | </select> |
| | | |
| | | <select id="selectPatMedInhospListByLastId" resultMap="PatMedInhospResult"> |
| | | SELECT * |
| | | FROM (SELECT *, |
| | | ROW_NUMBER() OVER (ORDER BY patno) as row_num |
| | | FROM healthy_inhosp |
| | | ) a |
| | | WHERE row_num > #{lastRowNumber} LIMIT #{ps} |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveCount" parameterType="com.smartor.domain.PatMedInhosp" resultType="Long"> |
| | | select count(*) |
| | | FROM healthy_archive |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult"> |
| | | select |
| | | b.nurse_id, |
| | | b.nurse_name, |
| | | b.patname, |
| | | b.out_way_id, |
| | | b.out_way_name, |
| | | b.inhospstate, |
| | | b.patno, |
| | | b.inhospno, |
| | | b.serialnum, |
| | | b.hospitalname, |
| | | b.hospitalcode, |
| | | b.hospitaldistrictcode, |
| | | b.hospitaldistrictname, |
| | | b.icd10code, |
| | | b.diagname, |
| | | b.starttime, |
| | | b.endtime, |
| | | b.deptcode, |
| | | b.deptname, |
| | | b.roomno, |
| | | b.bed_no, |
| | | b.orgid, |
| | | b.leavediagname, |
| | | b.leaveicd10code, |
| | | b.drcode, |
| | | b.drname, |
| | | b.leaveldeptcode, |
| | | b.leaveldeptname, |
| | | b.hospitaldistrictid, |
| | | b.leavehospitaldistrictcode, |
| | | b.leavehospitaldistrictname, |
| | | b.leavehospitaldistrictid, |
| | | b.deptid, |
| | | b.leaveldeptid |
| | | |
| | | FROM |
| | | healthy_inhosp b |
| | | <where> |
| | | |
| | | <if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >= |
| | | to_char(#{startOutHospTime}::date,'YYMMDD') |
| | | </if> |
| | | <if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') <= |
| | | to_char(#{endOutHospTime}::date,'YYMMDD') |
| | | </if> |
| | | <if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') >= |
| | | to_char(#{startInHospTime}::date,'%y%m%d') |
| | | </if> |
| | | <if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') <= |
| | | to_char(#{endInHospTime}::date,'YYMMDD') |
| | | </if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | <if test="patno != null ">and b.patno = #{patno}</if> |
| | | <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> |
| | | <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if> |
| | | <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</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> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp" |
| | | resultMap="PatMedOuthospResult"> |
| | | select |
| | | outhospno, |
| | | patno, |
| | | serialnum, |
| | | hospitalname, |
| | | hospitalcode, |
| | | icd10code, |
| | | diagname, |
| | | deptcode, |
| | | deptname, |
| | | drcode, |
| | | drname, |
| | | admitdate, |
| | | orgid, |
| | | schemestatus, |
| | | deptid, |
| | | schemetime, |
| | | hpi, |
| | | patname, |
| | | mainsuit |
| | | from healthy_outhosp |
| | | <where> |
| | | |
| | | <if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >= |
| | | to_char(#{beginTime}::date,'YYMMDD') |
| | | </if> |
| | | <if test="endTime != null ">and to_char( admitdate,'YYMMDD') <= |
| | | to_char(#{endTime}::date,'YYMMDD') |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result"> |
| | | select |
| | | icdcode, |
| | | his_icdid, |
| | | lastflag, |
| | | chimedflag, |
| | | icdname, |
| | | icdpym |
| | | from healthy_disease |
| | | <where> |
| | | <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="icdname != null and icdname != ''">and icdname like concat('%', #{icdname}, '%')</if> |
| | | <if test="icdpym != null and icdpym != ''">and icdpym = #{icdpym}</if> |
| | | <if test="icdwbm != null and icdwbm != ''">and icdwbm = #{icdwbm}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</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> |
| | | |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select |
| | | u.title,u.his_user_id, u.searchscope, u.dept_id, u.user_type, |
| | | 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> |
| | | <if test="userId != null and userId != 0"> |
| | | AND u.user_id = #{userId} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.user_name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND u.nick_name like concat('%', #{nickName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND u.status = #{status} |
| | | </if> |
| | | <if test="idCard != null and idCard != ''"> |
| | | AND u.id_card = #{idCard} |
| | | </if> |
| | | <if test="title != null and title != ''"> |
| | | AND u.title = #{title} |
| | | </if> |
| | | <if test="jobPhone != null and jobPhone != ''"> |
| | | AND u.job_phone = #{jobPhone} |
| | | </if> |
| | | <if test="birthday != null and birthday != ''"> |
| | | AND u.birthday = #{birthday} |
| | | </if> |
| | | <if test="hisUserId != null and hisUserId != ''"> |
| | | AND u.his_user_id = #{hisUserId} |
| | | </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 d.dept_code, |
| | | d.TYPE, |
| | | d.ancestors, |
| | | d.dept_name, |
| | | d.order_num, |
| | | d.leader, |
| | | d.phone, |
| | | d.dept_type, |
| | | d.email, |
| | | d.status, |
| | | d.his_dept_id, |
| | | d.his_parent_id |
| | | FROM healthy_dept d |
| | | |
| | | </select> |
| | | |
| | | </mapper> |