Visit Type Overridden

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

FieldGuarantee
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 fieldTypeAlways?Notes
performedByobject {id, role, name}Always the system actor

v2 payload

Sanitized envelope. performedBy is stripped; the order reference is resolved from the target order.

{
  "event_type": "visit_type_overridden",
  "event_id": "event::5a6b7c8d-xxxx-xxxx-xxxx-9e0f1a2b3c4d",
  "api_version": "2026-08-09",
  "timestamp": "2026-05-30T14:00:00.000Z",
  "affiliate_id": "aff::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "patient_id": "pat::117eb3b9-xxxx-xxxx-xxxx-9424274b5425",
  "patient_external_id": "ext-patient-123",
  "patient_marketing_consent": false,
  "is_returning_patient": false,
  "order_id": "order::e5576e92-xxxx-xxxx-xxxx-3c3173a3fb82",
  "order_status": "requires_provider_review"
}
FieldDelivered in v2Notes
Envelope + patient identity
order_id, order_statusResolved from the target order
performedByStripped