Healthcare · Interoperability · AI

SMART on FHIR for AI apps: an authorisation checklist for clinical data access

Ambient scribes, chart summarisers and clinical agents all need to read and sometimes write EHR data. SMART on FHIR is how they should get that access. The hard questions in a health AI security review are usually about scopes, launch context and token handling, not the model.

ChecklistSumanta Mukhopadhyay8 min read6 sources
#healthcare#fhir#ai#security
CHECKLIST · HEALTHCARE · INTEROPERABILITY · AI26 Oct 2026 · 12:20 GST

A health AI product usually starts with a demo against a sandbox and a broad token. Then it meets a hospital's security review. The questions are rarely about the model. They are about which data the app can reach, on whose behalf, for how long, and how anyone would know if it reached further than it should.

SMART on FHIR answers most of those questions if it is used properly. This checklist is what I work through when designing or reviewing EHR access for AI applications.

Why it matters more for AI

Traditional SMART apps show data to a clinician who is already authorised to see it. AI apps often do more: summarise a whole record, draft notes back into the chart, or run in the background across many patients. That widens both the data an app touches and the consequences of a misconfigured scope. In the US, HTI-1 also moved certified health IT from SMART v1 to the SMART App Launch 2.0 guide for the standardised patient and population API criterion, so v2 behaviour is now the baseline buyers expect6. The policy side is covered in HTI-1 to HTI-5.

1. Scopes: ask for the least, precisely

  • Use v2 scope syntax. Permissions are expressed as suffixes from c, r, u, d and s. patient/Observation.rs grants read and search on the patient's observations; patient/Observation.cu grants create and update1.
  • Narrow with search parameters. v2 allows granular scopes such as Observation access limited to the vital-signs category15. A sepsis model that only needs vitals and labs shouldn't hold a token for psychotherapy notes.
  • Prefer patient/ over user/ and system/ wherever the use case is about one patient in context.
  • Separate read and write. If the AI drafts notes, consider a distinct, reviewable write path rather than giving the summariser create rights.
  • Check what the server actually supports. Servers advertise capabilities in their SMART configuration5; don't assume granular scopes are enforced everywhere.

2. Launch and token handling

  • PKCE with S256, always. The specification says all SMART apps shall support PKCE, servers shall support S256 and shall not support the plain method2.
  • Use EHR launch for in-workflow AI, so the patient and encounter come from the EHR's launch context, not from parameters the app constructs12.
  • Request openid fhirUser so every AI action can be attributed to an identified user2.
  • Keep tokens out of the model. Access tokens belong in the integration layer, never in prompts, logs or tool arguments the model can see or echo.
  • Be deliberate about offline access. Refresh tokens extend reach well beyond the clinician's session; request them only when the use case needs it.

The model should never hold a credential. It asks a tool for data; the tool holds the token, enforces scope and logs the call.

3. Background and population workloads

  • Use SMART Backend Services for autonomous processing, such as overnight risk scoring or quality measures. It is designed for clients with pre-authorised scopes and no user in the loop3.
  • Authenticate with asymmetric keys. private_key_jwt is the specification's preferred method because no shared secret crosses the wire; clients must support RS384 and ES3844.
  • Rotate keys through a JWKS endpoint, and treat the private key with the same controls as any production secret.
  • Use bulk export for volume, as in FHIR bulk data pipelines, rather than looping single-patient queries.

4. Agents and tools

  • One tool, one scope set. If an agent reaches FHIR through MCP servers, each server should hold the narrowest token for its job, with the controls in securing MCP servers.
  • Keep patient context fixed. An agent must not be able to switch patients by changing a tool argument; patient identity comes from the launch, not the prompt. This is a key defence against prompt injection.
  • Human approval for writes. Drafted notes, orders or messages go to a clinician for review before they are committed, as in ambient scribe architectures.

5. Evidence for the security review

  • A table of every scope requested, why, and which feature uses it.
  • Audit logs linking each FHIR call to user, patient, feature and model version.
  • Token lifetimes, refresh policy and revocation procedure.
  • Results of testing with a SMART conformance tool against the target servers.
  • A data flow showing exactly where PHI goes, including any model provider, mapped to HIPAA Security Rule controls.

How I can help

I design EHR integrations for AI products that pass hospital security reviews the first time, from scope design to agent tooling and audit. See healthcare data architecture, or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
FAQ

Common questions

What changed in SMART on FHIR v2 scopes?

SMART v2 scopes use permission suffixes drawn from c, r, u, d and s (create, read, update, delete, search), so patient/Observation.rs grants read and search on the patient's observations. Scopes can also be narrowed with search parameters, such as limiting Observation access to the vital-signs category.

Is PKCE required in SMART App Launch?

Yes. The SMART App Launch specification says all SMART apps shall support PKCE, servers shall support the S256 code challenge method and shall not support the plain method.

How should a background AI service authenticate to a FHIR server?

Using SMART Backend Services: the client_credentials grant with asymmetric client authentication (private_key_jwt), with pre-authorised scopes. The specification describes asymmetric authentication as its preferred method because no shared secret is sent over the wire.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.