Creating an Appointment through API call

This forum is for programmers who have questions about the source code.
Post Reply
poonam
Posts: 20
Joined: Mon Aug 24, 2020 1:17 pm

Creating an Appointment through API call

Post by poonam » Thu Aug 27, 2020 9:50 am

Hi all,

I wanted to know how to create an appointment for a specific observatory using API call. I referred the opendental document https://www.opendental.com/resources/Op ... -3Spec.pdf use case 3 but still having hard time to find the tables mentioned to fetch the data.

Example:

https://api.opendental.com/fhir/v2/slot ... tatus=free in this api endpoint I am not getting any records but I can see on opendental page that only one appointment is booked for that day. So how can I access all the free slots for a particaular date using this API?

Appreciate all the help!

Thanks and regards,

poonam
Posts: 20
Joined: Mon Aug 24, 2020 1:17 pm

Re: Creating an Appointment through API call

Post by poonam » Fri Aug 28, 2020 9:32 am

Hi all,

Kindly let me know of the above issue, that why I am not getting free slots in my response of https://api.opendental.com/fhir/v2/slot ... tatus=free
The response which is obtained is:
{
"resourceType": "Bundle",
"type": "searchset",
"total": 0,
"entry": []
}

I am guessing all the free slot of date 20200923 should come in entry but it is coming empty set.
Please help with this.

Thanks in advance!

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Creating an Appointment through API call

Post by cmcgehee » Tue Sep 08, 2020 7:21 am

Hi poonam,

When querying for https://api.opendental.com/fhir/v2/slot ... tatus=free, it will return any slots in operatory 1 for the date 2020-09-23. First thing I would check is if you have an operatory where OperatoryNum=1. You can run this user query to check:

Code: Select all

SELECT * FROM operatory WHERE OperatoryNum=1
If that operatory exists, it also needs to have at least 1 provider scheduled in that operatory on that date to return any slots.
Chris McGehee
Open Dental Software
http://www.opendental.com

cthulu
Posts: 10
Joined: Sat Nov 21, 2020 7:04 am

Re: Creating an Appointment through API call

Post by cthulu » Tue Nov 24, 2020 6:15 pm

I am having the exact same issue actually right now. I even assigned the provider to the operatory in question and it still returns an empty set. What am I doing wrong?

Here is my code that I am using:

curl --location --request GET 'https://api.opendental.com/fhir/v2/slot ... 20201020L1' --header 'Authorization: ODFHIR 04KBfUMsB2yXGClp/XOx0ePQSmMIcGhl2' --header 'Accept: application/json'

rochelle
Posts: 17
Joined: Mon Jun 01, 2020 10:29 am

Re: Creating an Appointment through API call

Post by rochelle » Wed Nov 25, 2020 9:13 am

Looking at the structure of our API, the requirements to get slots back requires:
Valid Provider
Valid Operatory (to which Provider is assigned)
Appointments in Status: Complete, Scheduled or Broken
That said, the is a known issue where multiple slots cannot be searched for in the same query. That is being looked into but I do not suspect it is impacting your search ability. I can say, having looked at the query you are sending, that the request appeared to be constructed correctly. I will research on my end as well for other reasons this could be failing.

rochelle
Posts: 17
Joined: Mon Jun 01, 2020 10:29 am

Re: Creating an Appointment through API call

Post by rochelle » Wed Nov 25, 2020 1:01 pm

Actually, another consideration would be if you have a schedule for the provider in that operatory.

cthulu
Posts: 10
Joined: Sat Nov 21, 2020 7:04 am

Re: Creating an Appointment through API call

Post by cthulu » Fri Dec 11, 2020 11:49 am

I looked and saw no provider scheduled. The minute I did that, it worked perfectly. Thank you

Post Reply