Need help? Contact us:
...
The Epic FHIR adapter is designed to provide a template for getting started with Epic FHIR integrations, including:
Authenticating with the Epic FHIR Server via OAuth2.0 using the OAUTH Library. Generating FHIR Resources using the FHIR Library. (JWT)
Performing various interactions against the Epic FHIR Server including create, read, search, and extended $operations.
...
Expand | ||
---|---|---|
| ||
Enter the ClientId and PrivateKey certificate path. 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. store the returned access token and expiry time in an encrypted file for use on subsequent API requests. |
Expand | ||
---|---|---|
| ||
The FHIRresources.lua file included in the project contains the schema for a FHIR R4 Patient and Appointment resource. This file can be replaced with the schemas you require. See FHIR Profiling Tool for how to generate the FHIRresources.lua file containing the FHIR resource schemas you need to create. |
Expand | |||||
---|---|---|---|---|---|
| |||||
Using the FHIR Library, FHIRCreate generates an empty FHIR Resource for you to map.
|
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Use the provided SamplePatient.json to load a FHIR patient resource. Alternatively, you can explore the FHIR Profiling Tool to generate a template resource you can use to populate with data of your own.
Set live=true to invoke each the creation interaction.
View the resultant patient search in the Annotations: |
...
Expand | ||
---|---|---|
| ||
Sets up the EPIC FHIR adapter framework, adding the various method modules to a metatable and storing the configurations added to the custom fields. |
Expand | ||
---|---|---|
| ||
EPICcustom takes in any API requests and parameters to make the API call and return the response.
|
Expand | ||
---|---|---|
| ||
The EPICFHIRauth function , builds and makes the HTTP POST token request to obtain the access token required for any resource requests against the FHIR Server. A separate CreateJWT EPICFHIRcreateJWT function creates the JSON Header and Payload components of the JWT and calls the OAUTH Library EPICFHIRjwt to sign and return the JWT required for the token request. If the token requests is successful (HTTP 200 response), the token and token expiry returned are set to the Key and KeyExpiry custom fields respectivelystored in the adapter object (key and key_expiry) and saved in an encrypted file via EPICFHIRencrypt. |
Expand | ||||
---|---|---|---|---|
|
| |||
EPICFHIRencrypt provides localized https://interfaceware.atlassian.net/wiki/x/EQCeqg functionality via save and load functions that encrypt and decrypt the provided API token and expiry time in an external file. This allows the token to be reused for subsequent API calls. |
Expand | ||
---|---|---|
| ||
EPICFHIRjwt provides localized OAUTH Library functionality. It takes the provided JWT header, JWT payload, signing algorithm, and private key to generate and sign the JWT token. |
Expand | ||
---|---|---|
| ||
EPICFHIRcreate prepares the arguments and calls EPICFHIRcustom for an FHIR Resource Create HTTP POST request. |
Expand | ||
---|---|---|
| ||
EPICFHIRsearch prepares the arguments and calls EPICFHIRcustom for an FHIR Resource Search HTTP GET request. |
Expand | ||
---|---|---|
| ||
EPICFHIRreadResource prepares the API endpoint and arguments to call EPICFHIRcustom for an FHIR Resource Read HTTP GET request. |
Expand | ||
---|---|---|
| ||
EPICFHIRoperation prepares the arguments and calls EPICFHIRcustom for an FHIR Resource Create HTTP GET or POST request. A FHIR operation is extended functionality unique across FHIR Servers. Extended operations on a resource use a $ in front of the operation. For example, when calling EPICFHIRcustom, the passed api argument may be “Patient/$match“ to perform a more detailed patient matching search. |