| | |
| | | <result property="inDeptcheckFlag" column="in_deptcheck_flag"/> |
| | | <result property="wardcheckFlag" column="wardcheck_flag"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="scheduleCheckFlag" column="schedulecheck_flag"/> |
| | | <result property="age" column="age"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="telcode" column="telcode"/> |
| | |
| | | <result property="encounterSourceId" column="encounter_source_id"/> |
| | | <result property="importanceFlagCode" column="importance_flag_code"/> |
| | | <result property="emergencyLevelCode" column="emergency_level_code"/> |
| | | <result property="medicalCode" column="medical_code"/> |
| | | <result property="medicalName" column="medical_name"/> |
| | | <result property="medicalCompany" column="medical_company"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInhospVo"> |
| | | select inhospid, |
| | | medical_code, |
| | | medical_name, |
| | | medical_company, |
| | | encounter_source_id, |
| | | importance_flag_code, |
| | | emergency_level_code, |
| | |
| | | in_deptcheck_flag, |
| | | in_wardcheck_flag, |
| | | diagcheck_flag, |
| | | schedulecheck_flag, |
| | | inhospstate, |
| | | patno, |
| | | long_task_reason, |
| | |
| | | </sql> |
| | | |
| | | <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult"> |
| | | select CONCAT( a.age, a.age_unit ) AS age, |
| | | select a.age AS age, |
| | | a.telcode as telcode, |
| | | a.sex, |
| | | b.inhospid, |
| | |
| | | b.in_deptcheck_flag, |
| | | b.in_wardcheck_flag, |
| | | b.diagcheck_flag, |
| | | b.schedulecheck_flag, |
| | | b.inhospstate, |
| | | b.patno, |
| | | b.inhospno, |
| | |
| | | b.encounter_source_id, |
| | | b.importance_flag_code, |
| | | b.emergency_level_code, |
| | | b.medical_code, |
| | | b.medical_name, |
| | | b.medical_company, |
| | | a.idcardno |
| | | FROM |
| | | pat_med_inhosp b |
| | |
| | | concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="bedNo != null ">and b.bed_no = #{bedNo}</if> |
| | | <if test="inhospMydFlag != null ">and b.inhosp_myd_flag = #{inhospMydFlag}</if> |
| | | <if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if> |
| | | <if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</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="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if> |
| | | <if test="scheduleCheckFlag != null ">and b.schedulecheck_flag = #{scheduleCheckFlag}</if> |
| | | <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if> |
| | | <if test="inDeptcheckFlag != null ">and b.in_deptcheck_flag = #{inDeptcheckFlag}</if> |
| | | <if test="inWardcheckFlag != null ">and b.in_wardcheck_flag = #{inWardcheckFlag}</if> |
| | |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="icd10codeList != null and icd10codeList.size()>0"> |
| | | AND b.leaveicd10code IN |
| | | <foreach collection="icd10codeList" item="icd10code" open="(" separator="," |
| | | close=")"> |
| | | #{icd10code} |
| | | </foreach> |
| | | </if> |
| | | <if test="medicalCode != null and medicalCode != ''">and b.medical_code = #{medicalCode}</if> |
| | | <if test="medicalName != null and medicalName != ''">and b.medical_name = #{medicalName}</if> |
| | | <if test="medicalCompany != null and medicalCompany != ''">and b.medical_company = #{medicalCompany}</if> |
| | | GROUP BY |
| | | b.inhospid, |
| | | a.age, |
| | |
| | | select |
| | | b.inhospid, |
| | | b.nurse_id, |
| | | b.medical_code, |
| | | b.medical_name, |
| | | b.medical_company, |
| | | b.encounter_source_id, |
| | | b.importance_flag_code, |
| | | b.emergency_level_code, |
| | |
| | | b.in_deptcheck_flag, |
| | | b.in_wardcheck_flag, |
| | | b.diagcheck_flag, |
| | | b.schedulecheck_flag, |
| | | b.inhospstate, |
| | | b.patno, |
| | | b.inhospno, |
| | |
| | | select CONCAT( a.age, a.age_unit ) AS age, |
| | | a.telcode as telcode, |
| | | b.inhospid, |
| | | b.medical_code, |
| | | b.medical_name, |
| | | b.medical_company, |
| | | b.encounter_source_id, |
| | | b.importance_flag_code, |
| | | b.emergency_level_code, |
| | |
| | | <if test="campusid != null ">and b.campusid = #{campusid}</if> |
| | | <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if> |
| | | <if test="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if> |
| | | <if test="scheduleCheckFlag != null ">and b.schedulecheck_flag = #{scheduleCheckFlag}</if> |
| | | <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if> |
| | | <if test="inDeptcheckFlag != null ">and b.in_deptcheck_flag = #{inDeptcheckFlag}</if> |
| | | <if test="inWardcheckFlag != null ">and b.in_wardcheck_flag = #{inWardcheckFlag}</if> |
| | |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="medicalCode != null and medicalCode != ''">and b.medical_code like concat('%'#{medicalCode}, '%') |
| | | </if> |
| | | <if test="medicalName != null and medicalName != ''">and b.medical_name like concat('%'#{medicalName}, '%') |
| | | </if> |
| | | <if test="medicalCompany != null and medicalCompany != ''">and b.medical_company like |
| | | concat('%'#{medicalCompany}, '%') |
| | | </if> |
| | | order by b.inhospid desc |
| | | </select> |
| | |
| | | <if test="importanceFlagCode != null ">and importance_flag_code = #{importanceFlagCode}</if> |
| | | <if test="emergencyLevelCode != null ">and emergency_level_code = #{emergencyLevelCode}</if> |
| | | <if test="encounterSourceId != null ">and encounter_source_id = #{encounterSourceId}</if> |
| | | <if test="medicalCode != null and medicalCode != ''">and medical_code like concat('%'#{medicalCode}, '%')</if> |
| | | <if test="medicalName != null and medicalName != ''">and medical_name like concat('%'#{medicalName}, '%')</if> |
| | | <if test="medicalCompany != null and medicalCompany != ''">and medical_company like |
| | | concat('%'#{medicalCompany}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="importanceFlagCode != null ">importance_flag_code,</if> |
| | | <if test="emergencyLevelCode != null ">emergency_level_code,</if> |
| | | <if test="encounterSourceId != null ">encounter_source_id,</if> |
| | | <if test="medicalCode != null and medicalCode != ''">medical_code,</if> |
| | | <if test="medicalName != null and medicalName != ''">medical_name,</if> |
| | | <if test="medicalCompany != null and medicalCompany != ''">medical_company,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="importanceFlagCode != null ">#{importanceFlagCode},</if> |
| | | <if test="emergencyLevelCode != null ">#{emergencyLevelCode},</if> |
| | | <if test="encounterSourceId != null ">#{encounterSourceId},</if> |
| | | <if test="medicalCode != null and medicalCode != ''">#{medicalCode},</if> |
| | | <if test="medicalName != null and medicalName != ''">#{medicalName},</if> |
| | | <if test="medicalCompany != null and medicalCompany != ''">#{medicalCompany},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | nurse_id, nurse_name, out_way_id, out_way_name, guid, |
| | | operator, operator_id, inhospno, remark, |
| | | fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice, management_doctor, |
| | | management_doctor_doctor,campusid, inhosp_myd_flag, importance_flag_code, emergency_level_code, encounter_source_id |
| | | management_doctor_doctor,campusid, inhosp_myd_flag, importance_flag_code, emergency_level_code, encounter_source_id, |
| | | medical_code, medical_name, medical_company |
| | | ) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | |
| | | #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark}, |
| | | #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice}, |
| | | #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}, #{item.campusid}, #{item.inhospMydFlag}, |
| | | #{item.importanceFlagCode}, #{item.emergencyLevelCode}, #{item.encounterSourceId} |
| | | #{item.importanceFlagCode}, #{item.emergencyLevelCode}, #{item.encounterSourceId}, |
| | | #{item.medicalCode}, #{item.medicalName}, #{item.medicalCompany} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="patno != null">patno = #{patno},</if> |
| | | <if test="inhospstate != null">inhospstate = #{inhospstate},</if> |
| | | <if test="deptcheckFlag != null">deptcheck_flag = #{deptcheckFlag},</if> |
| | | <if test="scheduleCheckFlag != null">schedulecheck_flag = #{scheduleCheckFlag},</if> |
| | | <if test="wardcheckFlag != null">wardcheck_flag = #{wardcheckFlag},</if> |
| | | <if test="inDeptcheckFlag != null">in_deptcheck_flag = #{inDeptcheckFlag},</if> |
| | | <if test="inWardcheckFlag != null">in_wardcheck_flag = #{inWardcheckFlag},</if> |
| | |
| | | <if test="importanceFlagCode != null ">importance_flag_code = #{importanceFlagCode},</if> |
| | | <if test="emergencyLevelCode != null ">emergency_level_code = #{emergencyLevelCode},</if> |
| | | <if test="encounterSourceId != null ">encounter_source_id = #{encounterSourceId},</if> |
| | | <if test="medicalCode != null and medicalCode != ''">medical_code = #{medicalCode},</if> |
| | | <if test="medicalName != null and medicalName != ''">medical_name = #{medicalName},</if> |
| | | <if test="medicalCompany != null and medicalCompany != ''">medical_company = #{medicalCompany},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |
| | | </update> |