Scheduling Failures

Hello

Just updated to the latest. 5.0.1 (3) from 5.0.0.

We are having problems with scheduling.

When we try the “Find Available” option from within the patient info (after clicking Add), we are able to navigate to the desired time slot, select it, and save it.

The application goes through its checks and shows “time slot available… saving” (or something like that). It closes the modal windows and then refreshes the page.

The appointment that I just scheduled does not show up in the “Appointments” list, nor does it show up in the actual calendar. However, when I try to go schedule the appointment again, the time slot still shows up as “Available” in “Find Available,” but when I try to save it, it tells me that the time slot is not available.

There seems to be a disconnect here. This is a pretty nasty bug, as staff are completely unable to use and rely on the scheduling feature with any sort of confidence.

Any thoughts?

Edit: added a screenshot. I selected the time (Tuesday at 5:15) and you can see that it tells me the time is not available, but it is in “Find Available”

Thanks

After upgrading you should always do a full clear of Browser cache.
If not you may get some undesirable behavior.

I downloaded the latest version of Firefox on a new machine. Cleared all cache/history just to be sure. The issue persists. I can re-create it on demand.

I’ve rebooted the entire VM after restarting apache didn’t seem to make a difference.

Are there some logs you might suggest I look through to see what might be going on?

Look in the aoache2 and php log files.

So I noticed that when you select a date/time from the “Find Available” dialogue that it brings the date back into the UI in this format: yyyy-mm-dd. And then it fails every time when I try to save it. And by “fails” what I mean is that the appointment date/time we just selected does not show up in the calendar.

I also noticed that if I take the date that was returned from the “Find Available” dialogue, use the calendar widget, and go select that date, that it works fine.

Is there some date format setting somewhere? I don’t see any errors on the server so I don’t think that it’s failing to save anything. It’s just that the data that’s get sent back apparently is not in the expected format?

Here’s the GET request:

/emr/interface/main/calendar/find_appt_popup.php?providerid=1&catid=5&facility=4&startdate=2018-08-28&evdur=45

And apparently this is the eventual POST request to add the calendar event:

/emr/interface/main/calendar/add_edit_event.php?eid=

Here are that request’s parameters:

resname: empty
form_action: save
recurr_affect:
selected_date: 2018-07-01
event_start_date: 2018-07-01
old_repeats: 0
rt2_flag2: 0
form_category: 5
form_date: 2018-08-28
form_allday: 0
form_hour: 12
form_minute: 00
form_ampm: 2
form_title: Therapy Session (45 min)
form_duration: 45
facility: 4
billing_facility: 4
form_patient: Patient, TestNew
form_pid: 46633
form_provider: 1
form_repeat_exdate:
form_apptstatus: -
form_prefcat: 0
form_room:
form_comments:
form_dob:

When I change the format of the date in the calendar widget and pass this to the POST:

resname: empty
form_action: save
recurr_affect:
selected_date: 2018-07-01
event_start_date: 2018-07-01
old_repeats: 0
rt2_flag2: 0
form_category: 5
form_date: 08/30/2018
form_allday: 0
form_hour: 12
form_minute: 00
form_ampm: 2
form_title: Therapy Session (45 min)
form_duration: 45
facility: 4
billing_facility: 4
form_patient: Patient, TestNew
form_pid: 46633
form_provider: 1
form_repeat_exdate:
form_apptstatus: -
form_prefcat: 0
form_room:
form_comments:
form_dob:

I meet with success.

In case it’s not totally clear, the difference is in how we are sending back the form_date variable in the POST.

Also, my Global Settings -> Locale -> Date Display Format value in EMR is MM/DD/YYYY.

So how do I make it so that dates show up appropriately and/or are handled appropriately?

Does anyone have any thoughts here?

hi @midder,

Thanks for the bug report and a developer is looking into this bug. Hopefully will have a fix soon.

thanks,
-brady

hi @midder ,

Here’s a proposed fix @epsdky . Are you able to test this?
Fix for issue reported in ‘Scheduling Failures’ on forum by bradymiller · Pull Request #1755 · openemr/openemr · GitHub

thanks,
-brady

Thanks

I’m curious about the lack of reports from others on this issue. It nearly brought our clinic to a halt and the practitioners were close to demanding we roll it back.

Do others not experience this? Do they not know it’s happening to them?

Thanks for the attention. I can review and test as well.

1 Like

FYI that fix doesn’t work for me. It no longer shows the pop-up error, but it also does not save the appointment to then be shown in the patient “Appointments” dialog.

Hello Brian (@midder),

I have tested the fix (applied to openemr 5.0.1 (3)) with date format set to MM/DD/YYYY (and DD/MM/YYYY, YYYY-MM-DD) and cannot see a problem. I can successfully set appointments using “Find Available” in the Appointments widget (Patient Summary).

Hello Brian (@midder ),

(With the date format set to MM/DD/YYYY) Does a date in YYYY-MM-DD format appear in the date field of the add / edit event form when a selection is made in “Find Available”? Could the old version of the function setappt be still present in add_edit_event.php? (Only the new version should be present).

Sorry missed this one.

No the date format when a selection is made in Find Available is MM/DD/YYYY.

There’s only one version of the function. I’ve commented out the previous one.

I’ve tried it again just now. After I made the code change, I rebooted the entire VM. This time, no matter what date/time I select, it tells me that it’s already being used and do I still want to use it. I say OK, it saves it, and the appointment is now available in the “Add” widget.

No problem.

The fix only addresses the issue of dates with format YYYY-MM-DD appearing in the Date field (when date format is set to MM/DD/YYYY or DD/MM/YYYY) after a selection is made in Find Available causing saved appointments to not appear in Appointments widget (or calendar). From your last post it seems this is now working for you?

At present I am not able to reproduce the other issue.

Are you able to reproduce it in the OpenEMR 5.0.1 Demo?

hi @epsdky and @midder ,

Is this fix ready to go into the codebase now (since it appears to be fixing main issue)?

thanks,
-brady

Yes. Looks good on my end. Thanks everyone.

1 Like

Hi,
Great. I just brought in @epsdky’s fix, which will also include in the next 5.0.1 patch. Thank you @epsdky!
-brady

Hello everyone

Sorry to bring up this old topic again, but I’m still having issues here. We are on the latest version and patch.

Here’s sort of the workflow: Start at the chart, choose provider, find available. The pop-up will always say not available proceed anyway? The staff has essentially chosen to always proceed here, since the find available widget just told them that the timeslot was available.

We need to be able to rely on this.

Any further thoughts here? Does anyone else experience it?

Hi Brian,
We also have this issue. The pop-up always says no slots available even if we try searching for 365 days ahead. So we don’t use it. Many times the button find available doesn’t show… And no matter what we change in the global settings, the calendar never shows 24-hour format, it always stays at AM/PM. The calendarproblems may have something to do with the DD/MM/YYYY - 24 hr format we are used to here. For the time being we just use another separate calendar which complicates matters a lot…:frowning_face: Fiddling with the server did not help