Need help? Contact us:
The Epic FHIR adapter is designed to provide a template for getting started with Epic FHIR integrations. It leverages the EPICFHIR Library to:
Authenticate with the Epic FHIR Server via OAuth2.0 (JWT)
Perform various interactions against the Epic FHIR Server including create, read, search, and extended $operations.
This component can be customized and adapted according to your workflow needs.
How to use it:
STEP 1: Login or sign up for Epic On FHIR to access the Testing Sandbox and create a Client App called "Iguana"
Refer to Set up your Epic FHIR Sandbox for the sign up process, creating and client and gathering the authentication details needed for the Epic FHIR Adapter.
STEP 2: Import the Epic FHIR Adapter component in Iguana
See Create a Component if this is your first time!
STEP 3: Configure the ClientId and PrivateKey custom fields and click Edit to open the Translator
Enter the ClientId and PrivateKey certificate path.
Using the information provided, the component will run through the authentication workflow and store the returned access token and expiry time in an encrypted file for use on subsequent API requests.
STEP 4: View and modify the examples for creating and searching for a patient on the Epic FHIR Server
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.
-- Load a sample patient
local F = io.open(iguana.projectRoot()..'SamplePatient.json','rb')
local RawPatient = F:read("*a")
F:close()
local NewPatient = json.parse{data=RawPatient}
Set live=true to invoke the creation interaction.
-- Create the new patient
E:create{resource="Patient",parameters=NewPatient,live=true}
-- Search for our patient
local Search = {
family = 'Lufhir',
given = 'Sakiko',
birthdate = '1994-07-22'
}
local Status, R = E:search{resource="Patient",parameters=Search,live=true}
View the resultant patient search in the Annotations: