Event reference
The EDFlow normalized event contract: the envelope, prohibited fields (the PHI tripwire), identifiers never allowed in ids, shared types, and every inbound event type with JSON Schemas to download.
A normalized event asserts current state for one fact about one ED visit. The same contract is used by POST /v1/events, POST /v1/events/batch and the signed POST /ehr/v1/events, and it's what the FHIR and HL7 v2 adapters produce.
Envelope
| Field | Required | Rules |
|---|---|---|
specVersion | yes | "1.0" |
id | yes | Unique per source and stable across retries: ^[A-Za-z0-9._:#/@-]{1,200}$. Never contains a patient identifier |
type | yes | One of the types below |
siteCode | yes, except system.heartbeat | Bound to your source |
occurredAt | yes | When it happened. RFC 3339 with an offset. At most 10 minutes ahead and 90 days old |
recordedAt | no | When your system recorded it; defaults to occurredAt |
sequence | no | Increasing number within the feed, a tie-breaker |
mode | no | live (default) or backfill (never notifies anyone) |
source | yes | kind (ehr, paging, simulator), system (epic, oracle-health, meditech, other), feed, and optional messageId, messageType, mappingProfile |
encounter | for visit events | externalId (your visit identifier, hashed on receipt) and idSystem (epic-csn, oracle-fin, meditech-account, visit-number, …) |
data | yes | The schema for the type |
Strings are at most 200 characters unless stated. Unknown fields are ignored and counted, except prohibited fields.
Prohibited fields
An event is rejected (prohibited_field) if any key, at any depth, matches one of these names (case-insensitive, ignoring _ and -). Nothing is stored beyond the rejection record.
| Category | Keys |
|---|---|
| Result content | value, valueQuantity, valueString, valueCodeableConcept, result, results, resultValue, interpretation, referenceRange, abnormalFlag, abnormalFlags, conclusion, conclusionCode, presentedForm, impression, finding, findings |
| Clinical narrative | note, notes, comment, comments, narrative, diagnosis, diagnoses, problem, problems, condition, medication, medications, allergy, allergies |
| Contact and government identifiers | healthCardNumber, hcn, ohip, jhn, sin, ssn, address, addressLine, postalCode, phone, phoneNumber, telecom, email |
chiefComplaint is accepted only when the site opts in, and shown to clinical staff only.
String values that survive the tripwire are also checked for health-card, phone, email, postal-code and record-number patterns; a match is replaced with [redacted] and reported as a warning.
Identifiers in ids
Event ids must be derived from source data (for example {sourceId}:{MSH-10}:{n}), never from patient identifiers. An id containing a health card number, a visit or record number pattern, or 7 or more digits equal to the message's patient or visit number is rejected.
Event types
| Type d'événement | Résumé | Portée | HL7 v2 | FHIR R4 |
|---|---|---|---|---|
admission.status_changed | Bed flow for an admitted patient waiting in the ED. | encounter | ADT^A07, ADT^A14, ADT^A27 | — |
careteam.member_assigned | One care-team member was assigned. | encounter | — | — |
careteam.member_released | One care-team member was released. | encounter | — | — |
careteam.snapshot | The authoritative team asserted by this source, limited to rolesCovered. | encounter | ADT^A04, ADT^A08 | Encounter, CareTeam |
consult.status_changed | A consult was requested, started, completed or cancelled. | encounter | ORM^O01, OMG^O19, OML^O21, OMI^O23 | ServiceRequest |
department.census_reported | Aggregate department status with no identifiers. | site | — | — |
department.code_called | An emergency code was called. | site | — | — |
department.code_cleared | A code was cleared. | site | — | — |
department.roster_reported | The complete list of encounters active in the ED, for reconciliation. | site | — | — |
encounter.arrived | Registration or arrival at the ED. | encounter | ADT^A04, ADT^A01 | Encounter |
encounter.assessed | The physician initial assessment or a reassessment. | encounter | — | — |
encounter.cancelled | The registration was voided. | encounter | ADT^A11 | Encounter |
encounter.departed | The patient physically left the ED. | encounter | ADT^A02, ADT^A03, ADT^A11 | Encounter |
encounter.departure_cancelled | The discharge was reversed. | encounter | ADT^A13 | — |
encounter.disposition_decided | A decision to discharge, admit, observe or transfer. | encounter | ADT^A01, ADT^A08, ADT^A03, ADT^A06 | — |
encounter.location_changed | A bed or area move, leave of absence or return. | encounter | ADT^A08, ADT^A02, ADT^A12, ADT^A21, ADT^A22 | Encounter |
encounter.triaged | Triage completed, or a re-triage. | encounter | ADT^A04, ADT^A08 | Encounter, Observation |
order.placed | A test or diagnostic order (the full order asserted each time). | encounter | ORM^O01, OMG^O19, OML^O21, OMI^O23 | ServiceRequest |
order.results_reviewed | A clinician acknowledged the results. | encounter | — | — |
order.status_changed | The current status of an order, with every timestamp known so far. | encounter | ORM^O01, OMG^O19, OML^O21, OMI^O23, ORU^R01, SIU^S12, SIU^S13, SIU^S14, SIU^S15 | ServiceRequest, Specimen, ImagingStudy, DiagnosticReport, Appointment, Task |
patient.merged | Two MRNs were merged. | site | ADT^A40, ADT^A34, ADT^A18 | — |
patient.updated | A demographic or privacy correction. | encounter | ADT^A08 | — |
system.heartbeat | Feed liveness. | source | — | — |
Each type links to its page with the data fields, effects, an example and the JSON Schema.
Per-event results
| Status | Meaning |
|---|---|
accepted | Applied, or recorded as older than current state |
duplicate | Same id and payload already processed |
superseded | Same id, new payload after a mapping-profile change or a dead-letter replay |
buffered | The visit or order isn't known yet; held up to 6 hours |
quarantined | A roster that would close too many visits, held for review |
ignored | Valid, deliberately not applied (for example an archived visit) |
rejected | Invalid; see the error code and path |
Related
Dernière mise à jour le
Cette page vous a-t-elle été utile?
Webhooks
Receive signed EDFlow webhooks (Standard Webhooks): subscribe, verify signatures, deduplicate on webhook-id, order by version, expiry, retries and auto-disable, authenticating to your gateway, event types, and redelivery.
admission.status_changed
Bed flow for an admitted patient waiting in the ED.