API to update appointment status
API to update appointment status
Hello,
I need a small help regarding updating Appointment status to confirmed/cancelled etc using API.
I do have appointment ID.
Can any one provide me sample request to do it?
Much appreciated.
Thanks,
Arpit
I need a small help regarding updating Appointment status to confirmed/cancelled etc using API.
I do have appointment ID.
Can any one provide me sample request to do it?
Much appreciated.
Thanks,
Arpit
Re: API to update appointment status
When you GET an appointment, you will see there is a participant where the actor is a patient. One of the fields on the participant object is "status". This will be "needsaction" when the patient has not confirmed the appointment and will be "accepted" once the patient has confirmed. You can send a PUT request to change the status to accepted. Keep in mind that you have to include all other fields in your request so that don't inadvertently change a different field. Here is an example PUT request to change an appointment to confirmed:
To indicate that a patient will not show up for their appointment, set the "status" on the Appointment resource to "noshow". This will display as a broken appointment within Open Dental. Here's an example:
Code: Select all
{
"resourceType": "Appointment",
"status": "booked",
"priority": 1,
"description": "CmpEx",
"start": "2020-03-20T14:20:00",
"end": "2020-03-20T15:00:00",
"minutesDuration": 40,
"participant": [{
"type": [{
"coding": [{
"system": "http://hl7.org/fhir/participant-type",
"code": "PART",
"display": "Participation"
}
]
}
],
"actor": {
"reference": "patient/149",
"display": "Hannah Abbott"
},
"required": "required",
"status": "accepted"
}, {
"type": [{
"coding": [{
"system": "http://hl7.org/fhir/participant-type",
"code": "PPRF",
"display": "primary performer"
}
]
}
],
"actor": {
"reference": "practitioner/1",
"display": "Madame Pomprey, DMD"
},
"required": "required",
"status": "accepted"
}, {
"type": [{
"coding": [{
"system": "http://hl7.org/fhir/participant-type",
"code": "PART",
"display": "Participation"
}
]
}
],
"actor": {
"reference": "location/3",
"display": "OP-3"
},
"required": "required",
"status": "accepted"
}
],
"basedOn": [{
"reference": "servicerequest/7854856268706751589",
"display": "CmpEx"
}
]
}
Code: Select all
{
"resourceType": "Appointment",
"status": "noshow",
"priority": 1,
"description": "CmpEx",
"start": "2020-03-20T14:20:00",
"end": "2020-03-20T15:00:00",
"minutesDuration": 40,
"participant": [{
"type": [{
"coding": [{
"system": "http://hl7.org/fhir/participant-type",
"code": "PART",
"display": "Participation"
}
]
}
],
"actor": {
"reference": "patient/149",
"display": "Hannah Abbott"
},
"required": "required",
"status": "accepted"
}, {
"type": [{
"coding": [{
"system": "http://hl7.org/fhir/participant-type",
"code": "PPRF",
"display": "primary performer"
}
]
}
],
"actor": {
"reference": "practitioner/1",
"display": "Madame Pomprey, DMD"
},
"required": "required",
"status": "accepted"
}, {
"type": [{
"coding": [{
"system": "http://hl7.org/fhir/participant-type",
"code": "PART",
"display": "Participation"
}
]
}
],
"actor": {
"reference": "location/3",
"display": "OP-3"
},
"required": "required",
"status": "accepted"
}
],
"basedOn": [{
"reference": "servicerequest/7854856268706751589",
"display": "CmpEx"
}
]
}
Re: API to update appointment status
Hi,
I am trying to cancel the appointment through API call but it gives server error.
I am using following body-code with PUT request for updating the appointment status.
The response for the same is
On the other hand, when I am trying status from the below list:
proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist
Only booked and no-show works.
So please let me know how to change status from booked to cancelled through API?
Thanks in Advance!
I am trying to cancel the appointment through API call but it gives server error.
I am using following body-code with PUT request for updating the appointment status.
Code: Select all
{
"status": "cancelled",
"priority": 5,
"description": "Flo",
"start": "2020-09-15T16:00:00",
"end": "2020-09-15T16:45:00",
"minutesDuration": 45,
"participant": [
{
"type": [
{
"coding": [
{
"system": "http://hl7.org/fhir/participant-type",
"code": "PART",
"display": "Participation"
}
]
}
],
"actor": {
"reference": "patient/13",
"display": "test"
},
"required": "required",
"status": "needsaction"
},
{
"type": [
{
"coding": [
{
"system": "http://hl7.org/fhir/participant-type",
"code": "PPRF",
"display": "primary performer"
}
]
}
],
"actor": {
"reference": "practitioner/3",
"display": "Practitioner"
},
"required": "required",
"status": "accepted"
},
{
"type": [
{
"coding": [
{
"system": "http://hl7.org/fhir/participant-type",
"code": "PART",
"display": "Participation"
}
]
}
],
"actor": {
"reference": "location/1",
"display": "OP-1"
},
"required": "required",
"status": "accepted"
}
],
"basedOn": [
{
"reference": "servicerequest/40"
}
],
"reasonReference": []
}
Code: Select all
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "exception",
"details": {
"text": "The server has encountered an error."
}
}
]
}
proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist
Only booked and no-show works.
So please let me know how to change status from booked to cancelled through API?
Thanks in Advance!
Re: API to update appointment status
We've committed the fix for this error. It will be available in 20.2.44 and 20.3.27. We still might have some more work to do after this because we noticed that when using the status "cancelled" it will give the appointment a status of "noshow".
Re: API to update appointment status
Hi Chris,
Thank you for your response and we will update the opendental once next version will be released. Also can you help me with finding free slots from multiple operatory in single API call?
For example,
https://api.opendental.com/fhir/v2/slot ... tatus=free
here, we get free slots from operatory 1 and in the same api call if we want free slots from operatory 2 and 3 as well then how to define the condition in API header.
Appreciate your help and time with this!
Sincerely,
Poonam
Thank you for your response and we will update the opendental once next version will be released. Also can you help me with finding free slots from multiple operatory in single API call?
For example,
https://api.opendental.com/fhir/v2/slot ... tatus=free
here, we get free slots from operatory 1 and in the same api call if we want free slots from operatory 2 and 3 as well then how to define the condition in API header.
Appreciate your help and time with this!
Sincerely,
Poonam
Re: API to update appointment status
Poonam,
You should be able to use commas to include multiple schedules to get slots for multiple operatories in one request. For example:
You should be able to use commas to include multiple schedules to get slots for multiple operatories in one request. For example:
Code: Select all
https://api.opendental.com/fhir/v2/slot?schedule=20200921L1,20200921L2,20200921L3&status=free
Re: API to update appointment status
Hi Chris,
Thank you for your reply!
I tried using comma but I am getting response for only last schedule given in the parameters list.
For eg,
For the above request I am getting response only for schedule 20200921L3.
Appreciate your time!
Sincerely,
Poonam
Thank you for your reply!
I tried using comma but I am getting response for only last schedule given in the parameters list.
For eg,
Code: Select all
https://api.opendental.com/fhir/v2/slot?schedule=20200921L1,20200921L2,20200921L3&status=free
Appreciate your time!
Sincerely,
Poonam
Re: API to update appointment status
Would you mind telling me the version of Open Dental the database is on that you are sending requests to? In 20.2.29 we fixed an issue that had to do with Slots.
Re: API to update appointment status
Hi Chris,
The version of opendental that we are using is 20.2.40.0 which was last updated on 09/10/20.
Thanks and regards,
Poonam
The version of opendental that we are using is 20.2.40.0 which was last updated on 09/10/20.
Thanks and regards,
Poonam
Re: API to update appointment status
Thanks, I'll have one of our engineers look into this issue.
Re: API to update appointment status
Hi Chris,
Any update on passing multiple schedule?
Thanks,
Any update on passing multiple schedule?
Thanks,
Re: API to update appointment status
Poonam,
I apologize for the delay in getting back to you. I have investigate this and you are correct, presently we only return the slots for 1 schedule. I will be creating a fix for this and will update this thread the moment it is live.
I apologize for the delay in getting back to you. I have investigate this and you are correct, presently we only return the slots for 1 schedule. I will be creating a fix for this and will update this thread the moment it is live.
Re: API to update appointment status
Thank you for your reply!
Hope to receive the update soon on this.
Thanks,
Poonam
Hope to receive the update soon on this.
Thanks,
Poonam
Re: API to update appointment status
This problem should be fixed now, please let me know if you have further concerns.
Re: API to update appointment status
Hi,
I am trying to get all the free slots for all the operatories of a particular day using
But, I am getting for only 20201230L3 so just wanted to check am I using right endpoint with multiple parameters?
Please suggest!
Thanks and regards,
Poonam
I am trying to get all the free slots for all the operatories of a particular day using
Code: Select all
https://api.opendental.com/fhir/v2/slot?schedule=20201230L2,20201230L1,20201230L3&status=free
Please suggest!
Thanks and regards,
Poonam
Re: API to update appointment status
Your request looks good to me. When I test this on my side, I return both operatories. This makes me curious if there is a schedule for the other locations in your request for the given day? or that maybe those operatories do not have providers? It's hard to say without seeing your set up but I can say that testing it on my side with a day that had completely open schedules in multiple operatories, which had providers attached to them, did return all the locations. If this is not helpful, I may request calling in to see what your setup is like and if we can help you more directly.
Re: API to update appointment status
Hi,
Thank you for your response!
If I check the above operatory individually then I get free slot for each of them. So schedules are open I assume, but if you want to see the set up then let me know the best way to connect.
Thank you again!
Thank you for your response!
If I check the above operatory individually then I get free slot for each of them. So schedules are open I assume, but if you want to see the set up then let me know the best way to connect.
Thank you again!
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: API to update appointment status
I don't like the logic in the FHIR API for this. It assumes that you have attached a schedule to an operatory, which is not how most users do it. Usually, you attach a schedule to a provider and then a provider to an operatory. So the FHIR API will miss those. The new non-FHIR API will get it right so that it always matches what you see in the Appointments module.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: API to update appointment status
Hi,
Can we connect your technical team to know about getting the free slots for a week time in one API call?
Thanks and regards,
Poonam
Can we connect your technical team to know about getting the free slots for a week time in one API call?
Thanks and regards,
Poonam
Last edited by poonam on Mon Jun 28, 2021 4:13 pm, edited 1 time in total.
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: API to update appointment status
I will answer this over in the API forum.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com