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

Our queries on Integration with Athena Health Centricity #239

Closed ahsankcg closed 1 year ago

ahsankcg commented 2 years ago

Hi, We need to build an interface with Athena Health Centricity APIs for the following Resources:

We have figured out almost most of these resources APIs and their uses but we have few queries which are blocking our progress with integration:

Please help us resolve these issues so that we can move forward with our integration.

Thank You

AjeetYadav07 commented 2 years ago

@ahsankcg To support read and write operation correct scope is openid%20profile%20patient/.%20launch/patient%20offline_access or openid%20profile%20user/.%20launch/patient%20offline_access. Slot is a FHIR resource implemented in hl7 which is used to create some slot based on provider scheduled. currently we are not supporting Write operation for Slot. Github 217 Github 225

ahsankcg commented 2 years ago

@AjeetYadav07 Hi Thanks for your response ! I am getting this by using both of the scopes you recommended image

AjeetYadav07 commented 2 years ago

@ahsankcg Below are defined scopes in authorization request :

Read only access of APIs in user scope : openid%20profile%20user/.read%20launch/patient Write only access of APIs in user scope : openid%20profile%20user/.write%20launch/patient

Read only access of APIs in Patient workflow scope : openid%20profile%20patient/.read%20launch/patient Write only access of APIs in patient workflow scope : openid%20profile%20patient/.write%20launch/patient

offline_access in scope param value is used to generate refresh token. Refresh token is used when the requirement is to continuous hit of APIs more than one hours. Access token is valid for 60 min only. detail discussion added in Github 173 Github 176

ahsankcg commented 2 years ago

@AjeetYadav07 Hi Thanks again for your response really appreciate. I think the correct scope that will fulfill our requirements is openid%20profile%20user/*.*%20launch/patient%20offline_access. I have successfully generated access token with it. Also yes we need offline_access to ensure continuous integration.

AjeetYadav07 commented 2 years ago

Hi @ahsankcg Yes, scope openid%20profile%20user/*.*%20launch/patient%20offline_access will provide permission to read and write for all APIs.

Torin-Shepard-athena commented 2 years ago

@ahsankcg

The latest comment at end of issue #140 mentions there is a new operation that can be used to get appointment types that can be scheduled for a given practitioner.

Example: https://ap22sandbox.fhirapi.athenahealth.com/demoAPIServer/fhir/r4/Appointment/$lookup-type?practitioner=1588761792000070 This outputs a Parameters resource with parameters array with appointment types. Parameters.parameter[i].valueCodeableConcept.coding.code is the internal appointment type id value.

Appointment resource has another operation that will return a list of practitioners that can be scheduled for a given appointment type id.

Example: https://ap22sandbox.fhirapi.athenahealth.com/demoAPIServer/fhir/r4/Appointment/$lookup-practitioner?type=7 This outputs a Parameters resource with parameters array with references to practitioners.

AjeetYadav07 commented 1 year ago

Closing this issue, please raise new tickets for any queries.