Realtime Patient Notifications
Monitor your patient’s journey through health systems in real-time
Overview
Metriport’s Realtime Patient Notifications are your way to receive realtime updates on a patient’s journey through a health system. You can trigger a workflow once a patient is admitted to a health system, check their diagnosis within moments of them being discharged, and so much more.
Working with Realtime Patient Notifications
Webhook schema (Event Reference)
Each realtime notification we send via webhook has a payload that includes key information about the event, and a url field to JSON containing robust clinical data for the encounter.
If you want to access the clinical data, you need only download the json from the url. To work with the data, we recommend you understand The Encounter Model below.
The URL remains valid and available for download for 600 seconds (10 minutes).
The Encounter Model
For each patient you intend to receive realtime notifications for, Metriport maintains the real-time state of their journey through the health system. Each of these patient journeys is represented via FHIR data - a FHIR Encounter.
But FHIR data relies on references to function. An Encounter might reference a subject, a practitioner, or a location - as the example above does (see the reference
field in location.). Each root unit of data in FHIR is called a ‘Resource’ and each of type of resource has its own corresponding schema. It’s common for resources to include references to one another.
To provide comprehensive data about the Encounter, we serve a FHIR Bundle via the url
in the patient notification.
The first item in every bundle for a Metriport’s Patient Notification is the root Encounter. Every item thereafter is a resource referenced by the Encounter. The bundle acts as a container for all resources, ensuring you have a standalone package of clinical data.
If you’re unfamiliar with FHIR, please read our FHIR Overview.
Handling Patient Notifications
We may extend the patient notification types, so we recommend that you do a strict match when checking the handler type. If using a typed language like typescript, this also allows you to typecast the payload based on the appropriate event type.
See below.
Event Reference
patient.admit
A Patient Admit event is emitted when a patient undergoes the admission process, assigning them a bed. It signals the official start of a patient’s stay in a healthcare facility. It includes short stay and “John Doe” (patient name unknown) admissions.
Schema
Metadata about the message.
Example payload
patient.discharge
A Patient Discharge event indicates the end of a patient’s stay in a healthcare facility. The patient now has the status “discharged” and an officially recorded discharge date.
Schema
Metadata about the message.
Example payload
Additional Resources
Full FHIR Encounter
The below is an example of a full FHIR encounter