Skip to main content
Version: v0.0.4

Interface: Order

OBR-derived order (HELPERS-05, D-16) with positionally-grouped OBX children (D-12). observations is ALWAYS present: empty when no OBX follows this OBR before the next OBR or end-of-message. timings is ALWAYS present, empty when the order carries no TQ1 / legacy embedded TQ.

Example

import type { Order } from "@cosyte/hl7";
const order: Order = {
placerOrderNumber: "PLACER1",
fillerOrderNumber: "FILLER1",
universalServiceId: { identifier: "GLU", text: "Glucose" },
orderStatus: "F",
observations: [],
timings: [],
};

Properties

fillerOrderNumber?

readonly optional fillerOrderNumber?: string

OBR-3 filler order number.


notes?

readonly optional notes?: readonly string[]

NTE note lines positionally attached to this order: the ORC-region notes (before the OBR) followed by the OBR-region notes, in document order. Several ORCs before one OBR all contribute here; nothing is dropped. OMITTED when the order carries no notes. A note on a trailing or dangling ORC that never opens an order is surfaced at message level (msg.notes()), not here: still never dropped. High-PHI-risk clinical narrative.


observations

readonly observations: readonly Observation[]

OBX children grouped under this OBR (D-12 positional grouping). Always present.


orderControl?

readonly optional orderControl?: string

ORC-1 order control when an ORC precedes this OBR.


orderedBy?

readonly optional orderedBy?: XCN

OBR-16 ordering provider (D-24a XCN).


orderStatus?

readonly optional orderStatus?: string

OBR-25 result status (HL7 Table 0123, e.g. "F" final, "P" preliminary).


placerOrderNumber?

readonly optional placerOrderNumber?: string

OBR-2 placer order number.


timings

readonly timings: readonly OrderTiming[]

TQ1 / legacy embedded-TQ timing(s) grouped under this order. Always present: empty when the order carries no timing. See OrderTiming.


universalServiceId?

readonly optional universalServiceId?: CWE

OBR-4 universal service identifier (test code + description).