How to Develop a Patient Facing App for Epic EMR

Raja Kushwah
3 min readSep 11, 2021

The Patient Facing app allows patients to browse their clinical information from EHR.

EHR (Electronic Health Record)- This is a digital record of health information.

FHIR (Fast Healthcare Interoperability Resources)- This is an HL7 specification for easy exchange of digital data across the healthcare ecosystem.

Steps

  1. Register an app with epic
  2. Integrate the app with smart FHIR client

Register an App

1. Go to https://fhir.epic.com/

2. Click on signup and complete the registration process.

Note -It is recommended that you provide a business email address with your company’s domain.

Register

3. Go to Build Apps and click on create the app.

4. Enter Following Information –

a) App name

b) Select Patients in the application audience

c) Select following API’s → Patient.read (R4) Patient.search (R4) Observation.read (Labs) (R4) Observation.search (Labs) (R4)

d) Redirect Uri = Provide the URL path where the app is deployed.

App Configuration

**RedirectUri -This is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token. You can provide multiple redirect URI but only secured redirect URIs can be used in production. Please provide at least one HTTPS redirect URI (required before this app can be marked ready for production)

5. Click Save and note the non-production client id.

Now your app is successfully registered on the epic server.

Integrate App with smart FHIR Client

Smart Fhir Client is the application that uses SMART on FHIR JavaScript Library to interact with the smart FHIR Servers.

  1. Sign up for https://github.com/ and download the code from https://github.com/rajakushwah1/epicpatientapp
  2. Open launch.html and replace the client_id with your client id and redirect_uri which should be directed to the page app.html

**Note -The redirect_uri entered here should match with one of the URI provided in step 4.d

3. Now your app is configured successfully. Please deploy the code to your server and enjoy..!!

This is the homepage (index.html) Click on the URL to redirect.

4. Click on logout and login with username: fhircamila and password: epicepic1 (all information about sandbox login at https://fhir.epic.com/Documentation?docId=testpatients )

Authorizing the request
Sign-In
Grant Access
Result

*** By default you will get the observations of a patient in a result. If you want to retrieve some other information you can change the request in code at app.html

***If you see this: you have to wait for the client_id to register

--

--