Inferensys

Glossary

FHIR Subscription

A FHIR mechanism that allows a client to register interest in specific events, receiving real-time notifications when data matching a defined query changes on a server.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
EVENT-DRIVEN INTEROPERABILITY

What is FHIR Subscription?

A FHIR Subscription is a standards-based mechanism enabling real-time notifications when specific healthcare data changes on a server, moving beyond traditional polling to an event-driven architecture.

A FHIR Subscription is a resource that defines a client's persistent request to receive a push notification from a FHIR Server when a specific set of criteria is met, such as the creation of a new Observation for a particular patient. It establishes a publish-subscribe pattern, where the server evaluates a defined FHIRPath or query expression against every data change and sends a notification to the registered endpoint when a match occurs.

The subscription is configured with a channel specifying the delivery method—typically a RESTful webhook, email, or message queue—and a criteria defining the triggering event. This mechanism eliminates inefficient polling, enabling critical workflows like Clinical Decision Support alerts, real-time patient monitoring dashboards, and automated Prior Authorization triggers to react instantly to data updates within an interoperable ecosystem.

REAL-TIME INTEROPERABILITY

Key Features of FHIR Subscription

FHIR Subscription defines a standardized, push-based mechanism for clients to receive real-time notifications when specific data changes occur on a server, moving healthcare integration beyond polling.

02

Subscription Topic & Filters

The SubscriptionTopic resource defines the canonical event a server can fire. Subscriptions then apply filters to narrow the scope:

  • Topic: encounter-start
  • Filter: Encounter?class=IMP (Inpatient only) This decouples the event definition from the specific interest, allowing one topic to serve many fine-grained subscriptions.
03

Notification Channels

The Subscription.channel element defines how the server delivers the notification payload:

  • rest-hook: The server POSTs the matching resource or an event bundle to a client's webhook URL.
  • websocket: A persistent connection for low-latency, bidirectional streaming.
  • email: Sends a simple notification for human-centric workflows.
  • message: Queues the event on a message broker for reliable, asynchronous delivery.
04

Payload Content Options

Clients control the information density of each notification to balance network efficiency with processing logic:

  • id-only: The notification contains only the resource ID, requiring a subsequent read.
  • full-resource: The entire matching resource is embedded in the notification.
  • empty: Only the event type is sent, useful as a simple trigger signal.
  • custom: A tailored payload defined by the implementation guide.
05

Subscription Lifecycle Management

Subscriptions are first-class FHIR resources with a defined state machine:

  • requested: Created but not yet active.
  • active: The server is monitoring and sending notifications.
  • error: The server encountered a delivery failure.
  • off: Temporarily paused by the client. The server communicates status changes back to the client via a dedicated $status operation.
06

Security & Authentication

To prevent unauthorized data exfiltration, the server must authenticate the notification receiver. Common patterns include:

  • TLS Mutual Authentication: The client's endpoint presents a certificate.
  • Signed Headers: The server signs each notification payload with a shared secret, allowing the client to verify origin and integrity.
  • SMART on FHIR Backend Services: The server obtains an OAuth 2.0 access token to POST to the client's endpoint.
FHIR SUBSCRIPTION FAQ

Frequently Asked Questions

Clear, technical answers to the most common questions about the FHIR Subscription mechanism for real-time healthcare data notifications.

A FHIR Subscription is a standards-based mechanism defined by HL7 that allows a client application to register interest in specific data changes on a FHIR server and receive real-time notifications when those changes occur. It operates on a pub/sub (publish-subscribe) pattern. The workflow is straightforward: a client POSTs a Subscription resource to the server, defining a topic (the type of event, like a new lab result) and criteria (a FHIR search query, such as Observation?category=laboratory). The server then evaluates incoming data against all active subscriptions. When a match is found, the server sends a notification to the client's designated channel endpoint—typically a webhook URL—containing either the full resource or a reference to it. This eliminates the need for inefficient, continuous polling of the server's API.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.