Fires when a new patient is enrolled and linked to the affiliate. The eventType is patient_enrolled. Category: PATIENT.
The patient-identity block is the payload. The emitting code sets an emptyeventData, and thePATIENTcategory allowlist is empty — so there are no event-specific fields. The meaningful content is the universal patient-identity block (patient_id,patient_external_id,patient_marketing_consent,is_returning_patient) that v2 attaches to every payload. In v1 these identity fields are not added; you'd read the patient from the rawownerEntityreference instead.
Field guarantees
| Field | Guarantee |
|---|---|
eventData | ⛔ Empty — no event-specific fields are emitted |
v2 patient identity (patient_id, patient_marketing_consent, is_returning_patient) | ✅ Always present |
patient_external_id | ⚠️ Conditional — present when the patient has an external identifier |
v1 payload (legacy)
eventData is empty; the patient is the raw ownerEntity reference.
{
"ownerEntityModel": "Patient",
"ownerEntity": "pat::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"targetEntityModel": "Patient",
"targetEntity": "pat::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"eventTitle": "Patient enrolled.",
"eventType": "patient_enrolled",
"eventData": {},
"deleted": false,
"createdAt": { "$date": "2026-01-01T12:00:00.000Z" },
"updatedAt": { "$date": "2026-01-01T12:00:00.000Z" },
"__v": 0
}v2 payload
The patient-identity block carries the useful data.
{
"event_type": "patient_enrolled",
"event_id": "event::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"api_version": "2026-08-09",
"timestamp": "2026-05-30T14:00:00.000Z",
"affiliate_id": "aff::example",
"patient_id": "pat::example",
"patient_external_id": "ext-patient-123",
"patient_marketing_consent": true,
"is_returning_patient": false
}| Field | Delivered in v2 | Notes |
|---|---|---|
| Envelope | ✅ | |
patient_id, patient_marketing_consent, is_returning_patient | ✅ | |
patient_external_id | ⚠️ | When the patient has an external identifier |
