|
@@ -27,17 +27,19 @@ public interface TriageDao {
|
|
|
|
|
|
// 获取未分诊的病人
|
|
|
@Select("<script>" +
|
|
|
- "select visit_date,rtrim(patient_id) as patientId, times,rtrim(name) as name, " +
|
|
|
- "dept_code, dept_name=(select name from zd_unit_code where code=dept_code), " +
|
|
|
- "room_code,room_name=(select room_name from mzfz_zd_dept_room where room_code=a.room_code), " +
|
|
|
- "room_status=(select status_flag from mzfz_zd_dept_room where room_code=a.room_code), " +
|
|
|
- "doctor_code,doctor_name=(select name from a_employee_mi where code=doctor_code), " +
|
|
|
- "serial_no, gh_no, req_type,reqName=(select rtrim(name) from mzy_zd_charge_type where code=a.req_type), " +
|
|
|
- "fz_no, slow_flag, status_flag, status_time,call_time, req_order, ampm, " +
|
|
|
- "req_fee=(select req_fee from mzy_reqrec where patient_id=a.patient_id and times=a.times)," +
|
|
|
- "clinic_fee=(select clinic_fee from mzy_reqrec where patient_id=a.patient_id and times=a.times) " +
|
|
|
- "from mzfz_patient_order a where datediff(day, visit_date, getdate())=0 and isnull(status_flag,'') in ('','0') " +
|
|
|
- "and dept_code in " +
|
|
|
+ "select visit_date,rtrim(patient_id) as patientId,times,rtrim(name) as name, " +
|
|
|
+ "fz_no,slow_flag,status_flag,status_time,call_time,req_order,ampm,dept_code, " +
|
|
|
+ "rtrim(room_code) as roomCode,doctor_code,serial_no, gh_no, req_type, " +
|
|
|
+ "deptName=(select d.name from zd_unit_code d where d.code=a.dept_code), " +
|
|
|
+ "roomName=(select d.room_name from mzfz_zd_dept_room d where d.room_code=a.room_code), " +
|
|
|
+ "roomStatus=(select d.status_flag from mzfz_zd_dept_room d where d.room_code=a.room_code), " +
|
|
|
+ "doctorName=(select rtrim(d.name) from a_employee_mi d where d.code=a.doctor_code), " +
|
|
|
+ "reqName=(select rtrim(d.name) from mzy_zd_charge_type d where d.code=a.req_type), " +
|
|
|
+ "reqFee=(select d.req_fee from mzy_reqrec d where d.patient_id=a.patient_id and d.times=a.times), " +
|
|
|
+ "clinicFee=(select d.clinic_fee from mzy_reqrec d where d.patient_id=a.patient_id and d.times=a.times), " +
|
|
|
+ "socialNo=(select rtrim(d.social_no) from mz_patient_mi d where d.patient_id=a.patient_id) " +
|
|
|
+ "from mzfz_patient_order a where datediff(day, visit_date, getdate())=0 " +
|
|
|
+ "and isnull(status_flag,'') in ('','0') and dept_code in " +
|
|
|
"<foreach collection='deptCodes' item='deptCode' open='(' separator=',' close=')'>" +
|
|
|
"#{deptCode}" +
|
|
|
"</foreach>" +
|
|
@@ -53,7 +55,8 @@ public interface TriageDao {
|
|
|
"room_status=(select status_flag from mzfz_zd_dept_room where room_code=a.room_code), " +
|
|
|
"doctor_code,doctor_name=(select name from a_employee_mi where code=doctor_code), " +
|
|
|
"serial_no, gh_no, req_type,reqName=(select rtrim(name) from mzy_zd_charge_type where code=a.req_type), " +
|
|
|
- "fz_no, slow_flag, status_flag, status_time,call_time, req_order, ampm " +
|
|
|
+ "fz_no, slow_flag, status_flag, status_time,call_time, req_order, ampm, " +
|
|
|
+ "socialNo=(select rtrim(d.social_no) from mz_patient_mi d where d.patient_id=a.patient_id) " +
|
|
|
"from mzfz_patient_order a where datediff(day, visit_date, getdate())=0 and status_flag='1' " +
|
|
|
"and dept_code in " +
|
|
|
"<foreach collection='deptCodes' item='deptCode' open='(' separator=',' close=')'>" +
|
|
@@ -70,7 +73,8 @@ public interface TriageDao {
|
|
|
"room_status=(select status_flag from mzfz_zd_dept_room where room_code=a.room_code), " +
|
|
|
"doctor_code,doctor_name=(select name from a_employee_mi where code=doctor_code), " +
|
|
|
"serial_no, gh_no, req_type,reqName=(select rtrim(name) from mzy_zd_charge_type where code=a.req_type), " +
|
|
|
- "fz_no, slow_flag, status_flag, status_time,call_time, req_order, ampm " +
|
|
|
+ "fz_no, slow_flag, status_flag, status_time,call_time, req_order, ampm, " +
|
|
|
+ "socialNo=(select rtrim(d.social_no) from mz_patient_mi d where d.patient_id=a.patient_id) " +
|
|
|
"from mzfz_patient_order a where datediff(day, visit_date, getdate())=0 and status_flag='9' " +
|
|
|
"and dept_code in " +
|
|
|
"<foreach collection='deptCodes' item='deptCode' open='(' separator=',' close=')'>" +
|