Appointment Scheduling Enhancements

Hi All,

In a particular project we have come up with the need for the following Enhancements to the Appointments Scheduling Module in Bahmni:

Auto Refresh of appointments

Context :

List View and Calendar view appointments currently refresh either on a manual refresh of the page or when the user creates or edits an appointment. If we are looking at a Calendar that is used by multiple providers to keep their agendas updated, we must ensure that the screen always shows the latest changes. In the absence of which, double , conflicting appointments etc will be booked for a provider.


We are looking at bringing in Auto refresh of the List view and the calendar View. The appointments will be refreshed in a set time period. We will retain the filters when this Auto refresh happens and refresh will happen only when the page is idle. Also we will take care of the validations with the updated information just after a refresh.

Ability to Undo Status change - Missed/ Complete appointments

Context :

In Bahmni we allow the undo of the Check-in action. However, for actions like Missed or complete, we cannot undo this change. We must have a way of going back, especially in cases of manual errors in changing the statuses.


Because of the way we track appointments status change in bahmni, we can never know the previous status of the appointments, unless it is the first change. So a undo is not possible but a reset to one fixed status is possible. Logically keeping this is as “Scheduled” makes sense. Users can then do the next steps after doing this reset.

Scheduled → Checked-in → Completed

Scheduled → Missed

Scheduled → Cancelled

So essentially through this feature will allow users to reset any appointment to a Scheduled Status. It will be configurable to specify which statuses can be reset. Also we will introduce privileges to ensure who is allowed to reset the status.

Limitation: Each state transition does not have a privilege. If you have set some statuses that are allowed to reset and the user has the privileges to do it, then they would be allowed to reset all allowed statuses.

Weekly View of a Calendar


Currently In bahmni we support only a Day view for both the List & Calendar View. It is necessary for providers to be able to quickly look at a week’s agenda in a glance to place their patient appointments.


The Calendar Plug in we are using already supports the Week View. We will make it configurable i.e implementations can choose to turn of the Week view. The implementations that choose to use the Week view will be able to see an option to switch between Day and Week Views.

Custom Calendar/ Appointments List Tabs


Currently, we have a single Tab called “Appointments List” for all providers and services. We apply Filters to see the information we would want to see. However there are scenarios where we would like to have a tab easily accessible, with a set of providers, grouped on some provider attributes. For example, you would want to see doctors of a Cardiology Department. Similarly, you can have another Tab for all the doctors from the Orthopaedic department. This is especially helpful for someone like a supervisor or a receptionist who would like to quickly see a group of providers to book appointments. This saves the effort of applying filters and filters get reset when a page is refreshed. And the users can switch between Tabs as required.


The approach is to introduce the ability to have Custom Tabs similar to the existing “Appointments List” tab, grouped on some Provider Attributes. The tab will behave the same way as the existing Tab, with both List & calendar view. But the focus is primarily on the Calendar View - to give the ability to see calendars specific to your needs without much effort and clutter. We will also ensure that privileges exist for each Tab, so that we show/hide the tabs based on who is logged in. In fact we could build on this further to have a “My Calendar” view, which will be tab specific to the provider who logs in - a provider specific view.

Further, we right now show only those provider columns in the calendar that have appointments. We will bring in a configuration to choose to display the Providers columns without appointments as well. This is because an empty column gives the person booking an appointment an idea of the available slots and is more intuitive to find a slot in the calendar.

Accepting or Rejecting an Appointment Request


Think of Appointments similar to meetings on Google calendar, where a meeting request can accepted or rejected or have a tentative acceptance. We are proposing something to similar to that where we can accept or reject an appointment when it is not booked by themselves. Appointments are often booked on behalf of doctors. This could be done by receptionists or some other doctor who wants to refer their patient to be seen by this particular doctor.

Now in some hospitals, one might not require such a request feature. However there are hospitals which strictly do not want doctors to add/edit appointments for other providers.


