Overview
Metriport’s Real-time Patient Notifications are your way to receive real-time 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 Real-time Patient Notifications
Webhook schema (Event Reference)
Each real-time notification we send via webhook has a payload that includes key information about the event and aurl field to a patient notification bundle containing the FHIR data relevant to
that notification. The exact payload shape and bundle contents vary by event type. For ADT events,
the url points to a Patient Encounter Bundle.
For discharge summaries, the url points to a FHIR
collection Bundle of resources from the matching HIE
discharge summary document.
url. For ADT events, we
recommend understanding The ADT Encounter Model below before working
with the Patient Encounter Bundle. For
discharge summaries, download the FHIR collection from the url on
patient.discharge-summary.
The URL remains valid and available for download for 600
seconds (10 minutes).
The ADT Encounter Model
For ADT notifications, Metriport maintains the real-time state of a patient’s journey through the health system. Each of these patient journeys is represented via FHIR data through an Encounter.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 for ADT events, we serve a
Patient Encounter Bundle (a FHIR
Bundle) via the url in the patient notification.
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.How to enable real-time notifications
You can enable real-time notifications for the following sources:- ADTs: admission, discharge, and transfer notifications (and more) as patients move through healthcare facilities.
New updates to subscribe or remove patients from ADTs are only processed once a week, on Saturdays.
- Pharmacies: notifications when patients get new prescriptions, pickup medications, and more.
- Laboratories: notifications for new patient lab results.
Event Reference
patient.laboratory
A Patient Laboratory event indicates that a new laboratory notification is available for a patient.
Schema
required
Metadata about the message.
required
Example payload
patient.pharmacy
A Patient Pharmacy event indicates that a new pharmacy notification is available for a patient.
Schema
required
Metadata about the message.
required
Example payload
patient.pre-admit
A Patient Pre-admit event is emitted when a facility records a planned or pending admission, before the patient arrives.
Schema
required
Metadata about the message.
PatientPreAdmitPayload
required
Example payload
patient.register
A Patient Register event is emitted when a patient checks in at a facility, often before they are assigned a bed. Registration is not itself an inpatient admission.
Schema
required
Metadata about the message.
PatientRegisterPayload
required
Example payload
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.
The same event type is sent when a visit changes class, for example from emergency to inpatient. In that case the payload includes previousClass and, when the visit was registered earlier, registerTimestamp. An admission that is not a class change omits those two fields.
Schema
required
Metadata about the message.
PatientAdmitPayload
required
Example payload
patient.visit-update
A Patient Visit Update event is emitted when an existing visit receives new diagnosis information.
Schema
required
Metadata about the message.
PatientVisitUpdatePayload
required
Example payload
patient.transfer
A Patient Transfer event indicates that a patient has been moved from one location to another within a healthcare system. This could represent a transfer between departments, units, or facilities.
Schema
required
Metadata about the message.
PatientTransferPayload
required
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
required
Metadata about the message.
PatientDischargePayload
required
Example payload
patient.discharge-summary
A Patient Discharge Summary event is sent after a patient.discharge
notification when Metriport locates a matching discharge summary from the HIE. At most one
successful patient.discharge-summary is sent per encounter.
The url is a FHIR collection Bundle of resources from
the matching source document, not the ADT
Patient Encounter Bundle.
Schema
required
Metadata about the message.
DischargeSummaryWebhookPayload
required
Example payload
Additional Resources
FHIR Encounter
For ADT notifications, the Encounter is the core resource in a Patient Encounter Bundle. Below is an example of a FHIR Encounter resource, which is one piece of the data you’ll receive when downloading the bundle from the notificationurl.

