Find your FHIR R4 Base URL
Your FHIR R4 Base URL is the address of the health system’s Epic FHIR R4 server. Leave it empty to connect to Epic’s sandbox.
- Find the health system’s address under Production Endpoints in Epic’s endpoint directory, or ask the health system’s Epic team.
- Format:
https://{host}/{path}/api/FHIR/R4, with no trailing slash - Example: if the directory lists
https://fhir.example-health.org/FHIR/api/FHIR/R4/, your FHIR R4 Base URL ishttps://fhir.example-health.org/FHIR/api/FHIR/R4
Host your key set
Your Private Key (PKCS8 PEM) for this account comes from a key pair you create. Epic reads its public key from a JWK Set URL that uses HTTPS, is publicly reachable and needs no sign-in.
Generate the key pair
Run these commands to create a 2048-bit RSA private key, a copy of it in PKCS8 PEM format, and a JSON Web Key Set (JWKS) with its public key.
- Run them once for non-production and again, in another folder, for production. Epic needs a different JWK Set URL for each.
Publish the key set
Host each jwks.json at its own HTTPS address that anyone can open without signing in, such as a public storage bucket or your website.
- Open each address in a private browser window and check that it shows the key set.
Register a Backend Systems app
Your Backend Systems app issues the Client ID you enter for this account and sets which Epic APIs it may call.
Create the app
Sign in to Epic on FHIR and open Build Apps.
- Click Create.
- Application Name:
StackOne - Select Backend Systems as the user type.
Set up OAuth 2.0
Backend Systems apps use OAuth 2.0 to get access tokens.
- Check Use OAuth 2.0.
- App FHIR Version: R4
Add the APIs
Epic grants the app only the APIs you add, and health systems review the list before they activate the app.
- Check Incoming API.
- Under Incoming APIs, add each of these APIs:
- Patient.Search (Demographics) (R4)
- Patient.Read (Demographics) (R4)
- AllergyIntolerance.Search (Patient Chart) (R4)
- AllergyIntolerance.Read (Patient Chart) (R4)
- Condition.Search (Problems) (R4)
- Condition.Read (Problems) (R4)
- Condition.Search (Encounter Diagnosis) (R4)
- Condition.Read (Encounter Diagnosis) (R4)
- Condition.Search (Health Concerns) (R4)
- Condition.Read (Health Concerns) (R4)
- Condition.Search (Medical History) (R4)
- Condition.Read (Medical History) (R4)
- MedicationRequest.Search (Signed Medication Order) (R4)
- MedicationRequest.Read (Signed Medication Order) (R4)
- MedicationAdministration.Search (R4)
- MedicationAdministration.Read (R4)
- Observation.Search (Labs) (R4)
- Observation.Read (Labs) (R4)
- Observation.Search (Vital Signs) (R4)
- Observation.Read (Vital Signs) (R4)
- Observation.Search (Social History) (R4)
- Observation.Read (Social History) (R4)
- Observation.Search (Flowsheets) (R4)
- Observation.Read (Flowsheets) (R4)
- DiagnosticReport.Search (Results) (R4)
- DiagnosticReport.Read (Results) (R4)
- Binary.Read (Labs) (R4)
- Binary.Read (Radiology Results) (R4)
- Procedure.Search (Orders) (R4)
- Procedure.Read (Orders) (R4)
- Procedure.Search (Surgeries) (R4)
- Procedure.Read (Surgeries) (R4)
- Immunization.Search (Patient Chart) (R4)
- Immunization.Read (Patient Chart) (R4)
- Encounter.Search (Patient Chart) (R4)
- Encounter.Read (Patient Chart) (R4)
- Appointment.Search (Appointments) (R4)
- Appointment.Read (Appointments) (R4)
- DocumentReference.Search (Clinical Notes) (R4)
- DocumentReference.Read (Clinical Notes) (R4)
- Binary.Read (Clinical Notes) (R4)
- ServiceRequest.Search (Orders) (R4)
- ServiceRequest.Read (Orders) (R4)
- Coverage.Search (Patient Insurance Information) (R4)
- Coverage.Read (Patient Insurance Information) (R4)
- Practitioner.Search (Organizational Directory) (R4)
- Practitioner.Read (Organizational Directory) (R4)
- CarePlan.Search (Longitudinal) (R4)
- CarePlan.Read (Longitudinal) (R4)
- CarePlan.Search (Encounter) (R4)
- CarePlan.Read (Encounter) (R4)
- CarePlan.Search (Outpatient) (R4)
- CarePlan.Read (Outpatient) (R4)
- CareTeam.Search (Longitudinal CareTeam) (R4)
- CareTeam.Read (Longitudinal CareTeam) (R4)
- Goal.Search (Patient) (R4)
- Goal.Read (Patient) (R4)
- Device.Search (Implants) (R4)
- Device.Read (Implants) (R4)
- FamilyMemberHistory.Search (R4)
- FamilyMemberHistory.Read (R4)
- ExplanationOfBenefit.Search (Claim) (R4)
- ExplanationOfBenefit.Read (Claim) (R4)
- QuestionnaireResponse.Search (Patient-Entered Questionnaires) (R4)
- QuestionnaireResponse.Read (Patient-Entered Questionnaires) (R4)
- AllergyIntolerance.Create (Patient Chart) (R4)
- Condition.Create (Problems) (R4)
- DocumentReference.Create (Clinical Notes) (R4)
- Observation.Create (Vital Signs) (R4)
- Observation.Create (Flowsheets) (R4)
- Patient.summary (International Patient Summary) (R4)
- Appointment.book (STU3)
- Bulk Data Kick-off
- Bulk Data Status Request
- Bulk Data File Request
- Bulk Data Delete Request
Add the JWK Set URLs
Epic prompts for a non-production and a production JWK Set URL.
- Non-production JWK Set URL: the address of your non-production
jwks.json. - Production JWK Set URL: the address of your production
jwks.json. - Click Save.
- Note: Epic syncs a new app to its sandbox within about an hour.
Set the app ready for production
A health system can request the app only after you mark it ready for production. Epic’s sandbox skips this step.
- On Build Apps, select the app.
- Check the box to accept the Terms and Conditions.
- Click Save and Ready for Production. Epic locks the API list from then on.
- Give the health system your Production Client ID so they can request the app.
Activate the app for a health system
Activate the app once the health system’s request arrives.
- Click Review and Manage Downloads for the app.
- Select the environment type, non-production before production.
- Select the JWK Set URL option. Epic uses the key set address you gave for that environment.
- Click Activate.
Copy the credentials
Use the client ID and key file for the environment you are connecting. Copy the whole key file, including its BEGIN and END lines.
- Sandbox: Copy the Non-Production Client ID across. Copy the whole non-production
privatekey.p8across to Private Key (PKCS8 PEM). - Production: Copy the Production Client ID across. Copy the whole production
privatekey.p8across to Private Key (PKCS8 PEM).
Link the Account
Connect
- Click Connect.
- If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
- Once authorization is successful, you will see a confirmation popup.
Use Actions