Launching SMART on FHIR apps in OpenEMR

A planning and configuration guide for running third-party SMART on FHIR v2.2.0 apps against OpenEMR, covering launch types, launch context, approval and read review.

On this page

How SMART on FHIR apps launch in OpenEMR

The approver is your organization, and the boundary is the scope a client is granted. OpenEMR's FHIR API supports SMART on FHIR v2.2.0 on top of OAuth 2.0 and OpenID Connect, with PKCE for public apps and granular scopes, so each third-party app can be limited to the resource types it actually needs. A SMART launch is the sequence in which an app obtains a token and the context it may use: the user signs in, the app receives an authorization code, and the token it exchanges for carries the scopes the user and administrator allowed. This section covers four decisions that determine what an app can read: the launch type, the launch context, the app's registration and approval, and the scope review that follows.

The first decision is the launch type. An EHR launch starts inside OpenEMR, where a clinician opens the app from the chart and the app receives patient or encounter context from the session. A standalone launch starts outside OpenEMR, where the app asks the user to pick a patient or the app needs its own sign-in flow. Each type changes which context parameters the app requests and which user identity the token represents. Confirm with the app vendor which launch types it implements and which context it expects, because an app built only for standalone launch will not behave as intended inside the chart, and the reverse is also true.

Before any launch, the app must be registered as a client in OpenEMR and approved by an administrator. Confidential clients authenticate with a secret or key, while public clients such as browser or mobile apps rely on PKCE. Ask the vendor which client type it uses and what redirect addresses it needs, then review the requested scopes line by line against the clinical purpose. The exact registration screens, approval workflow and client settings should be confirmed in the OpenEMR version you run, since the 8.x line has had security fixes in its FHIR API, and the OpenEMR FHIR README is the next place to check the current scope list.

What you need in place before any SMART app launches

A SMART on FHIR launch is only as trustworthy as the environment behind it. The items below are the prerequisites that have to exist before a single app is registered, so that each launch can be traced to a version, a secure endpoint, a known user and a named approver.

Supported OpenEMR version and runtime

Confirm that the instance runs a current release line before you test any app. Recent OpenEMR releases require PHP 8.3 or later and run on a MySQL- or MariaDB-compatible database. Check the release notes for the version you run, since 8.3.0 and 8.4.0 both fixed security issues in the FHIR API. Plan patching so the version you test against is the version you launch against.

OpenEMR releases

FHIR API enabled and reachable over HTTPS

SMART launches depend on the FHIR endpoint, the authorization server and the token exchange all being reachable by the app and the user's browser. Serve everything over HTTPS only, and confirm which ports are exposed at the edge. Confirm the exact FHIR and SMART settings for your version in the FHIR README before you configure anything, because enablement steps and scope handling can change between releases.

FHIR README

Hardened web server baseline

