Calandar Provider

Hi, I am trying to create appointments for which I have to set Provider’s availability. Selecting ‘In Office’ Provider Category, it disables the time duration as shown in screenshot


I have gone through openemr demo instance where the time duration is not disabled. Also, I have configured Calendar Config section identical to openemr demo instance and below is the screenshot of Calendar Category for ‘In Office’

Am I missing anything?

Try changing the Duration: Hours / Minutes ?

Hi @kiszna
Actually the event category you have selected, ‘In Office’ (and its complimentary setting, ‘out of office’) is a special purpose category intended for use when setting the provider’s hours in or out of the office and they have no duration. The duration of a particular category of appointment is determined by the duration specified for the other appointment categories from ‘Established Patient’ down to the end of the list in the Category’ dropdown:

Setting up the calendar is fairly complex, and as in this case, at times inconsistent. The OpenEMR wiki has a full tutorial on the Calendar, it would be useful to read the whole thing to be sure you have done all the preliminary settings required for it to function properly.

https://www.open-emr.org/wiki/index.php/TheCalendarNotes-v7

Come back here if you have any questions about all this!
Best- Harley

Hey there,

I ran into this and was able to get it working enough for my purposes, though probably not the ideal solution. I will share what changes I made in hopes that gets you to a point you can continue or at least point you in the right direciton.

so in openemr/interface/main/calendar/add_edit_event.php there is a function called set_display() in that there is a variable called f.form_duration.disabled which is set to true, I changed that to false so it is still an editable field. with this, you can edit the duration bypassing the validator preventing saving.

additionally in set_allday() there is a var called durationDisabled I set to true and a field called f.form_duration.value which I gave the default value of “1”, which makes it so you can set all day for in_office and that must have a duration bug isn’t present.

This may be kind of hacky so all the disclaimers but maybe this will be useful to you. Good luck

I tried that but didn’t work!

Though I don’t want to modify the core files but for now that seems to be the ultimate solution to me!

Nope, it’s a bug and no idea when it broke. Had to have been recent.
If I get a little break from ONC, I’ll get you a quick patch to get along until next patch.
No Promises will try.

that will be great Jerry!

Hi @kiszna
Sorry took so long but here is a file to allow one to use all day and still validate with duration 0 or empty.
This at least will be in patch 5 but I think there are some improvements I may add in addition.

Replace the existing file at interface/main/calendar/add_edit_event.php
With below. If you’re using windows after replacement of file right click on file, select properties then uncheck Unblock visible and set. Important to do this because access may be blocked.

add_edit_event.php (90.7 KB)