Introduce the ability to accept/ reject/Tentatively accept an appointment booked by someone other than the provider. Make this privilege based. We can different levels of privilege:

  1. Allow to book on anyone’s calendar without any restriction.
  2. Allow to book only on for self
  3. Allow to book, but must be accepted by the other provider to be considered as a valid appointment.

Similarly, we must have privileges for Editing/Status change of appointments. Also on the UI we must differentiate such appointments which are booked on your behalf and require action. We also need to have actions for Accepting/Rejecting/Tentatively Accepting such appointments.

We will be presenting our technical approaches to these in the next PAT call. Looking forward to people’s comments and suggestions.

@pramidat @swathivarkala @angshuonline @darius @von @saikumarv


Hi all,

This functionality to undo a status change (missed or completed appointments) is a need for us and has been requested by users in the field. The use case that has been articulated to justify this need is often manual errors. This happens more often than thought and the users feel the need to undo their actions (especially around missed or completed status change).

In general, making actions reversible is offering users a way to backtrack from erroneous entries. The ability for users to backtrack whatever they are doing allows users to explore the product without the constant fear of failure. On the other hand, if users have to be watchful with every action they take, it leads to a slower use of the application and nerve-racking experience that no one wants.

1 Like

These enhancements will be really helpful for PSI as they are also using appointment scheduling to book appointments for various services.

Especially ability to undo an appointment status as it gives user an opportunity to correct any mistakes made. But this functionality should allow user to undo statues for current date’s appointments only.

I would also like to suggest two more enhancements which were asked from PSI side:

  1. To add the feature to mark the provider´s schedule as “not available” or any other status. Provider should be able to mark his/her non-availability so that receptionist cannot book appointment if the provider is not available.

For example : OpenEMR provides provider calendar where they can define their availability using different configurable categories like “In office”, “Out of Office”, “Lunch”.

Link :

  1. Users should be able to re-arrange columns in list view by providing an ability to drag and drop. This re-arranged view should be saved against the user login.(Similar to pinning option in clinical obs)

Hi, really glad to see the enhancements proposed. Please also consider the possibility to add others, as follows

  1. When schedule an appointment, to have the feature to “find available slot”. This functionality reduce the time to go within a provider´s specific calendar to know exactly the available slots in his/her schedule.
  2. Appointment statuses should be a configurable list, so each facility would have the chance to set it up according to its particular environment
  3. Are you considering to include any report related to appointments? like Appointment versus Visit? so, would be nice to see the proportion of app done and completed with a visit. Sometimes, this report can be used as client behaviour analysis


1 Like

Throwing this out there, is there any possibility of bringing some of these features to the openmrs-module-appointmentscheduling?

Hi @rdeolal,

Thanks for mentioning the enhancements required from PSI.

As for your first point on Provider’s unavailable time, from MSF-OCB also we had a similar requirement to be able to block provider’s schedules for non-clinical activities. There is a trello card in the Bahmni roadmap for introducing a provider schedule in Bahmni’s appointment scheduling. Maybe something that can be up voted for Release 0.93?

That would be great user experience, not sure of the effort involved though :slight_smile: However what can be useful in the first place at the least would be the ability at the implementation level to choose/configure what columns is to displayed on the list view and their order of display. Currently we cannot add/delete or move columns without custom effort. We had some initial discussions on this with @swathivarkala and @pramidat.

Hi @anamariaelsal, Thank you for your inputs.

Currently since our data model of appointment scheduling is based on services, we are able to show available slots information for services. To show the same for Providers, we might require to introduce a “Provider’s schedule” (Trello Card ) as i have pointed out for @rdeolal’s suggestion for Provider unavailabilty.

@angshuonline @swathivarkala @pramidat Is this something that is feasible?

Not yet. We don’t have any current reports linking appts. and Visits.

Ability to Undo Status change of Appointments