Apply the basic hardening steps the Securing OpenEMR guide describes before exposing the API. Remove setup.php and other admin scripts after installation, and block direct web access to sites/*/documents so uploaded files cannot be fetched by URL. An app that obtains a token should never be able to reach files that the API does not expose.

Securing OpenEMR guide

Identity source for OpenEMR users

Decide where clinician and staff identities come from before launch, because the user on whose behalf an app runs is the user whose permissions bound the data. Options include local accounts, LDAP or Active Directory, and Google Sign-In. Note that directory login still requires the user to exist in OpenEMR, so provisioning and deprovisioning must be handled in both places. Enable multi-factor authentication for any user who will launch apps.

Named owner for app approval

Assign one accountable person or role to approve, reject and periodically review each SMART app before it reaches clinicians. This owner decides which scopes an app may request, which patients and resources it can read, and whether it needs a confidential or public client registration. Without a named owner, approvals drift into informal requests that no one reviews again.

Separate test environment

Run every app first against a non-production OpenEMR instance that holds synthetic or de-identified data, with the same version, PHP runtime and FHIR settings as production. Test launches, scope prompts and failure paths there. Production should receive only apps whose registrations and data access were reviewed in the test environment, and the two environments should not share client credentials.

EHR launch starts in OpenEMR, standalone launch starts in the app

The EHR launch begins in the OpenEMR chart, which sends the clinician's browser to the app with a launch value that the app passes back to the authorization server. The standalone launch begins in the app, which sends the browser to authorization with no launch value. In both flows the OpenEMR authorization server issues the access token and launch context, and the app then calls the FHIR API with a bearer token. Check which boundary the browser crosses, and confirm which context values the token carries.

Two entry points converge at authorization, where the token and launch context are issued.

Choosing between EHR launch and standalone launch

In an EHR launch, a clinician opens the app from an entry point inside OpenEMR while a patient chart is already open. The launch carries launch context, such as the current patient and, if OpenEMR supports it for the app, the current encounter, so the app does not ask the user to search for a patient. The user sees the app open for the patient already in view. This path suits tools that only make sense for one patient at a time, such as a medication reconciliation helper or a structured form.

  • Initiator: a clinician or staff member, from an app entry point configured in OpenEMR.
  • Context delivery: the app receives patient and, where supported, encounter context through the launch, and should not query for a different patient.
  • User experience: the app opens for the patient in view, with no patient selection step.
  • Extra review: test what the app does when the clinician switches to another chart, and confirm it cannot read beyond the launch context.
  • Verification: launch against a test patient you control and record exactly which context fields arrived.

Illustrative example: a reconciliation tool launched from an open chart should need only the medication scopes for that patient. Confirm which launch parameters and context types OpenEMR supports at your version before you approve the app.

How to set up a SMART on FHIR app launch in OpenEMR

This sequence takes a third-party SMART on FHIR app from disabled to a verified test launch in one OpenEMR site, with each step leaving a recorded check that the next step depends on. It gives security, compliance and integration owners a repeatable record of who approved what, which scopes were granted and how the launch was tested.

  1. Confirm the FHIR API and SMART settings for the site

    An administrator confirms that the FHIR API is enabled for the target OpenEMR site and that the SMART on FHIR and OAuth 2.0 settings are active, using the FHIR API and client settings in the administration area. Confirm the site's FHIR base URL and that it is served over HTTPS only, following the guidance in the Securing OpenEMR guide. Close the step by requesting the FHIR capability statement from the site's base URL and checking that it lists SMART on FHIR v2.2.0 and the OAuth 2.0 security extensions. If the capability statement does not show SMART, stop here and check the settings for that site before registering any app.

  2. Register the app and choose its client type

    Register the app with the site's OAuth client registration, recording the app owner, vendor contact, intended user group and the business purpose of its data access. Choose a confidential client when the app can keep a client secret on a server it controls, and a public client when it runs in a browser or on a device; public clients must use PKCE. Confirm with the app vendor which client type and authentication method it supports, including whether it needs JWKS-based client authentication. The step closes when the registration appears in the client list with a status that shows it is pending approval and not yet usable.

  3. Define the granular scopes the app requests

    Ask the app vendor for the exact list of SMART scopes it needs, such as read access to specific FHIR resource types, and reject broad or wildcard requests that the app does not need for its stated function. Record each scope against the registration so the approver can see what the app will be able to read and whether it needs patient-level or user-level access. Confirm that scopes match the resources the app's documentation names and that any system-level access is justified separately. The step closes with a written scope list attached to the registration that an approver can review without reading the app's code.

  4. Configure the launch type and redirect URIs

    Set the app's launch type as an EHR launch, where OpenEMR passes the user and patient context to the app from inside the chart, or a standalone launch, where the app starts on its own and the user selects the patient after signing in. Enter the exact redirect URIs the app will use, copied from the vendor's configuration with the protocol, host, path and port matching, and do not add wildcard or localhost entries left over from testing. Confirm that the launch type matches how clinicians will reach the app. The step closes when the registration shows the chosen launch type and a redirect list that matches the vendor's written values.

  5. Approve the app for the intended users

    A designated approver, separate from the person who registered the app, reviews the owner, scope list, launch type, redirect URIs and the intended user group, then approves the registration only for the sites and users who need it. Confirm that the approval is recorded with the approver's identity and date in the site's audit trail. Where your organization requires a review by privacy or security staff, complete that review before approval, since OpenEMR does not supply that sign-off itself. The step closes when the registration status changes to approved and a user outside the approver group can see the approved scopes in the client list.

  6. Run a test launch with a test patient

    Using a test patient that holds no real health information, have a test user launch the app from the chosen launch type, complete sign-in and accept the scope prompt. Check that the app receives a token and that the token's scope matches the approved list, not a broader set. Ask the app to read the resources it needs for the test patient and confirm that it cannot read resources outside the approved scopes, such as a different patient or a resource type that was not requested. The step closes when the test produces a token response with the expected scopes, the app returns only the approved data, and the launch is visible in the audit log.

  7. Verify the audit trail and document the launch

    Review the OpenEMR audit log for the test launch and confirm that it records the app's client identity, the user, the patient context and the resources accessed, and that the entries are retained according to your policy. Compare the logged scopes and resource requests with the approved scope list and investigate any gap before the app goes live. Save the capability statement result, the scope list, the approval record and the test results in your change record so the configuration can be reviewed at the next upgrade or security assessment. The step closes when the audit entries match the approved configuration and the evidence file is complete.

Mapping launch context and scopes to FHIR data

This table maps each thing a SMART launch can supply (patient, encounter, user identity and requested scopes) to the FHIR data it governs, the review question to ask and the item to confirm in the FHIR README or on your running instance. Use it as a checklist during app review: no app should receive a scope or resource that lacks a clinical purpose written next to it.

Launch elementData it governsReviewer questionWhat to confirm
Patient contextPatient-level resources in the app's granted scopes, such as demographics and clinical records for one chartDoes the app need one patient at a time, or does its purpose require browsing across the panel?Which patient-context behavior the launch uses in your OpenEMR version, and whether the app can request a patient outside the launch
Encounter contextEncounter-linked resources the app can read during an encounter launchIs encounter scope needed, or would patient scope cover the workflow without exposing more visit data?Whether encounter context is supported in the FHIR README for the release you run, and which resources it affects
User identity (fhirUser)The practitioner or user record the app sees for the logged-in clinicianDoes the app need to know who is signed in, and is that identity used for audit or only for display?How the user identity claim is issued through OpenID Connect and which OpenEMR user record it maps to
Requested read scopesIndividual resource types the app may read, as granted at approvalCan each requested resource be tied to a documented workflow step in the app?The exact scope names and granularity in the FHIR README for your version, and the scope list shown on the consent screen
Requested write scopesResources the app may create or update in the chartIs any write access justified, and who in clinical operations approves changes to the chart?Whether write scopes are offered at all for each resource type in your release, and whether writes are logged in the audit trail
Offline or refresh accessLong-lived access beyond a single sessionDoes the app need to work when the clinician is not present, and how is that access revoked?Whether the app can request refresh-type access in your version and how revocation is performed in the admin console
Granted versus requested scopesThe subset an administrator actually approves for the clientDoes the approved set match the documented purpose, with no extra resources included for convenience?That the approved scope list in the client record matches the app review file, and that a test login returns only those resources

How app approval and read review should work

Approval should be a named decision, not a side effect of a working launch. A SMART app that completes the launch and returns data has only proved that the plumbing works. Before any app is registered for production use, name one accountable approver, usually the privacy or security officer with input from the clinical owner of the workflow, and require a written record of who approved which app, for which purpose, with which scopes. Compare each scope the app requests against its stated purpose. A scheduling tool has no business asking for broad clinical document access, and a patient-facing app that needs only demographics should not hold clinical resources. Ask the vendor to justify every scope in writing, and reject any that the purpose does not require. Scope definitions for OpenEMR's FHIR API are documented in the OpenEMR FHIR README, so reviewers can map each requested scope to the resource types it exposes.

Decide early whether the app needs a business associate agreement. If an app vendor creates, receives, maintains or transmits ePHI on behalf of your organization as a covered entity, the vendor is likely a business associate. Under 45 CFR 164.314(a)(2)(i), the required contract must commit the business associate to comply with the Security Rule, flow the same terms to subcontractors that handle ePHI, and report security incidents to you. Whether a given app triggers this requirement, and what the agreement must say, is a question for your counsel, not the integration team. Apps that run entirely on the patient's device under the patient's own control may fall outside it, but confirm that with counsel for each app rather than assuming it.

Test what each app can actually read, and revisit approval when it changes. A manifest describes what an app asks for, not what the server returns. Run each approved app against synthetic or de-identified test patients, record which resources and fields come back for each scope, and compare the results with the reviewer's notes. Repeat this test when the app ships a new version, adds a scope, or changes its data handling, and when OpenEMR is upgraded, since security fixes in FHIR APIs have been released in recent versions. Treat re-approval as a trigger in your change process, and keep a register of approved apps, scopes and review dates that auditors and your security team can inspect.

Security controls for SMART apps in OpenEMR

A SMART app that reads patient data is only as safe as the EHR it connects to and the clinician accounts that approve it. The cards below cover the platform controls, identity controls and app-level controls to put in place and verify before and after a launch. Each one closes a different gap between who can open an app and what that app can see.

HTTPS-only access and exposed ports

Allow only HTTPS to the OpenEMR site, and consider opening only port 443 at the firewall, as the Securing OpenEMR guide describes. SMART launches and token exchanges depend on that TLS endpoint, so confirm that the redirect URIs your apps register also use HTTPS. Remove setup.php and other admin scripts after installation, and block direct web access to sites/*/documents. Test each exposed path from outside your network.

