SMART on FHIR App Development: How to Build One App for Several EHRs

Key Takeaways
- A SMART on FHIR app is a web app that gets EHR data through OAuth 2.0 and FHIR R4, so the same code can run inside Epic, Oracle Health and athenahealth.
- Certified US EHRs must support SMART App Launch 2.0.0 with two capability sets: patient standalone launch and clinician EHR launch. Build for those two first.
- PKCE with S256 is mandatory for every SMART app, and US Core 6.1.0 has been the required profile set since 1 January 2026.
- CDS Hooks 2.0.1 lets an EHR call your service at points like patient-view or order-sign and show a card that can open your SMART app.
- Our build-effort range for a read-only SMART on FHIR app live at one site is $20K–$45K; each extra EHR vendor adds about 60–70% of the first build’s onboarding work.
Clinicians are not going to leave a patient’s chart to use a separate product. That’s why this matters so much in SMART on FHIR app development. If your app needs its own login, opens in a separate window and requires another copy of the patient’s record, clinicians may use it briefly before moving on. A SMART app works differently. It opens inside the EHR, identifies the patient and encounters already on screen, and accesses the required information through a standard API.
The biggest advantage is that one app can work with multiple EHR systems. Instead of building three separate codebases, you can support Epic, Oracle Health and athenahealth through configuration changes. The registration and go-live steps still vary by vendor. For Epic-specific details, see our Epic FHIR API integration guide. This article focuses on what applies across EHR systems and is vendor neutral.
We will explain what a SMART on FHIR app is, how to choose the right launch type, how authorization works, the role of CDS Hooks, how to build the app step by step and what to expect from a healthcare app development company’s quote.
What Is a SMART on FHIR App?
A SMART on FHIR app is an application that uses the SMART App Launch framework for authorization and the HL7 FHIR API for data. SMART handles who the user is, which patient is in context and what the app may read or write. FHIR handles the data itself, such as patients, conditions, medications, observations, encounters and so on.
Most SMART apps are web apps. That’s done purposefully. An EHR launches the app by opening a URL in an embedded browser or a new window, so a React or Angular front end with a small backend is the usual shape. Native mobile apps can use SMART too, usually through the standalone launch with the patient signing in.
SMART on FHIR apps fall into four groups, which the SMART App Launch 2.2.0 specification lists as its core use cases:
- Patient apps that launch standalone
- Patient apps that launch from a portal
- Provider apps that launch standalone
- Provider apps that launch from inside the EHR
If you’re still choosing between standards for a broader integration, HL7 vs FHIR covers the trade-off. For apps that sit in front of clinicians or patients, SMART on FHIR is the default.
EHR Launch or Standalone Launch: Which Does Your SMART on FHIR App Need?
EHR launch starts inside the EHR. A clinician opens a patient chart and clicks your app. The EHR opens your registered launch URL with two parameters: iss, the EHR’s FHIR endpoint, and launch, an opaque ID for this session. Your app passes that launch ID back during authorization and receives the patient and encounter in context. The user never types a password into your app.
Standalone launch starts outside the EHR. A patient taps your app’s icon, picks their provider, signs in to that provider’s portal and approves the data your app asked for. Your app then gets a token scoped to that patient.
You should pick by user, not by preference.
| Your user | Usual launch | Why |
|---|---|---|
| Clinician working in the chart | EHR launch | Patient context arrives automatically and there is no second login |
| Patient on their phone | Standalone launch | The patient chooses the provider and consents |
| Care manager working a list | EHR launch with user-level context, or backend services | They need many patients, not one |
| Nightly sync or analytics job | Backend services | No user is present to authorize |
Here’s the constraint that should shape your roadmap. Under ONC’s (g)(10) certification criterion, certified EHRs must support the “Patient Access for Standalone Apps” and “Clinician Access for EHR Launch” capability sets. They aren’t required to support patient EHR launch or clinician standalone launch. If your design depends on either of those, check each vendor before you commit to it.
How Does SMART on FHIR Authorization Work?
- SMART builds on OAuth 2.0 and OpenID Connect. The flow looks like this:
- Discovery. Your app reads /.well-known/smart-configuration from the EHR’s FHIR base URL to find the authorization and token endpoints and the capabilities the server supports.
- Authorization request. Your app sends the user to the authorization endpoint with its client ID, redirect URI, requested scopes and a PKCE code challenge.
- Authorization code. The user signs in (or is already signed in, for an EHR launch) and approves. The EHR redirects back with a code.
- Token request. Your app swaps the code and its PKCE verifier for an access token, plus patient and encounter context when it asked for them.
- FHIR calls. Your app calls the FHIR API with the access token as a bearer token.
- Refresh. If you asked for offline or online access and were granted it, you refresh the token instead of sending the user through sign-in again.
A few rules from the spec that teams generally miss:
- PKCE is mandatory. Every SMART app must use Proof Key for Code Exchange, and servers must support the S256 method and reject plain. Public clients, such as single-page apps that can’t hide a secret, rely on it entirely.
- Confidential or public client. If your app can keep a secret on a server, register it as confidential, preferably with asymmetric keys (a JWKS URL) rather than a shared secret. A browser-only app is a public client.
- SMART v2 scopes. Version 2 scopes look like patient/Observation.rs (read and search) rather than v1’s patient/Observation.read. Certified servers don’t have to accept a mix of v1 and v2 scopes in one request, so pick one style.
- Ask for the minimum. Each scope you request shows up on the patient’s consent screen and in the EHR administrator’s review. A request for patient/*.rs gets more questions than a list of the five resources you use.
For server-to-server work, SMART’s backend services profile uses the OAuth client credentials grant with a signed JWT assertion. It’s the pattern for bulk export, overnight sync and population jobs. It needs a confidential client with asymmetric keys, and the EHR pre-authorizes your scopes during registration.
Token handling is where SMART apps fail security reviews. Keep tokens out of local storage where you can, never log them, and treat every FHIR response you cache as PHI. A HIPAA-compliant software development process should cover token storage, log redaction and session timeouts before the first hospital security questionnaire arrives.
Where Do CDS Hooks Fit in SMART on FHIR App Development?
SMART apps wait to be opened. CDS Hooks lets the EHR call you. With CDS Hooks 2.0.1, the current HL7 release, the EHR sends a request to your service at defined points in the workflow, such as patient-view when a chart opens or order-sign when a clinician signs an order. Your service returns cards. This can be a short message, a suggested action, or a link that launches your SMART app with the right context.
The two work well together for clinical decision support. A hook can alert a clinician to a drug interaction or care gap at the right time, and the card can link directly to your SMART app for further details. Without this alert, the clinician may not remember to open the app.
Keep two things in mind. Hooks are part of the clinical workflow, so slow responses and unnecessary alerts can get your service switched off. Keep them fast and only show cards when there is something the clinician can act on. If your logic includes AI, it also needs proper evaluation before use. An LLM evaluation framework for healthcare should be in place before any card is shown to a real prescriber.
How to Build a SMART on FHIR App Step by Step
- Write down your launch and scope list. Name the user, the launch type, every FHIR resource you’ll read or write and the US Core profile each one follows. This list becomes your registration form at every EHR.
- Build against US Core 6.1.0. Certified EHRs moved from US Core 3.1.1 to 6.1.0, with the older version’s adoption expiring on 1 January 2026. Newer versions are being approved for certification testing, so read data defensively: optional elements will be missing, and some sites will return more than others.
- Use a client library. Libraries such as SMART’s JavaScript client handle discovery, PKCE and token refresh. Writing OAuth by hand is where subtle security bugs come from.
- Develop against open sandboxes first. The SMART Health IT launcher and vendor sandboxes let you test EHR and standalone launches with synthetic patients before any hospital is involved.
- Separate your FHIR adapter from your app logic. Map FHIR resources into your own internal model in one layer. Vendor quirks then live in one place instead of across your codebase.
- Register with each EHR vendor. Registration is still vendor-specific; SMART doesn’t standardize it. Plan for a separate client ID, redirect URIs and scope approval at every vendor.
- Test in a customer’s non-production environment. Sandboxes don’t show a hospital’s custom codes, missing data or security settings. Budget a test window with every first customer.
- Activate per organization. Most EHRs require each customer organization to enable your app. Your go-live checklist is per site, not per vendor.
Since SMART apps are web-based, their front end needs to follow the same rules as any other web app. It should load quickly inside an iframe, avoid third-party trackers and fit the narrow screen sizes often used by EHRs for embedded apps.
How Do Epic, Oracle Health and athenahealth Differ for SMART Apps?
The SMART flow is the same everywhere. However, the registration and activation aren’t.
| Epic | Oracle Health (Cerner) | athenahealth | |
|---|---|---|---|
| Where you register | Epic’s developer site (open.epic) | Oracle Health Code Console | athenahealth Developer Portal |
| Sandbox | Epic FHIR sandbox with test patients | Oracle Health sandbox tenant | Preview environment and public sandbox |
| Who turns your app on | Each Epic customer organization | Each hospital tenant | Each practice; non-certified APIs need a contract |
| Note for SMART apps | Scope approval and customer activation drive the timeline | Tenant IDs differ per hospital and environment | Provider apps with a launch URL are embedded in athenaOne |
The Cerner FHIR API integration guide covers which SMART scopes Oracle Health needs. If your customers are mostly ambulatory practices, athenahealth is often the first EHR to support, and its Certified APIs are free for read-only SMART apps.
Smaller EHR systems can vary quite a bit. eClinicalWorks, NextGen and others certify to the same SMART requirements, but sandbox quality and activation steps differ. The EHR integration guide compares those patterns and the aggregator route.
What Does SMART on FHIR App Development Cost?
These cost ranges are based on the development effort involved in our EHR projects with a focused team. They assume a single EHR vendor unless mentioned otherwise.
| Scope | Build effort | Typical timeline |
|---|---|---|
| Sandbox proof of concept with EHR launch, read-only | $5K–$12K | 2–4 weeks |
| Read-only SMART on FHIR app, first site live | $20K–$45K | 3–5 months |
| SMART app with writes, code mapping and an internal data model | $40K–$90K | 4–7 months |
| CDS Hooks service plus a SMART app launched from its cards | $45K–$100K | 4–8 months |
| Each additional EHR vendor | 60–70% of the first vendor’s onboarding effort | 2–5 months |
| Each additional site on a vendor you already support | $3K–$10K | 4–10 weeks |
The engineering work is rarely what takes the most time. Security reviews, scope approvals and the site’s testing schedule usually determine when the app can go live for the first time. Adding more sites becomes easier when details like base URLs, client IDs and code mappings are stored in the configuration
SMART on FHIR App Development Mistakes That Cost a Release
- Designing around a launch type the EHR doesn’t support. Certified EHRs must support patient standalone and clinician EHR launch. Anything else is optional.
- Requesting wildcard scopes. Broad scopes slow approval at every site. Ask for the resources you use.
- Skipping PKCE or using the plain method. It’s mandatory, and servers reject plain.
- Hard-coding one FHIR base URL. Every site and environment has its own. Read iss at launch and store per-customer configuration.
- Trusting the sandbox’s data. Real charts have missing fields, local codes and odd units. Test with a customer’s non-production environment.
- Storing tokens in the browser. Use a backend for confidential clients and short-lived tokens for public ones.
- Building every vendor adapter at once. Ship one EHR, learn its onboarding, then add the next with a clean adapter layer.
Teams that handle SMART on FHIR development well focus on hospital approval as much as the technical work. If the launch type, scopes and site-specific configuration are right from the beginning, the FHIR calls are usually the easiest part.
Frequently Asked Questions
It's an application that uses the SMART App Launch framework for sign-in and authorization and the FHIR API for health data. The app can be launched from within an EHR with the patient already selected, or used separately by having the patient sign in with their provider.Is SMART on FHIR required for EHR certification?
Yes, for EHRs certified to ONC's §170.315(g)(10) API criterion. They must support SMART App Launch, including patient access for standalone apps and clinician access for EHR launch, along with US Core and token introspection.
An EHR launch starts from inside the EHR and passes the current patient and encounter to your app. On the contrary, a standalone launch starts from your app, and the user picks their provider and signs in there before your app receives a token.
Yes, it does. Epic supports SMART on FHIR apps through its developer program. You register the app with Epic, and each Epic customer organization decides whether to enable it.
CDS Hooks is an HL7 standard that lets an EHR call an external service at points in the clinician's workflow. This can be as simple as opening a chart or signing an order. The service returns cards with information, suggestions or a link that opens a SMART app.
If you are building a read-only proof of concept in a sandbox it takes around 2 to 4 weeks. However, if you are launching a read-only app at the first site, it can take 3 to 5 months, mainly due to security reviews, scope approvals and testing schedules.
Nayan is a content professional, specializing in research-driven content creation across emerging technologies, software, and digital solutions. He combines strong research skills with a focus on creating clear, engaging, and informative content for technical and business audiences. In his role, Nayan works closely with different teams to research topics, develop content strategies, and create content that communicates complex concepts in a simple and accessible way. His work spans technology-focused articles, thought leadership, and business-oriented content, with an emphasis on accuracy, clarity, and audience relevance. With a growing interest in Generative AI and emerging technologies, Nayan continues to explore new developments in the technology landscape and how they can translate into practical value for businesses and users.
