Testing HL7 v2 OBR-1: What Set ID Actually Needs to Handle
A single ORM or ORU message can carry several OBR segments for the same encounter — one per order — and OBR-1 is the only field that tells a receiving system the order they belong in. Drop or renumber it and a downstream system can silently associate the wrong result set with the wrong order.
OBR-1 is the first field of the HL7 v2 OBR segment — a simple integer that numbers each repeating OBR within the message, starting at 1, so systems can tell multiple orders in the same message apart.
What this field contains
Example
OBR-1 is set to 1, marking this as the first (and here, only) order in the message. Synthetic order — not a real patient.
Where this trips people up
Set ID looks trivial, so it's rarely on anyone's test checklist — until a message with three orders gets split into individual messages by an interface engine, and the splitting logic forgets to renumber OBR-1 back to 1 for each new message. Receiving systems that use OBR-1 to key a lookup table then start overwriting one order's data with another's. Test multi-order messages explicitly, not just single-order ones.