Securing OpenEMR guide

MFA and strong passwords for clinicians

A launched app inherits the permissions of the clinician who approves it, so a stolen clinician password can expose every patient that user can reach. The Securing OpenEMR guide recommends multi-factor authentication and strong password policies. Enforce both for clinician and admin accounts, and confirm the password rules in Administration Globals match your policy, including expiration and reuse limits.

Passwords blocked on reuse
5 prior

Narrowest scopes per app

Grant each app only the granular SMART scopes its workflow needs, for example read access to one resource type instead of broad patient access. Review the requested scopes against the app's stated purpose before approval, and ask the vendor to justify any write scope. Record the approved scope list with the client so later changes are visible.

Client secrets out of front-end code

Confidential apps hold a client secret that must stay on a server you control. Browser-based and mobile apps are public clients and should use PKCE rather than a shared secret, which any user can extract from the code they download. Check the app's source or build output for embedded secrets, and confirm that the vendor stores tokens server-side where possible.

Reviewing and revoking unused clients

Registered clients that nobody uses still hold valid access paths into the record system. Keep a register of every client with its owner, purpose, scopes and last successful launch. Revoke clients whose project has ended, whose owner has left, or whose vendor no longer supports them. Repeat this review on a fixed schedule set by your security team.

Need-to-know access and audit logging

