FHIR use-case appointments for date

This forum is for programmers who have questions about the source code.

FHIR use-case appointments for date

Postby bravegag » Thu Jun 06, 2019 4:48 am

Hello,

I'm new to OD (Open Dental) and have a few questions related to the "Appointments for date" use-case. I'm following what's described here https://www.opendental.com/resources/Op ... -1Spec.pdf in page 13.

In my OD demo development install I can see (snapshot below) several bookings for tomorrow with date 2019-06-07. But when I query the FHIR API for that date using all organizations and locations I get no bookings i.e. this is my request sequence:
Code: Select all
https://api.opendental.com/fhir/organization?name=Relaxation%20Dental
https://api.opendental.com/fhir/location?organization=organization/0
https://api.opendental.com/fhir/appointment?location=1,2,3,4,5,6&date=2019-06-07&status=booked

The first two steps return valid non-empty results while in the last the returned results are empty:
Code: Select all
{"type":"searchset","total":0,"entry":[]}

Why is it giving empty results? I expected to see the existing bookings for Dr. Brian Albert and others.

Additional questions for this use-case:
* Why some times the GET parameter value has the form `organization/0` and for location `1,2,3,etc`? I suspected a mistake in the document and tried with `location/1,location/2,location/3` too but didn't work either.
* Can this same use-case be used for querying appointment bookings in a dates interval, dates range or are there separate APIs for that?

TIA,
Best regards,
Giovanni

Image
bravegag
 
Posts: 49
Joined: Fri May 24, 2019 3:37 pm

Re: FHIR use-case appointments for date

Postby cmcgehee » Thu Jun 06, 2019 8:34 am

In your snapshot, there are no appointments scheduled. What you are seeing is times where the provider is scheduled to work in an operatory.

bravegag wrote:* Why some times the GET parameter value has the form `organization/0` and for location `1,2,3,etc`? I suspected a mistake in the document and tried with `location/1,location/2,location/3` too but didn't work either.


This is how the FHIR specification describes search parameter formatting. It will work the same to use "organization=0" or "organization=organization/0". The only time you would need to format it like the latter is if a search parameter can accept different types of resources and you need to specify which resource to search for.

bravegag wrote:* Can this same use-case be used for querying appointment bookings in a dates interval, dates range or are there separate APIs for that?

Yes, you can leave off the day or month in the date parameter:
"date=2019" searches all dates in the year 2019.
"date=2019-06" searches all dates in June 2019.

You can also use prefixes to indicate greater than or less than:
"date=ge2019-06-01&date=le2019-07-31" will search all dates in June and July of 2019.

You can find more details on searching with dates on https://www.hl7.org/fhir/search.html#date.
Chris McGehee
Open Dental Software
http://www.opendental.com
User avatar
cmcgehee
 
Posts: 602
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: FHIR use-case appointments for date

Postby bravegag » Thu Jun 06, 2019 9:07 am

Hi Chris,

Cool! Thanks a lot for your support! it works now :)

Best regards,
Giovanni
bravegag
 
Posts: 49
Joined: Fri May 24, 2019 3:37 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 5 guests