All field notes

Engineering · 9 min read

SMART on FHIR app launch: connecting clinical AI without rewriting the EHR.

Written by
Healytix Engineering
Read time
9 min
SMART on FHIR app launch: connecting clinical AI without rewriting the EHR.

How to embed clinical AI and decision support tools into existing EHRs using SMART on FHIR app launch flows, OAuth2 scopes, and real-time CDS Hooks.

The EHR app-store revolution

Historically, deploying a third-party clinical software application or AI model required months of custom point-to-point interface engineering with each hospital's EHR vendor. SMART on FHIR established an open, universal application platform for healthcare, allowing a single clinical web application to run securely inside Epic, Cerner, CareOps, and other compliant EHRs without code modifications.

How the SMART on FHIR launch sequence works

The launch sequence starts when a clinician opens an app from within their EHR patient chart. The EHR redirects to the app with a launch token and FHIR endpoint URL. The app exchanges the launch code for an OAuth2 access token, an OpenID Connect identity token, and the active patient context. With this scoped token, the app queries standardized FHIR R4 resources like Patient, Condition, and Observation directly from Fabric.

Embedding clinical AI directly in doctor workflows via CDS Hooks

Rather than requiring doctors to navigate away to a separate browser tab, Clinical Decision Support (CDS) Hooks allow AI assistants to trigger automatically at clinical decision points. When a physician prescribes a medication, orders an imaging scan, or opens a patient chart, the EHR emits a hook event. Sage evaluates the patient context against hospital guidelines and returns an informative card containing cited recommendations and guideline links directly in the order screen.

Single Sign-On (SSO) with OpenID Connect and role-based scopes

Security and auditing are built into the protocol. Clinicians authenticate using their existing hospital credentials through Single Sign-On (SSO). OAuth2 scopes (such as patient/Observation.read or user/Claim.write) enforce the principle of least privilege, ensuring an application accesses only the specific data categories required for its clinical function.

Zero-copy data querying with Fabric

Traditional integrations copy clinical data into a secondary vendor database. With Healytix Fabric, SMART on FHIR applications execute real-time read and write operations against the hospital's primary longitudinal FHIR store. When an AI app generates a risk score or drafts a clinical note, it writes a standard FHIR resource back to Fabric, making it immediately visible to the rest of the hospital.

Key takeaways

  • 01SMART on FHIR allows clinical apps to run seamlessly across diverse EHRs without custom point-to-point code.
  • 02CDS Hooks deliver timely, evidence-backed alerts at the moment of clinical ordering.
  • 03OAuth2 scoped tokens ensure apps access only the specific patient context authorised by the clinician.

Where this lives in the platform

Share this note