PubSub – what is the Publish/Subscribe
model for FHIR
The Publish/Subscribe (PubSub) model is a messaging pattern for FHIR applications. Senders (publishers) send messages to a specific topic without knowing the subscribers. Subscribers can subscribe to a specific topic to receive messages related only to that topic.
Use Case in Healthcare
Pub/Sub can be utilized by healthcare IT applications to create real-time, event-driven resources where different systems and applications communicate through standardized FHIR resources. Here’s how it works:
Publisher: A healthcare system or application publishes FHIR resources to a topic when an event occurs. For example; an EMR system publishing all VitalSigns as soon as they are recorded in the system so that a subscriber can check them for abnormalities.
Subscriber: Other systems or applications subscribe to relevant topics to receive updates. For instance, a clinical decision support system might subscribe to lab result updates to trigger alerts when critical values are detected.
Benefits
Real-time Updates
Healthcare systems can receive real-time updates on patient data, which is crucial for timely decision-making.
Scalability
The Pub/Sub model is highly scalable, allowing many subscribers to receive updates without affecting the performance of the publisher.
Decoupling
Publishers and subscribers are decoupled, meaning that they do not need to know about each other’s existence. This allows for more flexible and modular system designs.
Use case
A hospital’s electronic health record (EHR) system can publish updates to a “PatientRecordUpdates” topic. Other systems, such as billing, analytics, or external partners like pharmacies, can subscribe to this topic to get the latest patient information.
Implementation
Firely offers the PubSub feature to enable other services to communicate with Firely Server on data changes asynchronously. Specifically, other applications can send commands to update FHIR resources in the database and subscribe to events published by the server whenever resources change. Both commands and events get communicated as messages via a message broker (RabbitMQ).
Pub/Subs for FHIR leverages the Pub/Sub messaging model to facilitate real-time communication and data exchange in healthcare environments, enhancing the responsiveness and scalability of healthcare IT systems.
Summary
Pub/Sub enables FHIR systems to improve performance, reliability, and flexibility in handling complex healthcare data exchanges.
Meet with one of our FHIR experts
Future-proof you Healthcare solutions with Firely
Firely by
the numbers
10M+
5M downloads of our Firely .NET SDK
13 years
13 years of experience as one of the initiators of FHIR
32k+
Commits to our Git repositories