The CNIL fined Hopital Prive de la Loire EUR 500,000 on 3 September 2026 under GDPR Articles 32 and 34. It found that external access to the patient record system lacked VPN and multi-factor authentication, and that access control ignored the care team's need to know. Apply the same test to SMART launches: require MFA for any external access, limit each app to the patients and resources its users need, and keep logs of launches and data reads that you can review.

Common launch failures and how to fix them

This table pairs each common SMART on FHIR launch failure in OpenEMR with its likely cause, what to check on the OpenEMR and app sides, and the general fix. Read it in order of the launch sequence, starting with redirect and client setup, then scopes and context, then data access. Confirm version-specific behavior against the OpenEMR FHIR README before changing settings.

FailureLikely causeWhat to check and fix
Redirect URI mismatchThe redirect URI sent in the authorization request does not exactly match the one registered for the client, including scheme, host, port, path and trailing slash.Compare the registered URI with the app's configured value character by character. Correct whichever side is wrong and re-register if needed. Confirm the registration steps in the FHIR README for your release.
Missing or mismatched scope requestsThe app asks for scopes the registered client is not allowed to receive, or it uses resource scopes in a different form than OpenEMR expects.Check the scopes on the client registration against the scopes the app requests. Remove scopes the app does not need and add missing ones through a reviewed change. Test one scope at a time to isolate the mismatch.
Launch context not arrivingThe app is started as a standalone launch when it expects an EHR launch, or the launch parameter is dropped, expired or not passed through the browser redirect.Confirm which launch type the app supports and how it is started from OpenEMR. Check that the launch and issuer values reach the app and are used within their short validity window. Retry the launch from a clean session.
Public client missing PKCEThe app is registered as a public client but does not send a PKCE code challenge, or the authorization server rejects the verifier during token exchange.Confirm the client type in the registration and that the app generates a code verifier and challenge. Ensure the same verifier is sent at token exchange. OpenEMR supports PKCE for public apps as described in the FHIR README.
Token issued but resources emptyThe token has fewer scopes than the app needs, the patient or encounter context is missing, or the requested resource types are not in the US Core 8.0 set the server exposes.Decode the granted scopes and confirm the patient context is present. Verify the user or patient has data in the requested resource. Test with the FHIR capability statement and a direct read to separate authorization from data problems.
Works at one site but not another in multisiteEach site has its own FHIR base URL and client configuration, so the app is registered at one site only or points at the wrong base address.Confirm the app's base URL and registration exist for each site. Compare site-specific settings and the launch URL used by each site's users. Register the app per site and test each site separately before rollout.
Unclear app access after approvalApproval was granted based on the app's description, and the granted scopes or user access were not reviewed against what the app actually reads.Review granted scopes and the users or roles permitted to launch the app. Check the audit trail for reads. Re-approve after any scope change, and confirm approval steps with your own governance process.

