Difference between OD schedule and API slots

For requests or help with our API
Post Reply
rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Difference between OD schedule and API slots

Post by rinse-rey » Thu Jan 12, 2023 11:51 am

Hi there,

We have seen a mismatch between the /Slots API and what the Open Dental search returns in the software.

The Slots documentation says: If a provider has existing appointments in multiple operatories, it considers all of them as a whole and only returns slots that are available in all operatories for that provider simultaneously.

The question is how to make the API consider only free slots for the specific provider but for a specific Operatory only. Because currently, the API is looking at all operatories as a whole.

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Difference between OD schedule and API slots

Post by SLeon » Thu Jan 12, 2023 1:04 pm

Good afternoon,

You are correct that the Appointments GET Slots returns slightly different information than the appointment search performed within the Open Dental software. This is for many reasons, one of which being that the latter searches for openings based on the current Appointment View. The first open slot is returned for each day, because the dental office employee can select it and visually see the other openings when they are taken to that day.

The API analog must behave differently as there is no visual component, which is why it allows search parameters that cannot be set in Open Dental's appointment search (such as OpNum). The difference in the results are detailed here:
There are, however, some differences between this and the Search in Open Dental. This returns entire open slots instead of a series of suggested appointment times or the first appointment time for each day. It also currently searches by entire appointment length instead of the XXX provider times on appointments....

In version 22.1 we added the OpNum parameter. While it is optional, we state in our documentation "Most users will specify a Provider and an Operatory" for the reason you mentioned. Supplying both the ProvNum and OpNum parameters should work for your use case.

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: Difference between OD schedule and API slots

Post by rinse-rey » Fri Jan 13, 2023 7:28 am

Hi Sarah,

Setting both the OpsNumb and Provider number in the API is not working.

As you can see in the pictures, for January 18th there is availability at 9am for the Restoration column. The Open Dental search, also is presenting that slot.

However, the API only returns availability for 2pm on January 18th.

The reason is that the other columns have assigned the doctor as the main provider, but if I remove the doctor from the other two columns the API returns the right answer.
Attachments
Screen Shot 2023-01-13 at 11.25.32 AM.png
Screen Shot 2023-01-13 at 11.25.32 AM.png (233.96 KiB) Viewed 1460 times
Screen Shot 2023-01-13 at 11.17.14 AM.png
Screen Shot 2023-01-13 at 11.17.14 AM.png (1.11 MiB) Viewed 1460 times

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Difference between OD schedule and API slots

Post by SLeon » Mon Jan 16, 2023 8:31 am

Good morning,

Thank you for clarifying that you have a single provider assigned to multiple operatories. In your screenshot above, the Restoration operatory has openings from 9-10a, 11a-1p, and 2-6p for whichever provider(s) scheduled there. But it does not show where else Provider #8 is scheduled to work or has an appointment scheduled with them as a provider.

The reason you are not getting seeing the 9a timeslot returned for this operatory is because they are already scheduled for an appointment at that time in a different operatory. The Appointments GET Slots method will only return open timeslots, and times that the provider has an appointment are not considered available. Essentially the provider cannot be in two places at once. This is why it is important our documentation details this behavior as the "right answer".
If a provider has existing appointments in multiple operatories, it considers all of them as a whole and only returns slots that are available in all operatories for that provider simultaneously.
When you removed all but one of the provider's operatory schedules, your results show their availability in only that single operatory:
For providers assigned to a single operatory, the results will be the same as what a person would see if looking at the Appointments Module.
If you want to support a workflow where a single provider is assigned to multiple operatories and want to double/triple book their appointments (ie, ignore times they are busy in other operatories), you can use our Schedules GET and Appointments GET method together as described here. This detailed post also walks through how a developer can effectively duplicate the information seen on Open Dental's Appointment Module.

Post Reply