|
|
@@ -28,10 +28,11 @@
|
|
|
<result property="lastAfterQuestionTime" column="last_after_question_time"/>
|
|
|
</resultMap>
|
|
|
|
|
|
- <resultMap id="RoomAndPatient" type="cn.tr.module.smart.app.controller.vo.DoctorClinicRoomVO">
|
|
|
- <result property="clinicRoomId" column="id"/>
|
|
|
+ <resultMap id="roomAndPatient" type="cn.tr.module.smart.app.controller.vo.DoctorClinicRoomVO">
|
|
|
+ <result property="clinicRoomId" column="clinic_room_id"/>
|
|
|
<result property="clinicName" column="clinic_name"/>
|
|
|
<result property="clinicStartTime" column="clinic_start_time"/>
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
<result property="deptName" column="dept_name"/>
|
|
|
<result property="patientCode" column="patient_code"/>
|
|
|
<result property="patientName" column="patient_name"/>
|
|
|
@@ -39,6 +40,16 @@
|
|
|
<result property="patientGender" column="patient_gender"/>
|
|
|
<result property="followUpCount" column="follow_up_count"/>
|
|
|
<result property="assessCount" column="assess_count"/>
|
|
|
+ <result property="patientAvatar" column="patient_avatar"/>
|
|
|
+ <result property="deviceType" column="device_type"/>
|
|
|
+ <result property="deviceId" column="device_id"/>
|
|
|
+ <result property="electricQuantity" column="electric_quantity"/>
|
|
|
+ <result property="deviceRunState" column="device_run_state"/>
|
|
|
+ <result property="deviceAlarm" column="device_alarm"/>
|
|
|
+ <result property="warnLowBattery" column="warn_low_battery"/>
|
|
|
+ <result property="warnWillFinished" column="warn_will_finished"/>
|
|
|
+ <result property="warnAnalgesicPoor" column="warn_analgesic_poor"/>
|
|
|
+ <result property="warnFlow" column="warn_flow"/>
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
@@ -92,20 +103,32 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectByClinicRoomAndPatientList" resultMap="RoomAndPatient">
|
|
|
- SELECT bcr.id,
|
|
|
- bcr.clinic_name,
|
|
|
- bcr.clinic_start_time,
|
|
|
- bcr.dept_name,
|
|
|
- bcr.patient_name,
|
|
|
- bcr.patient_age,
|
|
|
- bcr.patient_gender,
|
|
|
- bcr.patient_code,
|
|
|
- bcr.follow_up_count,
|
|
|
- bcr.assess_count
|
|
|
+ <select id="selectByClinicRoomAndPatientList" resultMap="roomAndPatient">
|
|
|
+ SELECT bcr.id as clinic_room_id,
|
|
|
+ bcr.clinic_name as clinic_name,
|
|
|
+ bcr.clinic_start_time as clinic_start_time,
|
|
|
+ bcr.dept_id as dept_id,
|
|
|
+ bcr.dept_name as dept_name,
|
|
|
+ bcr.patient_name as patient_name,
|
|
|
+ bcr.patient_age as patient_age,
|
|
|
+ bcr.patient_gender as patient_gender,
|
|
|
+ bcr.patient_code as patient_code,
|
|
|
+ bcr.follow_up_count as follow_up_count,
|
|
|
+ bcr.image_url as patient_avatar,
|
|
|
+ bcr.assess_count as assess_count,
|
|
|
+ bih.device_id as device_id,
|
|
|
+ bih.device_type as device_type,
|
|
|
+ bih.electric_quantity as electric_quantity,
|
|
|
+ bih.device_run_state as device_run_state,
|
|
|
+ bih.device_alarm as device_alarm,
|
|
|
+ bih.warn_low_battery as warn_low_battery,
|
|
|
+ bih.warn_will_finished as warn_will_finished,
|
|
|
+ bih.warn_flow as warn_flow,
|
|
|
+ bih.warn_analgesic_poor as warn_analgesic_poor
|
|
|
FROM biz_clinic_room bcr
|
|
|
- join biz_clinic_room_doctor_user bcrmu
|
|
|
- on bcr.id = bcrmu.clinic_room_id
|
|
|
+ join biz_clinic_room_doctor_user bcrmu on bcr.id = bcrmu.clinic_room_id
|
|
|
+ left join biz_infusion_clinic as bic on bic.clinic_id = bcr.id
|
|
|
+ left join biz_infusion_history as bih on bih.id=bic.infusion_id
|
|
|
<where>
|
|
|
and bcr.deleted = 0
|
|
|
<if test="source.clinicStatus != null and source.clinicStatus != ''">
|