Epic, Oracle Health, athenahealth and MEDITECH all expose clinical data through FHIR R4 APIs secured with SMART on FHIR, which makes the first successful sandbox call the easy part of any FHIR API integration. Getting from that call to live data at a paying hospital takes far longer, and the delay comes from data mapping, write-back rules, patient matching and per-customer activation, not from the HTTP requests.
The short answer
- FHIR API integration = a use-case data contract + SMART on FHIR authorization + per-EHR and per-customer validation + clinical data mapping.
- Epic and Oracle Health each run their own developer programs; approval or listing never activates your app at every customer.
- The sandbox proves your protocol code; the long delays come from mapping, patient matching, write-back rules and customer security reviews.
- Plan timelines by workstream (vendor onboarding, engineering, contracting, integrated testing, rollout), not as one number.
Key takeaways
- SMART on FHIR handles authorization; FHIR alone does not guarantee identical resources or meaning across EHRs.
- Epic Showroom listing, Epic technical approval and per-customer activation are three separate gates, and no vendor approval unlocks every customer.
- Sandbox success proves protocol handling, not production data completeness, terminology or write-back policy.
- Most delays come from data mapping, patient matching, write-back rules and customer approvals, not API calls.
- OAuth scopes are not consent records, and vendor approval does not make an app HIPAA or GDPR compliant.
What is FHIR API integration, and what does SMART on FHIR add?
FHIR API integration connects your application to an EHR’s FHIR server so it can read, and sometimes write, clinical data as standardized resources. SMART on FHIR is the layer that decides who may do that and in which context.
HL7 FHIR defines resources such as Patient, Encounter, Observation, Condition, MedicationRequest, DiagnosticReport, DocumentReference and Immunization, plus references between them, search parameters, operations and REST interactions. Each EHR exposes these at its own base URL, often a different one for every customer.
Here is what FHIR does not give you:
- An app authorization model.
- A guarantee that every EHR supports the same resources, searches or writes.
- Identical clinical meaning across organizations. Two hospitals on the same EHR can code the same lab test differently.
The SMART App Launch Implementation Guide fills the first gap. It adds OAuth 2.0 authorization, launch context (which patient, which user), discovery through the server’s .well-known/smart-configuration document, scopes and optional OpenID Connect identity. A valid access token gets you in the door. It says nothing about whether the data behind it fits your product.
Versions matter less than teams expect, but version support still varies more than they’d like: check it per endpoint, not per vendor. FHIR R4 is the common baseline; R4B and R5 exist. In the US, US Core profiles constrain R4 around USCDI, which is a list of required data elements, not a FHIR schema. US Core is not a baseline for EU deployments.
One more trap: a Must Support flag does not mean every record contains that element. Data can still be absent or carry a data-absent reason.
Start with a data contract, not the API docs
Teams that code first end up rebuilding when the first customer’s data doesn’t match the sandbox. A usable data contract answers five questions for each workflow:
- Who triggers it: a clinician inside the chart, a patient on their phone, or a nightly job with no user.
- Which resources and profiles: for example US Core Observation (laboratory) plus DiagnosticReport, not just “labs.”
- Which searches: parameters like patient, category, code, date and status, plus any _include you rely on.
- Read or write: and if write, what the EHR does with it afterward.
- Freshness: on-launch read, polling interval, event feed or batch.
Then pull the CapabilityStatement from every target endpoint and diff it against the contract. Treat it as a claim, not proof: advertised capability does not show production behavior, and it does not show that your app will be granted access.
Which SMART launch pattern and scopes does your app need?
The three SMART patterns differ in who starts the session and where patient context comes from. Pick the wrong one and you will rework the authorization layer.
In an EHR launch, the EHR opens your app with iss and launch parameters. Your app fetches the SMART configuration from that issuer, redirects the user to the authorization endpoint, exchanges the returned code at the token endpoint, and receives an access token plus context such as the patient ID.
The non-negotiables: exact redirect-URI registration, a state value, PKCE with S256, an issuer allowlist (never trust an arbitrary iss) and a correct aud. Browser-only and native apps are public clients and cannot protect a reusable secret, so don’t ship one. Tokens, launch context and PHI never go into ordinary application logs.
Backend Services is for system-to-system work. It is not a way to implicitly inherit a clinician’s permissions, and each customer has to provision the system scopes explicitly.
Patient, user and system scopes
The prefix defines whose access you request: patient/ limits access to the patient in context, user/ covers what the signed-in user can see, and system/ authorizes a backend with no user or patient.
SMART 1.x uses patient/Observation.read; SMART 2.x uses capability letters like patient/Observation.rs (read and search) and, where supported, granular scopes narrowed by category. Request what each vendor declares. Translating scopes mechanically between versions is a common source of silent denials.
openid and fhirUser identify the user, launch and launch/patient request context, and online_access or offline_access govern refresh tokens. Two distinctions trip up product teams: the authenticated practitioner is not the patient whose chart is open, and an OAuth scope is not a legal consent record. Record consent separately.
Does Epic or Oracle Health marketplace approval give your app access to every customer?
No. Vendor approval makes your app eligible for production; each health system still decides whether to switch it on, which scopes to grant and how to configure it. Budget that step per customer, because it runs through their security review, their analysts and their change calendar.
Epic FHIR integration
Work starts with the Epic on FHIR developer documentation, developer registration, sandbox testing and app registration. After that, three separate gates apply, and teams regularly confuse them:
- Listing: visibility in Epic Showroom, a marketing and discovery matter.
- Technical approval: Epic’s review that allows production use of the APIs you request.
- Customer activation: repeated for every Epic health system you sell to.
Requirements differ by app category and by the APIs you call, and Epic revises its programs. Plan from the current Epic on FHIR and Showroom documentation. An App Orchard checklist from an older project describes a program Epic has since replaced, so don’t reuse it.
Oracle Health FHIR integration
Oracle Health integration targets Millennium-based environments through Oracle Health’s current developer program, with tenant-specific endpoints and per-customer configuration. The standards match Epic’s; the registration path, process and commercial terms do not. Legacy Cerner documentation still helps with technical behavior, but confirm approval and commercial details against current Oracle Health sources, since the program changes often.
athenahealth, MEDITECH Expanse, Veradigm, NextGen Healthcare and eClinicalWorks each have their own API coverage, developer program, testing procedure and activation requirements. No single approval unlocks FHIR across vendors, so plan a separate onboarding track for every EHR on your roadmap.
What should you test in an EHR sandbox before requesting production access?
Test every failure mode you can provoke. The sandbox only proves behavior against synthetic data; it cannot show production completeness, customer terminology, patient-matching quality, throttling, write-back policy, downtime behavior or workflow fit.
A test plan that holds up in vendor review covers:
- Happy paths, plus empty and partial charts.
- Searches returning multiple pages.
- Local codes and missing codings.
- Duplicate or merged patients.
- Revoked authorization, expired tokens and denied scopes.
- Malformed or unsupported requests.
- HTTP 401, 403, 404, 409, 422, 429 and 5xx responses.
- Ambiguous write failures, such as a timeout after a create.
Inferno, the HL7 FHIR Validator, HAPI FHIR, Firely tooling and Touchstone help with conformance. Passing them is useful evidence, not a substitute for vendor review, customer-integrated testing, security assessment or clinical validation.
Each environment proves something different. The sandbox proves your protocol handling. The customer’s test environment proves their configuration and data shape. A limited production pilot proves volume, timing and whether clinicians actually use the thing.
Why does the same FHIR query return different data in another EHR?
Servers differ in search support and paging, and organizations differ in how they code and record data. Most FHIR data mapping rework traces back to a handful of mistakes:
- Stopping at page one. Searches return a searchset Bundle; follow the next links. Page size, _count, _include, sorting and chained searches vary by server, so keep queries bounded.
- Treating IDs as global. A logical ID is unique only within one server and resource type. Store tenant, base URL, resource type, logical ID, business identifiers, version and provenance.
- Weak patient matching. Prefer EHR-supplied context. Otherwise use governed identifiers, handle merges, and never match on name plus birth date alone.
- Flattening codes to text. A CodeableConcept can hold several codings. Keep system, code, display and original text. Expect LOINC, UCUM, SNOMED CT, RxNorm and CVX alongside local codes and vendor extensions.
- Treating Observation as a lab table. Labs, vitals and social history use different categories and profiles. Blood pressure often arrives as one panel with systolic and diastolic components, though some systems send separate Observations. Keep the original value and UCUM unit.
- Merging medication resources. MedicationRequest (ordered), MedicationStatement (reported), MedicationDispense (filled) and MedicationAdministration (given) carry different certainty.
- Ignoring status. clinicalStatus, verificationStatus and entered-in-error or corrected records change what a row means.
- Assuming UTC. Preserve offset and precision, and keep authored, effective, issued and recorded times apart.
If you normalize into a canonical model, store the source resource and unmapped extensions next to it. When a clinician asks six months later why a value looks wrong, you need the original.
Writing data back to the EHR
Read support does not imply write support. Create, update, patch, conditional operations, transactions, Provenance requirements and validation rules vary by API and by customer, and many organizations require clinical review before external data enters the chart. Design FHIR write-back last, once you know each target’s rules.
The classic production bug: a create times out, the client retries, and the patient now has two identical results. Use conditional create where supported, or check for the record before retrying.
Match the delivery pattern to the job. FHIR REST suits on-demand reads for one patient. HL7 v2 feeds remain the workhorse for ADT and results events. FHIR Subscriptions and vendor event feeds push notifications where available, but support is uneven. Bulk FHIR $export returns asynchronous NDJSON for population data and fits poorly with low-latency needs. CDS Hooks trigger decision support inside the clinician workflow.
Direct EHR connectors or an interoperability platform?
Integrate directly when you serve one or two EHRs and need full clinical detail. Use a platform when breadth across many EHRs matters more than fidelity. Most mature products end up hybrid.
Redox, Health Gorilla, InterSystems HealthShare and NextGen Connect (formerly Mirth Connect) solve different parts of the problem. None removes EHR-specific mapping, commercial agreements or customer activation entirely. A common split: direct Epic and Oracle Health connectors for the largest customers, a platform for the long tail. Building the direct side is classic software integration work: per-tenant configuration, mapping layers and monitoring.
How long it takes and what drives the cost
There is no reliable universal number, and anyone quoting one without seeing your workflows is guessing. Plan by workstream: vendor onboarding and app review; engineering (authorization, data contract, mapping, error handling); customer security review and contracting; customer-integrated testing; pilot and rollout.
Engineering is rarely the long pole. Contracting, security questionnaires and customer test windows usually are, and they repeat for every health system. Cost scales with the number of EHRs times the number of customers, whether you write back, how many resource types you map, and how much clinical validation the output needs.
Before go-live, confirm per-customer scopes are granted, endpoints and issuers are allowlisted, a clinician has reviewed the mapping, failure tests pass in the customer environment, monitoring is live, and the customer’s analysts have agreed a rollback plan.
What security, HIPAA, GDPR and audit controls does a FHIR integration need?
A HIPAA FHIR integration needs operational and contractual controls on top of OAuth. Vendor approval, encryption or SMART conformance alone do not make an app compliant.
Operational controls:
- Per-tenant configuration and least-privilege scopes.
- Key and secret rotation.
- Retry with backoff and jitter, honoring Retry-After on 429s.
- Reconciliation jobs plus freshness and completeness monitoring.
- An auditable change process for mappings and configuration.
- API hardening against the OWASP API Security Top 10.
Legal obligations depend on each party’s role. Depending on the arrangement, you may need a business associate agreement or GDPR data-processing terms, regional hosting, retention limits, risk assessments, audit trails and a breach-response process.
One misconception to clear up with your sales team: ONC certification covers the EHR’s API capabilities. It is not certification or endorsement of your app, and it should not appear in your pitch as if it were.
FAQ
What is FHIR API integration?
It is the work of connecting an app to an EHR's FHIR server: defining the workflows and FHIR profiles you need, implementing SMART on FHIR authorization, and validating reads, writes and error handling against Epic, Oracle Health or another EHR before each customer activates the app.
Is SMART on FHIR the same as FHIR?
No. FHIR defines the data resources and REST API. SMART on FHIR adds OAuth 2.0 authorization, launch context, discovery, scopes and optional OpenID Connect identity on top.
Does Epic Showroom approval give my app access to all Epic customers?
No. Showroom listing is about visibility, and Epic's technical approval makes production use possible. Each Epic customer must still activate your app, grant scopes and configure it, usually after its own security review.
Can my app write data back to Epic or Oracle Health?
Sometimes. Write support varies by API, resource and customer, and many organizations require clinical review before external data enters the chart. Confirm each target's rules before designing write-back, and guard against duplicate creates on retries.
Should we use Redox or Health Gorilla instead of direct connectors?
Platforms help when you need breadth across many EHRs. Direct connectors give full clinical detail for a few large customers. Neither removes EHR-specific mapping or customer activation, so many teams run both.
How long does an EHR integration take?
There is no reliable universal number. Engineering is rarely the bottleneck; vendor review, customer security questionnaires, contracting and test windows usually are, and they repeat for every health system.
If you are planning an Epic or Oracle Health connector and want a second opinion on the data contract and rollout plan, Artezio’s healthcare software development team builds SMART on FHIR integrations for health tech and pharma products.












