Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

SMART on FHIR: Architecture, EHR vs. Standalone App Launch, OAuth 2.0 Scopes, and ONC § 170.315(g)(10)

How SMART on FHIR works: HL7 SMART App Launch v1/v2, ONC 45 CFR § 170.315(g)(10), OAuth 2.0 and OpenID Connect, EHR vs. standalone launch, and EHR apps.

Written and maintained by CASRAI Editorial Board

Last updated

SMART on FHIR (Substitutable Medical Applications, Reusable Technologies on Fast Healthcare Interoperability Resources) is an open, standards-based healthcare application platform specification maintained by Health Level Seven International (HL7) that enables third-party clinical decision support tools, patient-facing mobile applications, and clinical research modules to run securely across different Electronic Health Record (EHR) systems without custom vendor-specific interface code. Mandated across U.S. certified EHR technology under the ONC 21st Century Cures Act Final Rule (45 CFR § 170.315(g)(10)), SMART on FHIR combines HL7 FHIR RESTful APIs and HL7 US Core profiles with OAuth 2.0 authorization and OpenID Connect (OIDC) authentication.

What Is SMART on FHIR?

Originally developed in 2010 by the Computational Health Informatics Program (CHIP) at Boston Children’s Hospital and Harvard Medical School (led by Kenneth Mandl and Isaac Kohane) and later adapted to the HL7 FHIR specification, SMART on FHIR solves a foundational problem in clinical informatics: allowing a ‘substitutable’ clinical or research application to be written once and launched inside—or connected to—any conformant EHR (including Epic and Oracle Health [Cerner], MEDITECH, athenahealth, and NextGen) or interoperable research information system.

The SMART on FHIR architecture rests on four standardized technical layers:

  1. Clinical Data Model and API Layer (HL7 FHIR & US Core): Clinical data is queried and written as standardized JSON or XML resources (such as Patient, Observation, Condition, MedicationRequest, and DocumentReference) constrained by national profiles such as the HL7 FHIR US Core Implementation Guide.
  2. Authorization Layer (OAuth 2.0, RFC 6749 & PKCE, RFC 7636): Delegated access control ensures that the SMART application never sees or stores the clinician’s or patient’s EHR credentials. Instead, the EHR’s authorization server issues a time-limited, scope-restricted OAuth 2.0 access_token (and optional refresh_token). In SMART App Launch v2.0+, all public and confidential clients using the authorization code flow must implement Proof Key for Code Exchange (PKCE) using the S256 (SHA-256) challenge method.
  3. Authentication Layer (OpenID Connect Core 1.0): When an application requests the openid and fhirUser scopes, the authorization server returns a cryptographically signed JSON Web Token (id_token) identifying the authenticated user and providing a direct FHIR resource URL (such as Practitioner/123 or Patient/456).
  4. UX and Context Integration Layer (SMART App Launch & CDS Hooks): Defines how the EHR passes the active clinical session context—specifically which patient chart and which clinical encounter are currently open on screen—to the launched application.

SMART on FHIR App Launch Flows: EHR Launch vs. Standalone Launch

The HL7 SMART App Launch Implementation Guide defines two primary user-facing launch sequences, plus a backend services profile for system-to-system data pipelines:

