|
|
@@ -64,7 +64,7 @@ public interface TriageDao {
|
|
|
"reqName=(select rtrim(name) from mzy_zd_charge_type where code=a.req_type), " +
|
|
|
"socialNo=(select rtrim(d.social_no) from mz_patient_mi d where d.patient_id=a.patient_id) " +
|
|
|
"from mzfz_patient_order a with(nolock) left join mzfz_zd_dept_room b on b.room_code=a.room_code " +
|
|
|
- "where datediff(day, visit_date, getdate())=0 and a.status_flag in ('1','2','3') " +
|
|
|
+ "where datediff(day, call_time, getdate())=0 and a.status_flag in ('1','2','3') " +
|
|
|
"and a.dept_code in " +
|
|
|
"<foreach collection='deptCodes' item='deptCode' open='(' separator=',' close=')'>" +
|
|
|
"#{deptCode}" +
|
|
|
@@ -80,11 +80,11 @@ public interface TriageDao {
|
|
|
"reqName=(select rtrim(name) from mzy_zd_charge_type where code=a.req_type), " +
|
|
|
"socialNo=(select rtrim(d.social_no) from mz_patient_mi d where d.patient_id=a.patient_id) " +
|
|
|
"from mzfz_patient_order a with(nolock) left join mzfz_zd_dept_room b on b.room_code=a.room_code " +
|
|
|
- "where datediff(day, visit_date, getdate())=0 and a.status_flag='9' " +
|
|
|
+ "where datediff(day, visit_date, getdate()) <![CDATA[<=]]> 3 and a.status_flag='9' " +
|
|
|
"and a.dept_code in " +
|
|
|
"<foreach collection='deptCodes' item='deptCode' open='(' separator=',' close=')'>" +
|
|
|
"#{deptCode}" +
|
|
|
- "</foreach> order by fz_no" +
|
|
|
+ "</foreach> order by visit_date desc, fz_no" +
|
|
|
"</script>")
|
|
|
List<MzfzPatientOrder> getTreatedPatients(@Param("deptCodes") String[] deptCodes);
|
|
|
|
|
|
@@ -97,7 +97,7 @@ public interface TriageDao {
|
|
|
"reqName=(select rtrim(name) from mzy_zd_charge_type where code=a.req_type), " +
|
|
|
"phone_no=(select rtrim(isnull(phone_no,'-')) from mz_patient_mi where patient_id=a.patient_id) " +
|
|
|
"from mzfz_patient_order a with(nolock) left join mzfz_zd_dept_room b on b.room_code=a.room_code " +
|
|
|
- "where datediff(day, visit_date, getdate())=0 " +
|
|
|
+ "where datediff(day, call_time, getdate())=0 " +
|
|
|
"and a.status_flag in ('1','2','3') and a.dept_code in " +
|
|
|
"<foreach collection='deptCodes' item='deptCode' open='(' separator=',' close=')'>" +
|
|
|
"#{deptCode}" +
|