Fires automatically at prescription-creation time when the order's project has projectVisitType configured, forcing the order's visit type. targetEntity is the Order. The eventType is visit_type_overridden.
Field guarantees
Field
Guarantee
eventData.performedBy
✅ Always present (v1) — always the system actor
performedBy in v2
⛔ Not delivered — blocked as PHI-adjacent
v2 order reference (order_id, order_status)
✅ Always present
📘
This event only fires when the project defines a visit-type override. performedBy is always the system actor, never a person.
v1 payload (legacy)
{
"_id": "event::5a6b7c8d-xxxx-xxxx-xxxx-9e0f1a2b3c4d",
"ownerEntity": "pat::117eb3b9-xxxx-xxxx-xxxx-9424274b5425",
"ownerEntityModel": "Patient",
"targetEntity": "order::e5576e92-xxxx-xxxx-xxxx-3c3173a3fb82",
"targetEntityModel": "Order",
"eventTitle": "The visit type was overridden due to the settings of the project",
"eventDescription": "",
"eventType": "visit_type_overridden",
"eventData": {
"performedBy": { "id": "system", "role": "system", "name": "System" }
},
"deleted": false,
"createdAt": { "$date": "2026-01-01T12:00:00.000Z" },
"updatedAt": { "$date": "2026-01-01T12:00:00.000Z" },
"__v": 0
}
eventData field
Type
Always?
Notes
performedBy
object {id, role, name}
✅
Always the system actor
v2 payload
Sanitized envelope. performedBy is stripped; the order reference is resolved from the target order.