Reference·ORC Segment·ORC-2
HL7 v2 Reference

Testing HL7 v2 ORC-2: What Placer Order Number Actually Needs to Handle

Jul 27, 2026 · 4 min read
← ORC-1 ORC-3 →

ORC-2 and OBR-2 are supposed to carry the same value, and when a test data generator produces them independently instead of propagating one from the other, it hides the exact bug that shows up in production when a filler system fails to echo the placer number correctly.

Quick answer

ORC-2 is the second field of the HL7 v2 ORC segment — the ordering system's own identifier for the order, generated at the moment the order is placed. Where a message includes both ORC and OBR segments for the same order, ORC-2 is treated as the segment of record and OBR-2 is expected to carry an identical value.

What this field contains

Component 1
the identifier value itself, assigned by the placer system
Component 2
the assigning authority — which system generated the number

Example

Synthetic example Generated by Synthibase
ORC|NW|ORD44219^SYNTHIB|FIL98831^SYNTHIB||IP||||20260726090000|||3021^HAYES^DEREK^A^^^MD

ORD44219^SYNTHIB in the second field is the placer order number, assigned by the ordering system. Synthetic order number — not from a real facility.

Where this trips people up

The specific bug worth testing for isn't a malformed ORC-2 value, it's a disagreement between ORC-2 and its counterpart in the corresponding OBR segment. When those two identifiers diverge — because an interface engine transforms one but not the other, or a filler system regenerates its own copy of the number — a receiving system can end up filing a result against a different order than the one the placer is tracking. Build test cases that assert ORC-2 and OBR-2 match on every message, and add a case where they deliberately don't, so you know your own system actually flags the mismatch instead of silently accepting whichever value it reads first.

How to Test HL7 v2 ORC: A Field-by-Field Breakdown
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Healthcare API Testing Guide: FHIR and X12
Test ORC/OBR order number pairing before go-live
Synthibase generates synthetic order messages with correctly paired ORC-2 and OBR-2 values by default, plus deliberate mismatch scenarios so you can verify your reconciliation logic actually catches them.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.