Skip to content

Commit

Permalink
UHM-855 Order scheduled appointments blocks by time range and provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pamcdm committed Mar 17, 2014
1 parent ef347cf commit 8c77847
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public List<AppointmentBlock> getAppointmentBlocks(Date fromDate, Date toDate, S
List<AppointmentBlock> appointmentBlocks = criteria.list();
if (appointmentType != null) {
filteredAppointmentBlocks = new ArrayList<AppointmentBlock>();
String stringQuery = "SELECT appointmentBlock FROM AppointmentBlock AS appointmentBlock WHERE :appointmentType IN elements(appointmentBlock.types) AND voided = 0";
String stringQuery = "SELECT appointmentBlock FROM AppointmentBlock AS appointmentBlock WHERE :appointmentType IN elements(appointmentBlock.types) AND voided = 0 ORDER BY appointmentBlock.startDate, appointmentBlock.endDate, appointmentBlock.provider";
Query query = super.sessionFactory.getCurrentSession().createQuery(stringQuery)
.setParameter("appointmentType", appointmentType);
List<AppointmentBlock> appointmentBlocksFilteredByType = query.list();
Expand Down

0 comments on commit 8c77847

Please sign in to comment.