Uploaded image for project: 'Appointment Module'
  1. Appointment Module
  2. AM-199

Feature to enable dynamic creation of appointment blocks

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11.0
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      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
      https://github.com/openmrs/openmrs-module-appointmentscheduling/blob/6858eafde1bf3c59375acef43ab0e887ef52909c/api/src/main/java/org/openmrs/module/appointmentscheduling/api/impl/AppointmentServiceImpl.java#L1260

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              jecihjoy Jacinta Gichuhi
              Reporter:
              jecihjoy Jacinta Gichuhi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Remaining Estimate - 3 hours
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified