Adding Sunday as a working day in Appointment Scheduling UI

Where I’m implementing OpenMRS, working days are from Sunday to Thursday. Is there a way to change the working days in this calendar? or to make it include all week days like in here:

@mogoodrich Is there anyway the calendar can be made to include all week days?

This would be of great value here

Thank you

There’s no built-in way to do this right now, but taking a quick look, seems like whether or not the appointment blocks calendar widget shows weekend days or not is based on a simple parameter. Assumedly if we could make this configurable via a global property (or some other means) this would support your use case:

Take care, Mark

1 Like

Thank you!

Is there a way to include this update in the next release?

What is the next step?

Write up a ticket for it in the Appointment Scheduling module (and then @ me on the ticket so that I remember to take a look at it and add any comments).

If you’ve got someone who can work on it, after I mark it Ready for Work, feel free to have them take it on… otherwise, hopefully there is someone with spare time in the community who can help.

Once the code is ready, issue a pull request and I’ll review and merge.

2 Likes

Issue created:

1 Like

this issue was solved in this snapshot: https://drive.google.com/file/d/0B_3udrrJPj8Wd3IxaVJyYXFqdVE/view?usp=sharing is there a way to add it to the module?

@hossam is this a custom fork of the module? If so, do you have it in github and can you issue a pull request against the main repo?

Thanks, Mark

@mogoodrich Thank you for your reply.

I simply changed the parameter “weekends” from “false” to “true” and I compiled it and used it instead of the main Apppointment Scheduling UI module.

I don’t know how to create a global property. and now I’m updating to the reference application 2.7 so I was wondering if the issue was fixed.

Can you please guide me through the process of creating a global property? thank you

@hossam not sure how much development experience you have, but it shouldn’t be too hard.

You specify the global property in the config.xml file, and then you can fetch the global property via the getGlobalProperty method of the administration service.

Looks like there aren’t any global properties currently used in the Appointment Scheduling UI module, but if you look at the config.xml and search for getGlobalProperty in another module like EMR API you should find some examples of their usage.

Take care, Mark

I found this thread helpful when investigating why some of the selenium legacy tests in openmrs-distro-referenceapplication are failing UI master build plan on Sundays and Saturdays.

The solution is to ensure that on Manage Appointment Block page the calendar displays all the days of the week for the tests be able to pick the current day whenever building the plan through out the days of the week.

@samuel34 seemed to have worked around its resolution in this PR but seems to have not resolved the issue of availing these two days on the Calendar.

Have just raised a PR to openmrs-module-appointmentschedulingui repo cc: @dkayiwa @mogoodrich @samuel34 @ibacher

Thanks for the research @kdaud , good catch!

I commented on the ticket, but I think the change shold hopefully be just to change the "“appointmentschedulingui.includeWeekends” on that server to “true”… we shouldn’t actually be making a code change here.

Have updated the PR after setting the global property “appointmentschedulingui.includeWeekends” to a boolean value of true so as to include weekends on the calendar.

Am expecting the demo server to be updated with the changes once it enters into master though am not sure how qa-refapp.demo server will be updated with these changes too since its the server instances we are running against these tests in master !

Am of a thought that if the RefApp 2.12 has not been released yet (cc: @herbert24 @grace), we can have this functionality included in the release !
cc: @mogoodrich @dkayiwa

Setting the global property value for appointmentschedulingui.includeWeekends to true directly on the server made Sunday & Saturday available on the calendar, and now the tests are passing build plan on the weekends as well.

Thanks @mogoodrich @sharif @dkayiwa for the guidance :seedling:

Well done @kdaud , :muscle: Does this mean we close this Ticket :slightly_smiling_face:

1 Like