Questions buyers ask about launching SMART apps in OpenEMR

What drives the cost of launching a SMART on FHIR app in OpenEMR?

The cost scales with three things: the number of apps, the scopes each app requests, and how deep the testing goes. Each app needs its own registration, a decision on whether it is an EHR launch or a standalone launch, a review of what it can read, and a test pass against a non-production OpenEMR site. Apps that request broad scopes take longer to review because each resource and permission needs a justification. One-time work includes setup and the first review cycle. Recurring work includes re-review when an app adds scopes, retesting after OpenEMR upgrades, and reviewing registered clients over time. When you request a quote, ask for the effort split by app, by scope and by test stage, and ask which items recur.

How long does a first SMART app take to approve and test?

The honest answer depends on the app's scopes, the state of your OpenEMR environment and how quickly your reviewers respond. No duration is fixed by the software. A first app usually takes longer than later ones because your team sets the registration pattern, the approval steps and the test checklist. Delays tend to come from unclear launch context needs, from apps that ask for more scopes than their function requires, and from waiting on clinical sign-off. Ask any partner for the schedule in writing, with a named step for each approval gate and the testing stage it depends on. Your own team can agree the same gates before the first app arrives, which shortens the second and third reviews.

Can our own team launch SMART apps in OpenEMR without outside help?

