SMART on FHIR: App Launch, OAuth2 Scopes, and EHR Cost (2026)
How SMART on FHIR v2 works in production: .well-known discovery, EHR vs standalone launch, OAuth 2.0 PKCE and v2 granular scopes, Backend Services JWTs, ONC (g)(10) fee rules, and $15,000 to $231,000+ build costs.

On this page

If you build software that plugs into hospital charts or pulls patient records in 2026, SMART on FHIR is the authorization, identity, and launch layer standing between your codebase and clinical production. Raw HL7 FHIR R4 defines what a Patient, Observation, or MedicationRequest JSON resource looks like; SMART on FHIR defines how an application discovers the hospital's endpoints, authenticates a physician inside Epic Hyperdrive or a patient on an iPhone, enforces granular OAuth 2.0 scopes with Proof Key for Code Exchange (PKCE), and inherits the active patient and encounter context without custom per-hospital SSO wiring.
Yet founders and engineering leads scoping smart on fhir app development routinely underestimate the gap between passing a five-minute public sandbox test and surviving a multi-hospital rollout. On paper, federal 45 CFR 170.315(g)(10) certification standardized SMART App Launch v2 across US health systems. In production, third-party iframe cookie partitioning breaks embedded clinician launches, v1-versus-v2 scope mismatches fail Epic Showroom and Oracle Health security reviews, write-back operations cross outside standardized (g)(10) profiles into commercial vendor programs, and tenant-specific iss routing bugs create Cross-Tenant PHI exposure risks.
At Idealogic, where I lead architecture across our healthcare software development and custom software development teams, we engineer HIPAA- and GDPR-compliant clinical platforms with live bidirectional HL7/FHIR sync, including AddMed. Below is our 2026 production guide to SMART App Launch v2 mechanics, OAuth 2.0 PKCE and asymmetric JWT flows, (g)(10) fee boundaries, CDS Hooks, and transparent $15,000 to $231,000+ build budgets.
The short version
- FHIR is the data model; SMART on FHIR v2 is the security and launch protocol: SMART layers
.well-known/smart-configurationdiscovery, OAuth 2.0 +S256PKCE, OpenID ConnectfhirUseridentity, and active chart context (patient,encounter) onto FHIR R4 APIs. - Four launch patterns cover every clinical surface: use Clinician EHR Launch for embedded chart tabs, Standalone Launch for patient mobile apps, Backend Services (
private_key_jwt) for headless Bulk$exportcohorts, and CDS Hooks to trigger inline clinical cards onpatient-viewororder-select. - ONC
(g)(10)guarantees free patient reads, not free clinician write-back: ASTP Data Brief No. 79 shows 70% of US acute care hospitals overall (~83% on market-leading EHRs vs 56% on non-market-leading EHRs; 64% in hospital outpatient settings) expose FHIR APIs, with zero fees on standalone patient reads, whereas commercial marketplace listings and non-US-Core writes still carry vendor program gates. - 2026 SMART on FHIR build costs span four clear tiers: a single-EHR integration sprint starts from $15,000 (
200 to 400 hrs), a single-EHR SMART App MVP runs $45,000 to $75,000 CEE ($99,000 to $165,000 US), a multi-EHR app withCDS Hooksand write-back runs $82,500 to $141,000 CEE (worked 1,280 hrs = $96,000 CEE vs $211,200 US), and enterprise hybrid HL7 v2 + FHIR platforms run $150,000 to $231,000+ CEE.
How SMART App Launch v2 works under the hood: discovery, PKCE, and four launch modes
Under the HL7 SMART App Launch v2.2.0 Implementation Guide, every compliant EHR exposes a machine-readable metadata document at {fhirBaseUrl}/.well-known/smart-configuration. Hardcoding OAuth URLs per hospital is an anti-pattern that breaks during EHR cloud migrations; your app must resolve endpoints dynamically from that discovery JSON (issuer, jwks_uri, authorization_endpoint, token_endpoint, capabilities, and code_challenge_methods_supported: ["S256"]).
Once discovery resolves, clinical products rely on four complementary SMART launch and workflow patterns:
1. Clinician EHR Launch (embedded inside Epic Hyperdrive or Oracle PowerChart)
When a physician opens a patient chart and clicks your app's activity tab, the EHR opens your registered Launch URL inside an embedded browser frame (Microsoft Edge WebView2 in Epic Hyperdrive) or external tab, appending two query parameters:
iss: The FHIR server's canonical base URL (for example,https://fhir.metrohealth.org/api/FHIR/R4).launch: An opaque, short-lived, single-use context handle minted by the EHR session.
Critical security check: Your backend must validate iss against an explicit allowlist of onboarded hospital tenant URLs + registered client_id pairs before redirecting. Accepting an arbitrary iss parameter lets an attacker point your app at a rogue authorization server to harvest state or replay tokens (an SSRF and OAuth mix-up vulnerability InfoSec reviewers test immediately).
After verifying iss and reading .well-known/smart-configuration, your app generates a cryptographically random code_verifier, hashes it with SHA-256 into a base64url code_challenge per IETF RFC 7636 (PKCE) (plain challenges are forbidden in SMART v2), and redirects to authorization_endpoint with scope=launch openid fhirUser patient/Patient.rs patient/Observation.rs and aud={iss}. Because the clinician is already authenticated in the EHR, the redirect completes silently in milliseconds and returns an authorization code. Exchanging code + code_verifier at token_endpoint yields a JSON token response carrying:
access_token: Scoped bearer token for FHIR R4 API calls.id_token: Signed OIDC JWT carrying thefhirUserclaim (such asPractitioner/prac-88210), proving who launched the app.patientandencounter: Active chart resource IDs ("patient": "e63wRTbPfr1p8UW81d8Seiw3"), plus UI hints like"need_patient_banner": falseso your embedded UI suppresses redundant demographic headers when the EHR banner is already visible above your iframe.
2. Standalone Launch (patient mobile apps and external clinician portals)
In a Standalone Launch, your iOS, Android, or web app starts outside the EHR with no launch handle. Instead, the user picks their health system ("Connect my Metro Health MyChart"), and your app redirects to authorization_endpoint requesting explicit context scopes such as launch/patient or launch/encounter. The EHR authenticates the user via MyChart or hospital SSO, displays a patient/proxy selector and data-sharing consent screen, and returns the authorized patient ID alongside your access_token and optional refresh_token (offline_access). Under the 21st Century Cures Act, this is the self-serve door powering modern patient engagement software.
3. SMART Backend Services (system-to-system asymmetric JWT + Bulk $export)
Nightly population-health syncs, payer risk-adjustment pipelines, and clinical AI pre-screening jobs run at 2 a.m. with no human logged in. Under the SMART Backend Services specification, headless servers use the OAuth 2.0 client_credentials grant secured with asymmetric public-key cryptography (IETF RFC 7523):
- You host a public JSON Web Key Set (
JWKS) endpoint exposing rotatingRS384orES384public keys (and never share static client secrets). - For each token request, your worker signs a short-lived (
<= 5 min)client_assertionJWT (issandsub=client_id,aud=token_endpoint, uniquejtinonce) and postsgrant_type=client_credentialswithscope=system/Patient.rs system/Observation.rs. - With the resulting bearer token, your worker triggers asynchronous FHIR Bulk Data Access (
$export) (GET /Group/{id}/$export?_type=Patient,Condition,Observation), polls the202 AcceptedContent-Locationstatus URL, and streams newline-delimited JSON (NDJSON) cohorts directly into your encrypted clinical store.
4. CDS Hooks + SMART App Link cards (solving the clinician click problem)
The #1 adoption killer in clinician SMART on FHIR apps is workflow friction: even if your tab sits inside Epic, busy physicians will not click an extra tab on every 15-minute visit just to check if your tool has insights. CDS Hooks solves this by flipping the trigger from pull to event push. When a clinician opens a chart (patient-view), selects a medication or imaging study (order-select), or signs orders (order-sign), the EHR sends a sub-second HTTPS POST containing active context and prefetched FHIR resources to your CDS endpoint. When risk criteria fire, your service returns an inline EHR alert card containing a "type": "smart" launch link and appContext payload, opening your SMART app pre-loaded to the exact clinical intervention in one click.
SMART v1 vs SMART v2 scopes and real TypeScript PKCE + JWT code
A frequent reason apps fail Epic or Oracle Health certification is mixing legacy SMART v1 scope strings with SMART v2 capabilities. Under SMART v2 Scopes and Launch Context, coarse .read and .write suffixes are replaced by ordered cruds permission flags (c create, r read, u update, d delete, s search) and optional FHIR search-parameter constraints that enforce HIPAA minimum-necessary access at the token layer:
Below is a concise TypeScript server handler demonstrating tenant-validated SMART v2 EHR launch initiation with mandatory S256 PKCE:
(Production note on embedded iframes: because Epic Hyperdrive WebView2 and iPad Safari block unpartitioned third-party cookies inside cross-origin iframes, pass your post-callback session binding via SameSite=None; Secure; Partitioned (CHIPS) cookies or short-lived memory tokens bound to window state, never storing PHI or refresh tokens in browser localStorage.)
ASTP / ONC (g)(10) fee rules vs Epic Showroom and Oracle Health reality
Founders routinely read that federal law made EHR APIs "free and automatic," then hit unexpected vendor invoices six months into commercialization. Separating statutory rights from proprietary vendor programs requires reading two federal rules side by side:
- Standardized
(g)(10)API baseline (ASTP170.315(g)(10)Test Procedure): Every Certified EHR Technology (CEHRT) platform must expose FHIR R4.0.1 resources profiled to HL7 US Core, secured with SMART App Launch v2 and Bulk Data$export. According to ASTP Data Brief No. 79 (analyzing 2024 AHA IT Supplement data), 70% of US non-federal acute care hospitals overall (~83% among hospitals on market-leading EHRs, vs 56% on non-market-leading EHRs and 64% in hospital outpatient settings) have enabled FHIR-configured patient-access apps. - API fee ceilings (ASTP
45 CFR 170.404API Conditions of Certification):- Patient-access Standalone SMART apps (
$0API fees): Certified EHR developers and hospitals are strictly prohibited from charging per-call fees, app registration tolls, or vetting fees when a patient authorizes a standalone SMART app to read their USCDI chart data. Registering a patient app on open.epic.com or Oracle Health Millennium Platform APIs propagates yourclient_idacross participating endpoints at zero API cost. - Clinician EHR Launch & Bulk
$exporton US Core reads: Under170.404, certified developers may only recover reasonably incurred costs transparently and cannot demand revenue-share cuts on standardized(g)(10)read APIs, though each individual health system still controls activation, Business Associate Agreement (BAA) execution, and local InfoSec approval. - Where commercial EHR fees STILL apply: The moment your app needs commercial directory visibility and vendor support (such as listing a clinician B2B product in Epic Showroom / Toolbox tiers) or calls non-
(g)(10)APIs (writing customMedicationRequestorders, bookingAppointmentslots, sending Epic InBasket messages, or triggering custom Bridges workflows),(g)(10)fee caps no longer shield you. Budget $5,000 to $25,000+/year for commercial vendor developer programs when your roadmap crosses into proprietary write-back, alongside the January 1, 2027 payer/provider/prior-authorization FHIR mandates under CMS-0057-F.
- Patient-access Standalone SMART apps (
2026 SMART on FHIR app development cost: four transparent build tiers
We benchmark smart on fhir app development budgets across two engineering rate anchors: a Senior CEE Regulated Clinical Squad at $75/hr blended ($3,000/wk, reflecting an OAuth 2.0/AppSec-heavy full-stack clinical squad vs a $70/hr pure interface-engine blend) versus a US Domestic Healthcare Agency at $165/hr blended ($6,600/wk). Every tier reconciles directly with Idealogic's published healthtech pricing (From $15,000 EHR & FHIR Integration Sprint, From $40,000 HIPAA-Aware Clinical MVP, From $65,000 Full Telehealth & Care Platform, and From $18,000/mo Dedicated Healthtech Squad):
Tier 0 & Tier 1: Adapter sprints (From $15,000) and single-EHR MVPs ($45,000 to $75,000 CEE)
If you already operate a working SaaS or clinical product and need to pull Patient, Condition, MedicationRequest, and Observation records from Epic or Oracle Health, Tier 0 (200 to 400 hours, From $15,000 CEE) delivers a clean anti-corruption SMART v2 adapter in 4 to 8 weeks. When building a brand-new embedded clinician tab or standalone patient app from zero through product development, Tier 1 (600 to 1,000 hours, $45,000 to $75,000 CEE; worked 800 hrs = $60,000 CEE vs $132,000 US) adds the responsive clinical UI, iframe cookie partitioning resilience, and tamper-evident PHI access logs aligned with NIST SP 800-66 Rev. 2 HIPAA Security Rule guidance (see HIPAA-compliant software development for full safeguard controls, or medical device software development if your algorithm crosses into FDA SaMD / IEC 62304 territory).
Tier 2: Worked 1,280-hour multi-EHR SMART app + CDS Hooks + write-back ($96,000 CEE vs $211,200 US)
Commercial B2B health-tech companies selling across health systems rarely survive on read-only single-vendor code. Tier 2 (1,100 to 1,880 hours, $82,500 to $141,000 CEE) is the most common commercial production scope we build:
Inside those 1,280 hours ($96,000 CEE vs $211,200 US):
- Multi-tenant OAuth 2.0,
PKCE& EHR registry (25% / 320 hrs / $24,000 CEE vs $52,800 US): Dynamic.well-known/smart-configurationcaching, per-hospitaliss+client_id+JWKSisolation,CHIPSiframe session binding, and SMART v1/v2 scope negotiation across Epic, Oracle Health, and athenahealth/MEDITECH. - Embedded clinical UI &
CDS Hookscards (25% / 320 hrs / $24,000 CEE vs $52,800 US): Sub-200 ms clinician workspace honoringneed_patient_bannerandsmart_style_url, paired withpatient-viewandorder-selectCDS Hooksendpoints returning actionable SMART launch links. - Canonical US Core reads & idempotent write-back (20% / 256 hrs / $19,200 CEE vs $42,240 US): Vendor-neutral normalization of
LOINC,SNOMED CT, andRxNormcodings (see api-integration and system integration), plus durable-queueDocumentReference,Observation, andTaskwrite-back withIdentifieridempotency keys andProvenanceresources. - Backend Services
RS384JWT & Bulk$export(15% / 192 hrs / $14,400 CEE vs $31,680 US): Automated key rotation (JWKS),RFC 7523client assertions, and streamingNDJSONcohort ingestion for pre-visit risk scoring. - HIPAA audit trails, chaos QA & Showroom review (15% / 192 hrs / $14,400 CEE vs $31,680 US): Six-year immutable WORM PHI access logs, dynamic
Content-Security-Policy: frame-ancestorsper hospital origin, token-expiry chaos testing, and Epic Showroom / hospital InfoSec evidence packages.
Tier 3: Enterprise hybrid SMART on FHIR + HL7 v2 MLLP fallback ($150,000 to $231,000+ CEE)
When scaling across 10+ health systems including community hospitals among the ~30% without active inpatient FHIR app endpoints (or workflows requiring sub-second ADT bed-transfer pushes and custom order writes), Tier 3 (2,000 to 3,080+ hours; worked 2,400 hrs = $180,000 CEE vs $396,000 US) pairs your multi-EHR SMART on FHIR app with a high-availability Mirth Connect HL7 v2 MLLP engine behind one canonical domain model. For deeper protocol and multi-site TCO comparisons, read our companion guides on Epic vs Cerner (Oracle Health), HL7 vs FHIR, EHR integration, EHR implementation cost, and EHR vs EMR.
Passing a public Epic or Oracle sandbox takes a competent engineer three afternoons. Shipping a SMART on FHIR product across ten hospitals takes partitioned iframe session engineering, canonical terminology normalization, idempotent write-back queues, and an architecture built to pass hospital InfoSec on the first submission.
Production pitfalls and shipped Idealogic HL7 + FHIR proof
Four failure modes account for 80% of delayed SMART on FHIR hospital go-lives, and our squads design against all four in Sprint 1:
- Vendor resource drift inside valid US Core JSON: Epic often surfaces active inpatient medications differently from outpatient
MedicationRequestrecords, while Oracle Health returns distinctEncounterclass hierarchies and containedPractitionerreferences. Never bind React components directly to raw FHIR payloads; map every response into an internal TypeScript domain model behind a vendor adapter. - Silent write-back drops during EHR maintenance windows: Hospital FHIR servers go offline for weekend upgrades. Writing a clinical summary (
DocumentReference) synchronously from a browser click loses clinical data on a503. Persist every outbound write to an encrypted server queue with deterministicIdentifierdeduplication and dead-letter alerting. - Over-scoping data classes on Hospital #1: Requesting twelve
user/*.crudsscopes when your v1 workflow only reads fivepatient/*.rsresources triggers months of Medical Executive Committee and privacy-board escalations. Ship v1 on the narrowest read/PDF-note surface that proves clinical ROI, then widen scopes in Phase 2. - Hardcoding single-tenant
frame-ancestorsheaders: Embedding inside multiple hospitals requires dynamically emittingContent-Security-Policy: frame-ancestorsmatched strictly to the validated hospital EHR origin for thatstatesession, preventing clickjacking without breaking Hyperdrive framing.
Idealogic has engineered and operated these exact clinical integration patterns in regulated live deployments:
- Bidirectional HL7 v2 and FHIR R4 EMR sync (AddMed): Built end to end by our healthcare squad, AddMed connects an accessibility-first patient medication app with a clinician adherence dashboard and predictive drift flags. Medication schedules import and write back automatically across both FHIR R4 REST APIs and HL7 v2 feeds with idempotent retry queues and full audit trails across HIPAA and GDPR clinical pilots with zero data incidents.
- Tamper-evident consent & regulated audit trails (Chaindoc): Shipped in 22 weeks, providing cryptographic
SHA-256document integrity and eIDAS/ESIGN audit timelines across 10,000+ signed agreements at 99.9% uptime for healthcare and financial institutions.
Teams expanding across additional EHR marketplaces, CMS-0057-F Da Vinci prior-authorization workflows, or clinical LLM summarization pipelines via AI integration services can also embed a HIPAA-trained Idealogic dedicated development team from $18,000/month.

CTO and Co-founder at Idealogic. Directing engineering, systems architecture, security, and full-stack delivery across web, mobile, and blockchain.
Frequently asked questions
SMART on FHIR (Substitutable Medical Applications, Reusable Technologies on Fast Healthcare Interoperability Resources) is an open HL7 standard that layers OAuth 2.0 authorization, OpenID Connect clinician or patient identity, and active chart launch context on top of HL7 FHIR REST APIs. It allows a single web or mobile clinical application to launch securely inside Epic, Oracle Health, MEDITECH, or athenahealth with single sign-on and scoped access to the active patient chart without writing custom auth connectors per hospital.
With a senior Central and Eastern European clinical engineering squad billing $75 per hour, a Single-EHR SMART on FHIR Adapter or Sandbox Sprint starts from $15,000 ($15,000 to $30,000 over 4 to 8 weeks; worked 300-hour build: $22,500 CEE versus $49,500 at $165 per hour in the US). A Single-EHR Clinician or Patient SMART on FHIR App MVP runs $45,000 to $75,000 in CEE ($99,000 to $165,000 US). A Multi-EHR Embedded App with CDS Hooks, write-back, and Backend Services runs $82,500 to $141,000 in CEE (worked 1,280-hour build: $96,000 CEE versus $211,200 US), while Enterprise Hybrid platforms with HL7 v2 fallback bridges run $150,000 to $231,000+ in CEE.
In an EHR Launch, a clinician clicks a tab inside Epic Hyperspace or Oracle PowerChart, which opens your app in an embedded frame with an iss server URL and temporary launch token so the app receives active patient and encounter IDs automatically. In a Standalone Launch, a patient or clinician opens your mobile or web app outside the EHR, logs in through the hospital portal, and selects or authorizes a patient record. In SMART Backend Services, a headless server signs an RS384 or ES384 JWT assertion with no human in the loop to pull Bulk FHIR cohort exports.
SMART v1 used coarse read and write scopes such as patient/Observation.read and user/MedicationRequest.write, and allowed public mobile clients without PKCE. SMART App Launch v2 mandates PKCE with SHA-256 (S256) on every authorization-code flow, introduces asymmetric private_key_jwt client authentication, and replaces .read and .write with five granular permissions (c, r, u, d, s for create, read, update, delete, search) plus search-parameter filters so an app can request vital-signs observations without exposing psychiatric or lab notes.
Partially, and misunderstanding the boundary causes major budget surprises. Under ASTP/ONC 45 CFR 170.315(g)(10) and 45 CFR 170.404 API Conditions of Certification, certified EHRs must let patients connect standalone SMART on FHIR apps to read standardized US Core R4 data with zero per-call or developer fees, and standardized provider/bulk (g)(10) APIs are bound by strict cost-recovery rules. However, EHR vendors still charge annual marketplace program fees (such as commercial Epic Showroom tiers) and bill separately for non-(g)(10) proprietary APIs including complex order write-back, InBasket messaging, and appointment booking.
SMART on FHIR requires a clinician to click a button or tab to open your app, which clinicians forget to do during busy shifts. CDS Hooks solves workflow discovery by letting the EHR fire a synchronous JSON webhook to your clinical decision support service on chart events such as patient-view, order-select, or order-sign. Your service evaluates prefetched FHIR data in under 500 milliseconds and returns an inline alert card containing a one-click SMART launch link carrying appContext right when clinical action is needed.
Embedded clinician apps run inside browser iframes (WebView2 in Epic Hyperdrive or WebKit on iPad), where third-party cookie blocking (SameSite and Safari ITP) silently drops session cookies when the EHR domain differs from your app domain. Production SMART on FHIR apps avoid unpartitioned third-party cookies by binding OAuth state and PKCE verifiers in partitioned storage (CHIPS) or sessionStorage keyed by tab state, enforcing strict Content-Security-Policy frame-ancestors allowlists per hospital tenant, and keeping PHI tokens out of persistent localStorage.
You still need an HL7 v2 MLLP interface when selling into independent or Critical Access hospitals among the roughly 30 percent of US acute care facilities without active FHIR app endpoints, when your workflow requires sub-second inpatient admission or lab push triggers where FHIR Subscriptions are not yet enabled, or when writing back specialty orders, billing charges, or custom fields outside HL7 US Core profiles.
More from the journal

Telemedicine App Development Cost in 2026: Tiers & Vendor TCO
Pricing a telehealth app by screen count ignores clinical compliance. Here is telemedicine app development cost in 2026 across four build tiers, CEE vs US labor math, Surescripts and DEA EPCS onboarding fees, FHIR EHR sync, and monthly run-rate COGS.

HL7 vs FHIR in 2026: Architecture, Payloads & Integration Cost
HL7 publishes both pipe-delimited HL7 v2 feeds and RESTful FHIR R4 APIs. Compare wire-level payloads, SMART on FHIR auth, ONC (g)(10) and CMS-0057-F mandates, and real $15k to $75k integration costs.

Epic vs Cerner (Oracle Health): 2026 CTO & Integration Guide
Engineering and CTO guide to Epic vs Cerner (Oracle Health) in 2026: KLAS US hospital market share, Chronicles vs Millennium + OCI, Showroom vs code Console FHIR R4 APIs, HL7 v2 bridges, and $15k-$231k+ integration costs.