PatientPowerbeyondmychart.com 🏠 Home
Dev / TestSecure · OAuthPHISCAFFOLD

Epic — Clinical Records (SMART on FHIR)

Pull your prescriptions, lab values & diagnoses from your Epic health system into PatientPower (with your consent).
⏳ Checking configuration…

Connect

In production, this list is populated from Epic's endpoint directory — the member searches and picks their health system (Kaiser, Mayo, Cleveland Clinic, …); each org has its own FHIR base URL. The sandbox entry here is Epic's shared public test server.
You'll be sent to your health system to log in and consent, then returned to /epic-callback.html which imports your clinical records.

What this is

Epic is the clinical chart behind most large U.S. health systems (the "MyChart" backend). Its SMART-on-FHIR patient-access API returns the data a clinician sees — distinct from KP's payer/claims (EOB) API:

  • MedicationRequest → your prescription orders (name, dose, frequency, prescriber)
  • Observation (laboratory) → lab values with units & reference ranges
  • Observation (vital-signs) → BP, HR, weight, etc.
  • Condition → diagnoses (active / resolved)
  • AllergyIntolerance → allergies + reactions
  • Immunization → vaccination history
  • Patient → demographics

One Epic app works across thousands of Epic health systems. The member picks their org from Epic's endpoint directory; you authenticate against that org's FHIR server.

Auth: SMART on FHIR — OAuth 2.0 Authorization Code + PKCE (public client, no secret). Endpoints auto-discovered from {fhirBaseUrl}/.well-known/smart-configuration; Epic requires aud={fhirBaseUrl}.

Complement to KP: Epic gives the clinical truth (lab values, diagnoses, prescription orders); KP's EOB gives the claims/cost + fill history view.

Setup needed (fhir.epic.com)

  1. Register an app at fhir.epic.com → Build Apps: type Patients, standalone launch, R4, Public client (PKCE).
  2. Add the clinical scopes: openid fhirUser launch/patient offline_access patient/Patient.read patient/MedicationRequest.read patient/Observation.read patient/Condition.read patient/AllergyIntolerance.read patient/Immunization.read
  3. Register Redirect URI: https://beyondmychart.com/epic-callback.html
  4. Copy your Non-Production (sandbox) Client ID into epic-config.js (replace REPLACE_WITH_EPIC_SANDBOX_CLIENT_ID); the Production Client ID goes to Netlify env EPIC_CLIENT_ID when wired.
  5. Sandbox base is already set: https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4 — test with Epic's sandbox patients (e.g. Camila Lopez, Derrick Lin; credentials in Epic's sandbox docs).