Yes, if your team has engineers who can administer OpenEMR, configure OAuth 2.0 clients and read OpenID Connect and SMART launch flows. OpenEMR's FHIR API implements SMART on FHIR v2.2.0, with OAuth 2.0, OpenID Connect, PKCE for public apps and granular scopes, so the building blocks are in the product. The harder part is judgment: deciding which scopes an app should hold, testing that launch context does not expose data outside the user's role, and documenting the decision for auditors. Teams without this experience often start with one pilot app and an external review of the registration and scope choices. Decide early which of these tasks you will keep in-house and which you will outsource.

What does the work need from clinical and security staff?

Clinical staff decide what an app is for and which patient data it needs to do that job. Security staff decide whether the requested scopes, launch type and user roles match the minimum access the use case needs. Both groups should sign off before an app reaches production. Clinical input covers the workflow, the context in which the app opens (for example, from a patient chart or as a standalone tool) and which data types matter. Security input covers authentication, whether the app is public or confidential, how client secrets or keys are stored, how sessions expire and how access is logged. OpenEMR's Securing OpenEMR guide also recommends multi-factor authentication and HTTPS only, which should be confirmed before any app launches.

Does a SMART app need a business associate agreement before go-live?

Whether a business associate agreement is needed depends on who handles the electronic protected health information, not on the app launch itself. Under 45 CFR 164.314(a)(2)(i), a business associate contract must require the business associate to comply with the Security Rule, flow the same terms to subcontractors that handle ePHI and report security incidents to the covered entity. If a vendor's app receives or processes ePHI on your behalf, get legal counsel to confirm whether a contract applies and what it must say. A review of the app's data handling, logging and retention is also a practical step before approval. HIPAA has no certification for apps, so ask for documented evidence, not a certificate.

How do we review what each SMART app can read?

Start from the scopes the app requests and compare each one with the stated use case. Granular scopes in OpenEMR's FHIR API let you grant specific resource types rather than broad access, so check whether each resource in the list is truly needed. Record the decision for each scope, the user roles that can launch the app and the patient or practitioner context it receives. Then test the app with accounts from each role to confirm it cannot see records outside that role. Repeat the review whenever an app changes its scopes or after OpenEMR upgrades, because security fixes can change API behavior. The HIPAA Security Rule expects access controls that limit ePHI to users who need it, so this review should be written down.

Which OpenEMR version should we test SMART apps against?

Test against the OpenEMR version you plan to run in production, and keep a non-production site on the same release. Recent releases need PHP 8.3 or later and a MySQL- or MariaDB-compatible database. The project's 8.4.0 and 8.3.0 releases fixed security vulnerabilities in the FHIR API, so confirm your patch level before connecting any app. Check the release notes for each upgrade, because API behavior and scope handling can change between versions. Ask your team or partner to record the OpenEMR version, the SMART version and the app version in each review, so audit evidence matches what ran at go-live.

How DeployOpen scopes and delivers SMART app launches

DeployOpen plans, implements and hardens self-hosted open-source platforms inside your own infrastructure, including OpenEMR. For SMART on FHIR app launches, we scope which launch types, app registrations and resource scopes your organization needs, then build, test and document them so your security and clinical teams can review each app before it reaches patient data.

How we scope

  • Inventory each third-party app, its launch type, and the FHIR resources and scopes it requests
  • Agree in writing which EHR launch and standalone launch paths your organization will allow
  • Define who approves app registrations and what evidence they review before approval

How we build

  • Configure the FHIR API, OAuth 2.0 and OpenID Connect settings on your OpenEMR instance
  • Set up app registrations with confidential or public client settings, PKCE and granular scopes
  • Test launch context, token scope and denied-access paths against the approved app list

How we hand over

  • Deliver a written record of approved apps, registration settings, scopes and launch configuration
  • Document the review steps your team follows when a new app requests access
  • Walk your administrators through revoking registrations and checking audit logs

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing first
  • Ongoing support, upgrades and continuous testing are available as a retainer
  • Retesting after OpenEMR upgrades or new app requests is confirmed in the written scope

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.