Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Need help? Contact us:

 

 

The Athenahealth adapter is designed to provide a template for getting started with Athenahealth API integrations, including:

  1. Authenticating with the Athenahealth API Server via OAuth2.0

  2. Demo AthenaOne APIs Integration: searchPatient and createPatient

  3. Demo FHIR APIs Integration: searchPatientsFhir

This component can be customized and adapted according to your workflow needs.

How to use it:

 STEP 1: Login or sign up for Athenahealth Developer Portal to access the Testing Sandbox and create a Client App called "IguanaXApp"

Refer to Setup Athenahealth Sandbox for the sign up process, creating and client and gathering the authentication details needed for the Athenahealth Adapter.

 STEP 2: Import the Athenhealth Adapter component in Iguana

See Create a Component if this is your first time!

image-20240410-152821.png

 STEP 3: Double click on this component and edit the required component configurations

Manual Populated Configurations

  • ClientId: the Athenahealth application client ID

  • ClientSecret: the Athenahealth application client secret

  • Scopes: the space-delimited string that lists the scopes of access that the application has, e.g. athena/service/Athenanet.MDP.* system/Patient.read

  • Prod: boolean value to indicate whether to use the Preview or Production AthenaHealth environment

  • PracticeId: AthenaHealth practice ID. By default, this will contain the sandbox practice ID.

You can get ClientId, Client Secret, and Scopes from App Setup: Setup Athenahealth Sandbox

System Auth Configurations

  • Using the information provided, the component will run through the authentication workflow and set the Key and KeyExpiry value of the obtained access token automatically.

image-20240410-154205.png

 STEP 4: Start Component to Run Athenahealth Adapter Components and Populate System Configurations

Auto Populate Key and KeyExpiry

image-20240410-154205.png

Check Patient in Sandbox

You can verify Patient results in Athenahealth sandbox How to use Athenahealth Sandbox or open Component translator to check if your Iguana X adapter can successfully interact with Athenahealth Adapter

image-20240410-160350.png

How the ATHENA Library works:

 ATHENAclient - sets up the adapter framework

Sets up the ATHENA adapter framework, adding the various method modules to a metatable and storing the configurations added to the custom fields.

 ATHENAauth - authenticates with the Athenahealth server

The ATHENAauth function builds and makes the HTTP POST token request to obtain the access token required for interacting with the AthenaHealth API.

If the token request is successful (HTTP 200 response), the token and token expiry returned are set to the Key and KeyExpiry custom fields respectively.

 ATHENAcustom - makes API requests and returns the response

ATHENAcustom takes in any API requests and parameters to make the API call and return the response.

  • First the function checks if the token Key exists or if the KeyExpiry time has passed and performs the OAuth2.0 authentication workflow to obtain the token to be used in subsequent requests.

  • Uses the passed configurations API request parameters - the method (ex. post), API (ex. v1/1128700/patients), headers (ex. Content-Type), and parameters for the call (ex. the patient details to be created) - to build and carry out the appropriate HTTP request.

 ATHENAcreatePatient - prepares arguments for ATHENAcustom to create a patient

ATHENAcreatePatient prepares the arguments, including populating the path parameters (ex. practice ID) in the API string and loading the required header. It then calls ATHENAcustom to create a patient in Athenahealth via HTTP POST request.

 ATHENAsearchPatients - prepares arguments for ATHENAcustom to search for a patient based on the provided query parameters

ATHENAsearchPatients prepares the arguments, including populating the path parameters (ex. practice ID) in the API string. It then calls ATHENAcustom to search for a patient in Athenahealth.

 ATHENAsearchPatientsFhir - prepares arguments for ATHENAcustom to search for a FHIR patient based on the provided query parameters

ATHENAsearchPatientsFhir prepares the arguments, including the FHIR-specific API string, and calls ATHENAcustom to search for a FHIR patient in Athenahealth.

  • No labels