athenahealth / apiserver-athenaFlex

Software developers can use sample code and documentation to use athenahealth's athenaPractice/athenaFlow FHIR API Server.
https://mydata.athenahealth.com/home
17 stars 7 forks source link

Correct way to cancel an appointment #294

Closed schlueterryan closed 4 months ago

schlueterryan commented 7 months ago

I want to verify that I am cancelling appointments correctly. It looks like my slot is still showing as held even after cancelling the appointment.

I am doing a Put Request changing the status of the appointment to cancelled. Is there anything else I need to do there?

kdevine commented 7 months ago

They reference that this was fixed in v22, but it appears to still be broken. Reference Issue 194.

schlueterryan commented 6 months ago

@AjeetYadav07 I think this might be the more important one to focus on and might be causing more issues with the creating in different slots. Is there anything we can try to get the cancel to work? It is failing to release the slot on every request.

AjeetYadav07 commented 6 months ago

@schlueterryan,

We offer two ways to cancel your appointment: with or without requesting an extension.

Please take a look at the cancel appointments payload provided below.

Once you've successfully canceled the appointment, be sure to log out completely from the CPS client application, refresh the slot availability on the chart screen. This will ensure that the canceled slot is released and becomes available for booking again.

appt_with_ext.txt appt_wothout_ext.txt

schlueterryan commented 6 months ago

I did have mine setup as your second example, I just tried the first example and it's still not releasing the slot.

The APPOINTMENT shows a status of Canceled but the SLOT is still busy - Occupied by an appointment

Here is how its still showing the slot having the appointmentId in the database:

unnamed (1) unnamed (2)

schlueterryan commented 6 months ago

According to the Metadata endpoint we are on version - 1.23.5095 that should be up to date enough to not be running into this issue correct?

https://github.com/athenahealth/apiserver-athenaFlex/issues/194#issuecomment-1034149915

AjeetYadav07 commented 6 months ago

@schlueterryan,

When appointment shows a status of Canceled, it will remove the entry from apptslot table for corresponding appointmentsId like in below.

image
schlueterryan commented 6 months ago

@AjeetYadav07 That's the problem it's not removing that entry. As you can see in my posted image its not removing that row even though it's showing Cancel/Patient. Is there anything we can change on this side to make sure it removes the slot from the appointment?

rashmi1977 commented 6 months ago

This issue is addressed in upcoming release which is V25 which will be available for customers during first quarter of 2025.

schlueterryan commented 6 months ago

@rashmi1977 is there any known workarounds or is it just broken for the next year?

rashmi1977 commented 6 months ago

@schlueterryan : We need to manually delete the booking in the ApptSlot table in DB in so that the slot is released for further booking. After deleting the record we need to restart JBoss.We have verified this workflow and have seen that once the Appointment is deleted the slot is released in UI. As of now we have this workaround but this issue has been addressed in V25 release.

deepaktiwari29 commented 4 months ago

Hello @schlueterryan, hoping we have answered your question. Marking this issue as closed, if you have any further questions, please open a new ticket.