I see that multiple implementations are raising a need for this feature of undoing a status change. I am posting here the approach we are thinking of:

  • Provide a configuration for the statuses for which we can undo the status

          "statusAllowedForReset" : ["CheckIn", "Missed", "Canceled", "Completed" ]
  • We will Undo/Reset every the status back to “Scheduled” status

  • This undo action will be privilege based. We will introduce a new privilege, where users with this privilege only will be able to perform this action of undo

  • Please note that every single state transition to reset does not have a privilege. Thats is, if you have configured some statuses that are allowed to reset and the user has the privileges to do it, then they would be allowed to reset all allowed statuses.

  • Existing implementations using Undo check in -

    • Since there are existing implementations using the Undo-checkin we must ensure that currently all users who are managing appointments get this privilege. By default we will allow check in status to be reset. Implementations can add the other statuses to the config as per their need.

Let us know if this meets your use cases @abhinavpc and @rdeolal.

Ability to restrict provider from booking on other’s calendar, allow booking only for self

This is another requirement we have in appointment scheduling:

Currently we allow any user with a “Manage Appointments” privilege to create & manage appointments for all providers. However there are hospitals/clinics which strictly do not want doctors to add/edit appointments for other doctors. Each provider can only edit his/her own calendar. It is only someone like a receptionist, who is allowed to manage other providers’ calendars. In such scenarios we should be able to differentiate the Edit rights on who is:

  • Allowed to book/edit on anyone’s calendar without any restriction.
  • Allowed to book/edit appointments only for self

Here is the approach we are thinking of:

  • We will Introduce a new Privilege in openMRS - “ManageSelfAppointmentsOnly”
  • Before saving the appointment, check for this privilege * If present, then verify whether the provider in appointment is same as the current user * If not throw an exception

Does any of the other implementations have similar needs?

@angshuonline @swathivarkala @pramidat @von @ramses

@sruti @pramidat
I need clarity on the below points:

  1. Will a user be allowed to change status for previous appointments or it is only valid for today’s(current date) appointments. For example : today is 21st, can i modify status for yesterday’s appointments that is 20th.
  2. Will this feature allow user to modify status of future appointments. In the current appointment scheduling, it does not stop the user to perform actions like checkin on the future appointments.

Apart from these two points I can confirm this approach will meet our requirements.

Hi @rdeolal,

We are not looking to bring in any such restrictions. So users will be able to undo statuses even for past dates. As an example, think of a supervisor who finds the mistake and does the undo on the next day.

Even in the current Bahmni version, we do not stop users from checking in or completing future appointments. So it will remain the same way. Which means you can undo actions even for future appointments.

This is the feedback that i have heard from one of the implementations. Pasting verbatim "The Appointment and Scheduling module has been helpful. Considering the time taken for adding appointments, it is still been difficult to use it for all general OPD patient’s appointments. Is it possible to reduce time in adding appointment in system? A few ideas around that could be -

  1. Adding Bar/QR code may reduce time in registration number input time.

  2. Making start and end time a non compulsory field.

  3. Disabling location and provider for general OPD patients.

Is it possible to do this?"

  1. Adding Bar/QR code may reduce time in registration number input time -> This is could be a good enhancement
  2. Making start and end time a non compulsory field -> If no start and end times are entered, where can the appointment be placed in the calendar?
  3. Disabling location and provider for general OPD patients. -> location and provider are non-mandatory even now.

Could someone from the bahmni team elaborate on where exactly the data model changes will be effected? Are you using a particular module?

Thank you.

@jdick, the module is context is bahmni specific and not the old appointments module of openmrs. you can find codebase here for apis and feature guide here

Thanks @angshuonline. Do you have a picture of a data model for this module? Makes it easier to understand how you’re thinking about things.

We do have. I will update the WIKI and send a link

This talk thread has the the data model (might have changed a bit) and will regenerate the model and upload it in the link.

You will find find the analysis doc here.

What aspects/features are you looking for?

appointmentscheduling.pdf (23.5 KB) Please find the data model for appointment scheduling attached


Could anyone please suggest how is it possible to change/configure the provider and service appointment type field (in the add new appointment form) as mandatory?

Sometime the encoder doesn’t fill-up this information and therefore this information is missing from the list view. This is important for the provider to see the list of appointment. That’s why this is crucial to make these two field mandatory in our implementation.

Thanks in advance.