Launch Workflow How the SMART on FHIR Application Starts Context Parameters & Handshake Typical Healthcare & Research Use Cases
EHR Launch (In-Context Clinician or Portal Launch) A clinician or user clicks an embedded app tab or button inside an active EHR chart session (often rendered in an HTML5 iframe or new browser tab). EHR calls the app’s launch URL with two GET parameters: iss (the FHIR server base URL) and launch (an opaque one-time context handle). The app queries {iss}/.well-known/smart-configuration, then redirects to the authorization endpoint passing launch={launch} and scope launch. Point-of-care clinical calculators (ASCVD, bilirubin charts), genomic variant viewers, ambient AI scribes, and clinical trial eligibility screening apps inside the EHR chart.
Standalone Launch (Patient or External App Launch) A patient or clinician opens a mobile iOS/Android app or external web application directly, outside the EHR user interface. The user selects their healthcare institution from an endpoint directory. The app fetches /.well-known/smart-configuration and initiates OAuth 2.0 authorization requesting explicit context scopes (such as launch/patient or launch/encounter). Patient-facing personal health record (PHR) mobile apps, Apple Health records integration, decentralized clinical trial (DCT) ePRO/eConsent mobile apps.
SMART Backend Services (System-to-System) An automated server daemon or research ETL pipeline connects to the EHR FHIR server with no human user in the loop. Uses the OAuth 2.0 client_credentials grant with asymmetric public/private key JWT assertions (RFC 7523) and system/* scopes; often paired with the FHIR Bulk Data Access ($export) API. Nightly population health cohorts, multi-site registry synchronization, and automated EHR-to-EDC clinical trial data ingestion.

Step-by-Step EHR Launch Sequence

When a clinician opens a SMART on FHIR app inside an EHR patient chart, four HTTP steps execute in under a second:

  1. 1. EHR Initiates Launch Request: The EHR navigates to the registered launch_uri of the SMART app, appending ?iss=https://fhir.examplehospital.org/r4&launch=xyz987.
  2. 2. Endpoint Discovery: The SMART app validates the iss URL against its allowlist of trusted FHIR servers and sends an HTTP GET request to https://fhir.examplehospital.org/r4/.well-known/smart-configuration to retrieve the server’s authorization_endpoint and token_endpoint.
  3. 3. OAuth 2.0 Authorization Redirect: The app generates a cryptographic state parameter and PKCE code_verifier / code_challenge (code_challenge_method=S256) and redirects the browser to the EHR’s authorization_endpoint with response_type=code, client_id, redirect_uri, launch=xyz987, scope=launch openid fhirUser patient/Patient.rs patient/Observation.rs, and aud={iss}.
  4. 4. Token Exchange and FHIR Resource Queries: After the EHR validates the active session, it redirects back to the app’s redirect_uri with an authorization code. The app posts the code and code_verifier to the token_endpoint and receives a JSON token response containing access_token, id_token, patient (e.g., 'patient': 'example-pt-101'), and encounter. The app then queries GET {iss}/Observation?patient=example-pt-101&category=vital-signs using the HTTP header Authorization: Bearer {access_token}.

SMART on FHIR Scopes: v1 vs. v2 Granular Permissions

SMART on FHIR enforces the principle of least privilege through structured OAuth 2.0 scopes that specify both the access category (patient/ for records restricted to the single in-context patient, user/ for records the authenticated clinician or user is permitted to access across the EHR, or system/ for backend services) and the allowed operations:

  • SMART v1 Scope Syntax (.read, .write, .*): Used in initial ONC Cures Act deployments—for example, patient/Immunization.read (read and search immunizations for the active patient) or user/Observation.write.
  • SMART v2 Scope Syntax (.c, .r, .u, .d, .s): Introduced in HL7 SMART App Launch v2.0.0 to provide fine-grained separation between reading by ID and searching, using any combination of c (create), r (read), u (update), d (delete), and s (search) in that order—for example, patient/Observation.rs (read and search observations) or user/QuestionnaireResponse.cruds. SMART v2 also supports sub-resource scope filtering by FHIR search parameters, such as patient/Observation.rs?category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory (restricting access strictly to laboratory observations rather than mental health or social history observations).
  • Context and Lifecycle Scopes: launch (EHR launch context), launch/patient (standalone patient selection), launch/encounter (standalone encounter selection), openid + fhirUser (OIDC user identity), and online_access or offline_access (requesting a refresh token).

ONC 45 CFR § 170.315(g)(10) Certification and Clinical Research Applications

In the United States, the widespread availability of SMART on FHIR across hospital and ambulatory EHRs is driven by the Office of the National Coordinator for Health Information Technology (ONC) certification criterion 45 CFR § 170.315(g)(10) (Standardized API for patient and population services):

  • Mandatory Support Across Certified EHRs: Every EHR certified under the ONC Health IT Certification Program (listed on the Certified Health IT Product List, CHPL) must expose a conformant HL7 FHIR R4 API supporting HL7 US Core profiles and the SMART App Launch Framework for both patient standalone access and clinician EHR launch.
  • Patient Access Without Special Effort: Under the Cures Act Information Blocking rules (45 CFR Part 171) and § 170.315(g)(10), patients have the right to authorize third-party SMART on FHIR applications of their choice to retrieve their USCDI health data using their patient portal credentials.
  • Clinical Research and EHR-to-EDC Integration: Academic medical centers and trial sponsors use SMART on FHIR applications for three core research workflows: (1) Point-of-Care Trial Recruitment, where a CDS Hooks card triggers a SMART on FHIR screening app when a patient’s labs and ICD-10/SNOMED problem list match trial inclusion criteria; (2) EHR-to-EDC eSource Pre-Population, pulling verified US Core vital signs, concomitant medications, and laboratory panels directly into electronic case report forms (eCRFs) via the HL7 Vulcan RWD / EHR-to-EDC profiles; and (3) Participant-Mediated Real-World Data (RWD) Sharing, where trial participants use a standalone SMART on FHIR mobile app to connect their health system portal and contribute longitudinal EHR records to a registry.

Frequently Asked Questions

What is SMART on FHIR?

SMART on FHIR (Substitutable Medical Applications, Reusable Technologies on Fast Healthcare Interoperability Resources) is an open HL7 standard that combines FHIR clinical data APIs with OAuth 2.0 authorization, OpenID Connect authentication, and standardized EHR launch context so third-party clinical and patient apps can run securely across different EHR systems without custom integration code.

What is the difference between a SMART on FHIR EHR launch and a standalone launch?

In an EHR launch, a user opens the SMART on FHIR app directly from inside an active EHR session, and the EHR passes the FHIR server URL (iss) and an opaque launch context token (launch) so the app automatically loads the active patient and encounter. In a standalone launch, the user opens the app independently (such as on a smartphone or external website), selects their healthcare provider’s FHIR endpoint, and logs in through the EHR’s OAuth 2.0 authorization screen using scopes like launch/patient.

How does ONC 45 CFR § 170.315(g)(10) regulate SMART on FHIR applications?

Under ONC certification criterion 45 CFR § 170.315(g)(10), all certified EHR systems in the United States must provide standardized HL7 FHIR R4 APIs implementing the HL7 SMART App Launch Framework and US Core Implementation Guide, enabling both clinician-facing EHR-launched apps and patient-authorized standalone apps to access United States Core Data for Interoperability (USCDI) elements.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about SMART on FHIR: Architecture, EHR vs. Standalone App Launch, OAuth 2.0 Scopes, and ONC § 170.315(g)(10)

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →