Affects Version/s: None
Fix Version/s: 1.11.0
This tickets intends to reduce the manual work of having to create appointment blocks and timeslots daily.
It introduces a new table called appointmentscheduling_provider_schedule that stores the same information as appointment blocks. This tables helps in creating appointment blocks and timeslot programmatic ally after checking against location, provider, appointment date and apointment type.
createTimeSlotUsingProviderSchedule() service method is first used to perform the above check, if it finds a provide schedule that suits the checks tit retrieves the provider schedule and use it to create appointment block and timeslot sequentially. The timeslot is then used to schedule an appointment. If a suitable resource doesn't exist the user is notified.
getTimeslotForAppointment() service method is called first before calling createTimeSlotUsingProviderSchedule() to first check if a suitable tinmeslot that fits the checks exist, if it exist it is retrieved and used to book an appointment. If it doesn't exist createTimeSlotUsingProviderSchedule() is called.
link to code
these methods are called here : https://github.com/openmrs/openmrs-module-appointmentscheduling/blob/master/omod/src/main/java/org/openmrs/module/appointmentscheduling/web/controller/AppointmentRequisitionController.java