Another Duplicate Slots question

70 views
Skip to first unread message
Assigned to mphil...@gmail.com by me

Mark Butler

unread,
Mar 25, 2019, 4:40:48 PM3/25/19
to Cerner FHIR Developers
Hello there my FHIR Friends. I's got a question.

Simple project of seeing today's open slots for a practitioner. I'm searching for the slot's of a given practitioner and getting two for a given time. I'm guessing it's supposed to be like that but I can't figure out why given my limited intelligence and patience allotments for today. The query information is below. Also, I may have mixed up the Slot Id with the Schedule Id.

Practitioner Id: 2578010
11:00 AM Slot Id #1: 21265426-4048128-7688501-300
11:00 AM Slot Id #2: 21265426-633867-7688501-300 


Thanks,

MArk B.
P.S. While we're at it, how about someone suggest which one I should keep and which I should filter out?

Max Philips (Cerner)

unread,
Mar 25, 2019, 4:49:26 PM3/25/19
to Cerner FHIR Developers
Hi Mark,

The first Slot you mentioned is available at Location 4048128, and the second is available at Location 633867. You can check this by comparing Slot.extension[].valueReference.reference.

It looks like you could add Location as a query parameter, or you could filter the results by whichever Location you want to schedule at.

Thanks,
Max (Cerner)

Mark Butler

unread,
Mar 25, 2019, 6:20:38 PM3/25/19
to Cerner FHIR Developers
So, this provider actually has open slots at two different locations at the same time? Is this normal?
MArk B.

Benjamin Eichhorn (Cerner)

unread,
Mar 26, 2019, 10:13:53 AM3/26/19
to Cerner FHIR Developers
Hi Mark,

This is configurable per client and it may appear in a clients domain. If we were to schedule an Appointment for Slot #1 (21265426-4048128-7688501-300) with the following request:

curl -X POST \
  -H 'Accept: application/json+fhir' \
  -H 'Authorization: Bearer token' \
  -H 'Content-Type: application/json+fhir' \
  -H 'Postman-Token: 8057f5c2-2cc1-4302-ad8a-e8c29e25415a' \
  -H 'cache-control: no-cache' \
  -d '{
  "resourceType": "Appointment",
  "slot": {
    "reference": "Slot/21265426-4048128-7688501-300"
  },
  "participant": [
    {
      "actor": {
        "reference": "Patient/4704007",
        "display": "Smart, Barney R"
      },
      "status": "needs-action"
    }
  ],
  "status": "proposed"
}'

An Appointment is created for that slot. (In this example it is located at https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Appointment/4425746)

If we make a call to both Slot #1 (21265426-4048128-7688501-300) and Slot #2 (21265426-633867-7688501-300) and look at the Slot.freeBusyType field, we should see:

    "freeBusyType": "busy",

for both Slots.

Attempting to schedule an appointment at this point for Slot #1 or Slot #2 we should receive back a 422, which we do. If I go ahead and cancel that created appointment with the following request:


curl -X PUT \
  -H 'Accept: application/json+fhir' \
  -H 'Authorization: Bearer token' \
  -H 'Content-Type: application/json+fhir' \
  -H 'If-Match: W/"0"' \
  -H 'Postman-Token: 3810522e-8a59-4591-8caa-51b5539484d2' \
  -H 'cache-control: no-cache' \
  -d '{
  "resourceType": "Appointment",
  "id": "4425746",
  "participant": [
    {
      "actor": {
        "reference": "Patient/4704007",
        "display": "Smart, Barney R"
      },
      "status": "accepted"
    }
  ],
  "status": "cancelled"
}'

Then the Slot.freeBusyType field should be the following for both Slots:

    "freeBusyType": "free",

In testing, it is. 

Hopefully this clears up confusion on your end.

Thanks,
Ben (Cerner)

Mark Butler

unread,
Mar 29, 2019, 1:35:53 PM3/29/19
to Cerner FHIR Developers
Thanks for the explanation. The powers that be are never going to give us access to write back to the system but it's nice to know that there a places where developers are treated as adults.
Reply all
Reply to author
Forward
0 new messages