A SMART on FHIR app that works in a vendor sandbox has proved one thing: it can launch, get a token and read sample data. Production is different. Each EHR vendor has its own registration and activation steps, each customer has its own endpoints and data, and real patient records are messier than any sandbox.
This post covers what changes on the way from sandbox to production when an app must run at customers of Epic, Oracle Health (Cerner) and athenahealth: configuration per vendor and per customer, scopes, real data, tokens, testing at customer sites, monitoring and support.
What changes when a SMART on FHIR app goes from sandbox to production?
Taking a SMART on FHIR app to real customers?
Our FHIR and SMART on FHIR development service builds and hardens apps for production EHR environments.
Moving a SMART on FHIR app from sandbox to production changes the endpoints, credentials, scopes, data and support model: each EHR vendor and each customer needs its own configuration, real records expose missing and unusual data, and failures now affect clinicians. Agnotic Technologies prepares apps for that move across several EHR vendors.
The SMART App Launch implementation guide uses OAuth 2.0 and OpenID Connect so that apps can launch from an EHR with the user's and patient's context and only the access scopes they were granted.
What does a sandbox prove, and what does it not?
A sandbox proves that the app can complete a launch, exchange tokens and call the APIs it needs with sample data. It does not prove that customer configuration, real data volumes or production security rules will work.
- Proved: launch sequence, token exchange and basic reads against sample patients.
- Not proved: customer endpoints, enabled scopes and app activation.
- Not proved: real data that is missing, coded locally or very large.
- Not proved: behavior under production network, security and load conditions.
Configuration per vendor and per customer
Hold configuration in two layers: what is the same for every customer of one EHR vendor, and what differs for each customer. Hard-coding a sandbox endpoint or client identifier is the most common reason an app fails its first production launch.
- Vendor layer: registration details, supported launch types and scope syntax.
- Customer layer: issuer URL, client identifier, enabled scopes and contacts.
- Discovery: read each server's published SMART configuration rather than assuming endpoints.
- Environments: separate settings for each customer's test and production systems.
How do registration and activation differ by vendor?
Each EHR vendor has its own process for registering an app and for letting a customer turn it on, and the steps, reviews and credentials differ. Plan each vendor's path separately and read its developer documentation before you design.
Epic publishes its FHIR API documentation and developer resources for third-party applications on open.epic.com.
For Oracle Health and athenahealth, follow each vendor's own developer program and documentation in the same way, and confirm with each customer which APIs and scopes their environment has enabled before go-live.
How should one codebase serve several EHR vendors?
Keep the core of the app on standard FHIR resources and SMART flows, and put vendor differences in a thin adapter layer. The core should never check which vendor it is talking to.
Adapters handle what genuinely differs, such as a search parameter one server does not support or a resource it returns in a different shape. Give each adapter its own test suite with recorded responses from that vendor, so a change for one EHR cannot break another.
How should scopes be handled in production?
Request only the scopes your workflow needs, and handle the case where a customer grants fewer than you asked for. Production servers may refuse or narrow scopes that sandboxes granted freely.
Read the scopes in the token response, not the ones you requested, and switch off features that depend on missing scopes with a clear message to the user. Keep scope lists per vendor, since scope syntax and supported versions can differ.
What does real patient data change?
Real data changes almost everything the sandbox hid: missing fields, local codes, long histories, unusual units and records that do not fit the profiles you assumed. Your app must show what it has and say clearly what it does not.
US Core is the HL7 FHIR implementation guide that profiles FHIR resources for the USCDI data classes used in the United States.
- Missing data: show gaps plainly rather than empty screens or errors.
- Local codes: display the text when a code is not one you recognize.
- Volume: page through large result sets and cap what is loaded at launch.
- Variation: test with records from several customers, not one.
Tokens, sessions and errors
Production sessions last longer and fail in more ways than sandbox sessions. Handle token expiry, refresh where allowed, network timeouts and server errors without losing the user's work.
Log each failure with the customer, vendor and request type, but never log tokens or patient data in plain text. A clear error message to the clinician beats a blank screen.
What will the customer's security review ask?
Before activation, most customers review the app's security: which scopes it needs and why, where tokens and patient data are stored, how long data is kept and what is logged. Have written answers ready for each vendor version of the app.
Store tokens only on the server side where possible, encrypt anything stored, and keep a data flow drawing that shows every system the data touches.
How do you test at a customer site?
Test in each customer's non-production environment with their configuration and test patients, then run a short supervised pilot in production with a few users.
- Launch: from each place in the EHR where the app will appear.
- Scopes: with the customer's actual grants, including any refusals.
- Data: with the customer's test patients and, in the pilot, real records.
- Errors: expired tokens, slow responses and server errors.
- Users: clinicians confirm the app fits their workflow.
Monitoring and support after go-live
Monitor every customer separately: launches, failures, response times and error types. A problem at one customer should be visible before their clinicians report it.
Agree support contacts with each customer's EHR team, document how to check the app's configuration on their side, and keep a runbook for the common failures, such as expired credentials or a changed endpoint after an upgrade.
What goes wrong between sandbox and production?
Most failures come from assumptions the sandbox allowed. These patterns recur.
- Hard-coded endpoints: sandbox URLs or client IDs left in code.
- Assumed scopes: features that break when a customer grants fewer scopes.
- Perfect data: screens that fail on missing or local codes.
- One vendor's habits: code written for one EHR that fails on another.
- No per-customer monitoring: failures found by clinicians first.
A worked example: one app, three EHR vendors
A care planning app built and tested in one vendor's sandbox signed customers on Epic, Oracle Health and athenahealth. Its first production launch failed because the issuer URL and client identifier were hard-coded.
The team moved settings into vendor and customer layers, read each server's SMART configuration at launch, and handled narrowed scopes gracefully. Testing with each customer's test patients exposed local codes and missing fields the sandboxes never showed.
Monitoring by customer later caught an endpoint change after one customer's upgrade before any clinician noticed. The team added that case to its runbook, along with the check the customer's EHR team used to confirm the new endpoint.
Who owns what?
Production readiness spans the vendor team, the customer's EHR team and clinicians.
- App team: configuration layers, error handling, monitoring and runbooks.
- Customer EHR team: activation, scopes, endpoints and test patients.
- Clinical champions: workflow testing and pilot feedback.
- Security and privacy: review of scopes, logging and data storage.
How do you know the app is production ready?
Measure readiness by the checks passed at each customer and by stability after go-live.
- Customers with configuration, scopes and test results recorded.
- Launch success rate by customer and vendor.
- Errors by type, and time to resolve each.
- Data gaps reported by users, by customer.
What are SMART on FHIR sandbox to production best practices?
Keep configuration in vendor and customer layers, discover endpoints from each server, request minimal scopes and handle narrowed grants, and design for missing and local data from the start.
Test at every customer with their configuration and test patients, pilot with a few users, monitor per customer and keep a runbook for the failures you will see after upgrades.
How Agnotic can help
Agnotic takes SMART on FHIR apps to production across EHR vendors: per-customer configuration, scope handling, resilience to real data, customer-site testing, monitoring and support runbooks for Epic, Oracle Health and athenahealth customers.
Prepare your SMART app for more EHRs with Agnotic
Our FHIR integration page covers the APIs, apps and data layers we build on FHIR.
Related reading on Agnotic
SMART apps, scopes and EHR vendors.


