Interoperability
SMART on FHIR App Development
SMART on FHIR lets one app run inside many EHRs with standard authorization and launch context. We build SMART apps that work in the embedded browser a clinician actually uses, not just in a developer's Chrome tab.
At a glance
- Standards & integrations
- Epic SMART launchOracle Health SMART launchMEDITECH Expanse SMART launchathenahealth and eClinicalWorks patient accessSMART App Launcher for testingCDS Hooks-capable EHRs
- Typical deliverables
Launch and scope design document
SMART app source code
Token broker and key management setup
CDS Hooks service where in scope
SMART on FHIR app: overview
SMART App Launch is an HL7 specification layered on OAuth 2.0 and OpenID Connect. It defines how an app discovers an EHR's authorization endpoints through /.well-known/smart-configuration, requests scopes such as patient/Observation.rs or user/Patient.r, and receives launch context like the current patient and encounter alongside its access token. Version 2 of the specification introduced finer-grained scope syntax and requires PKCE with the S256 method for authorization code flows.
There are two launch patterns. In an EHR launch, the clinician opens the app from within the chart; the EHR calls the app's launch URL with iss and launch parameters, and the app exchanges those for a token already bound to the patient in view. In a standalone launch, the user opens the app directly, chooses a health system, and signs in; the app requests launch/patient so the authorization server can prompt for a patient. Patient-facing apps almost always use standalone launch.
Not every integration has a user present. SMART Backend Services covers server-to-server access: the client registers a public key set (JWKS), signs a short-lived JWT assertion with its private key (RS384 or ES384), and exchanges it via the client_credentials grant for a token with system-level scopes. This is the usual authorization path for Bulk FHIR exports and scheduled synchronization. We often pair SMART apps with CDS Hooks services that surface cards at the moment a clinician opens a chart or signs an order.
Engineering challenges in SMART on FHIR app
01Embedded browser constraints
EHRs host apps in embedded browser controls with restricted third-party cookies, pop-ups, and storage. Session handling that relies on cookies across domains often breaks.
02Scope negotiation
An authorization server may grant fewer scopes than requested. Apps must read the granted scope string and degrade gracefully instead of failing on the first 403.
03Context switching
Clinicians switch patients quickly. An app that caches context from a previous launch can display the wrong patient, which is a patient-safety issue, not a cosmetic bug.
04Version and vendor variation
Servers differ in support for SMART v1 versus v2 scope syntax, refresh tokens, and token introspection. Capabilities in the discovery document must drive behavior.
05Key management for backend apps
Backend Services depends on private keys. Lost or leaked keys, and rotation without a published JWKS update, cause outages or exposure.
Technical capabilities
What our SMART on FHIR app work covers
EHR launch apps
Provider-facing apps that handle iss and launch parameters, validate the issuer against an allowlist, and bind UI state to the patient and encounter in the token response.
Standalone patient apps
Web and mobile apps with endpoint discovery, authorization code plus PKCE, offline_access refresh tokens where granted, and secure token storage on device.
Backend Services clients
Server clients with JWKS hosting, signed JWT assertions, token caching within expiry, and key rotation procedures.
Authorization server work
For platforms exposing their own FHIR APIs, we configure SMART-compliant authorization servers with scope enforcement, launch context injection, and consent screens.
CDS Hooks services
Services for hooks such as patient-view, order-select, and order-sign that return cards with suggestions or SMART app links, built to respond within the EHR's latency budget using prefetch.
Multi-EHR testing
Test matrices across vendor sandboxes and the SMART reference launcher, including scope denial, token expiry mid-session, and rapid patient switching.
Software architecture
Reference architecture for SMART on FHIR app
A SMART app is a thin, context-bound UI on top of a token broker and FHIR adapter, with no assumptions about which EHR launched it.
- Launch
- Launch endpoint
- Issuer allowlist
- Discovery client
- PKCE generator
- Token broker
- Code exchange
- Refresh handling
- Granted scope parser
- Encrypted token store
- FHIR access
- Resource client
- Paging
- Error mapping
- Per-EHR quirks
- Application
- Context-bound UI
- Business logic
- Audit logging
- Decision support
- CDS Hooks discovery
- Prefetch handling
- Card builder
Technology stack for SMART on FHIR app
- Specifications
- SMART App Launch 2.xSMART Backend ServicesCDS HooksOAuth 2.0 / OpenID ConnectFHIR R4
- Client libraries
- fhirclient.jsSMART on FHIR Swift and Android clientsAppAuthjose (JWT)
- Frontend
- ReactNext.jsTypeScriptAccessible component library
- Testing
- SMART App LauncherVendor sandboxesInferno SMART testsPlaywright in embedded mode
Security & compliance
Security and compliance considerations for SMART on FHIR app
What regulations require
- ONC's standardized API criterion (45 CFR 170.315(g)(10)) requires certified health IT to support SMART App Launch for patient and user-facing apps, including authorization for both EHR and standalone launch.
- When an app vendor acts on behalf of a covered entity, it is a HIPAA business associate and needs a Business Associate Agreement (45 CFR 164.502(e)); purely patient-directed apps may instead fall under FTC jurisdiction, including the Health Breach Notification Rule.
- The HIPAA Security Rule requires unique user identification for access to ePHI (45 CFR 164.312(a)(2)(i)), which apps meet in part by using the fhirUser and id_token claims rather than shared accounts.
Recommended engineering practices
- Always use PKCE with S256 and validate the state parameter on return.
- Validate iss against a configured allowlist before redirecting to any authorization server.
- Keep access tokens in memory where possible and never put them in URLs or logs.
- Rotate Backend Services keys with overlapping JWKS entries so tokens keep issuing during rotation.
- Follow OWASP ASVS guidance for session management in embedded contexts.
Regulatory summaries are educational, not legal advice. HIPAA compliance is an organizational program; software can support safeguards but cannot by itself make an organization compliant. Systems that handle PHI need their own risk analysis, vendor evaluation, and Business Associate Agreements before deployment.
Integration capabilities
Integrations we engineer for SMART on FHIR app
- Epic SMART launch
- Oracle Health SMART launch
- MEDITECH Expanse SMART launch
- athenahealth and eClinicalWorks patient access
- SMART App Launcher for testing
- CDS Hooks-capable EHRs
- Bulk FHIR via Backend Services
- Identity providers with OpenID Connect
Engineering methodology
How we approach SMART on FHIR app
- 1
Launch and scope design
We decide launch type, minimum scopes, and context needs per feature, and document the rationale for security reviewers.
- 2
Reference launcher prototype
We prove the auth flow and core FHIR reads against the SMART App Launcher and synthetic data.
- 3
Vendor sandbox testing
We run the same app against each target vendor's sandbox and record differences in scopes, tokens, and resources.
- 4
Embedded workflow validation
Clinician users test inside the EHR client: patient switching, timeouts, multiple windows.
- 5
Production rollout
Per-organization activation, monitoring of auth failures and FHIR errors, and a support guide for EHR help desks.
Business use cases
Where SMART on FHIR app delivers value
Specialty risk calculator
An app launched from the chart pulls vitals and labs and computes a guideline-based score for clinician review, with inputs shown alongside the result.
Patient record download
A consumer app lets a patient connect several providers and view their combined medication list.
Order-time guidance
A CDS Hooks service returns a card on order-sign when an imaging order lacks required documentation, linking to a SMART app to complete it.
Nightly backend sync
A care management platform uses Backend Services tokens to request group-level Bulk exports every night.
Technical comparison
| Pattern | User present | Grant | Typical scopes | Use |
|---|---|---|---|---|
| EHR launch | Clinician | Authorization code + PKCE | launch, user/*.rs, openid fhirUser | Apps inside the chart |
| Standalone launch (patient) | Patient | Authorization code + PKCE | launch/patient, patient/*.rs, offline_access | Consumer apps |
| Standalone launch (provider) | Clinician | Authorization code + PKCE | user/*.rs, openid fhirUser | Apps opened outside the EHR |
| Backend Services | None | client_credentials with JWT assertion | system/*.rs | Bulk export, scheduled sync |
Typical deliverables
What a SMART on FHIR app engagement produces
- Launch and scope design document
- SMART app source code
- Token broker and key management setup
- CDS Hooks service where in scope
- Multi-vendor test matrix and results
- Security documentation for health system review
- Activation and support runbooks
SMART app security checklist
- PKCE S256 on every authorization code flow
- State parameter generated and verified
- Issuer allowlist enforced
- Granted scopes parsed and respected
- Patient context re-read on every launch
- Tokens excluded from logs and URLs
- JWKS rotation procedure tested
Cost and timeline factors
What shapes SMART on FHIR app cost and timeline
- Launch types required (EHR, standalone, backend)
- Number of EHR vendors to support
- UI complexity and clinical workflow depth
- Write-back needs beyond reads
- CDS Hooks integration
- Health system security review cycles
Typical timeline
A focused read-only SMART app proven against the reference launcher and one sandbox can be ready in weeks. Supporting several vendors with clinician validation and production activation typically spans one to two quarters.
Read the cost guideSMART on FHIR app FAQs
What is the difference between EHR launch and standalone launch?
In an EHR launch, the app is opened from inside the EHR, which passes a launch token and its FHIR base URL, so the app receives the current patient context automatically. In a standalone launch, the user opens the app directly, selects a provider, and signs in; the app asks for patient context through scopes.
Is PKCE required for SMART on FHIR?
SMART App Launch version 2 requires PKCE with the S256 challenge method for the authorization code flow, for both public and confidential clients. Even where a server still accepts version 1 behavior, using PKCE is a sound practice because it protects against authorization code interception.
What are SMART v2 scopes?
SMART v2 scopes use a context/resource.permissions syntax with letters c, r, u, d, s for create, read, update, delete, and search. For example, patient/Observation.rs grants read and search on the current patient's observations. Version 1 used .read and .write suffixes; many servers support both during transition.
When should we use SMART Backend Services?
Use it when no user is present, such as scheduled data synchronization or Bulk FHIR exports. The client authenticates with a signed JWT using its registered key, and receives system-level scopes. The health system must approve and register the client, and key management becomes an operational responsibility.
Related engineering topics
- FHIR Integration ServicesFHIR R4 client and server engineering with US Core, Bulk Data, SMART authorization, and Subscriptions, built to pass conformance testing.Read more
- Epic EHR IntegrationIndependent engineering for products that connect to Epic through its published FHIR APIs, SMART launch, and HL7 v2 interfaces.Read more
- Clinical Decision SupportEngineering CDS systems with transparent logic, CDS Hooks and SMART integration, and regulatory scoping against FDA's CDS criteria.Read more
- Healthcare API IntegrationIntegration with clinical, payer, pharmacy, lab, and identity APIs: FHIR, X12-backed clearinghouse APIs, e-prescribing networks, and vendor REST APIs.Read more
- Hire FHIR DevelopersHire FHIR developers who build to US Core, SMART App Launch, and Bulk Data, and who know where vendor implementations diverge from the spec.Read more
Discuss your healthcare engineering project
Tell us about the system, the integrations it depends on, and the constraints you are working within. A senior engineer will review it and reply with questions, not a sales script.