Build the MSH segment with correct sending and receiving application/facility names, current timestamp in MSH-7, message type ORM^O01 in MSH-9, a unique message control ID in MSH-10, and version 2.5.1 or 2.3.1 as agreed with the receiving LIS
Construct the PID segment with the patient's internal MRN in PID-3, full name (family^given^middle) in PID-5, date of birth in PID-7, gender in PID-8, and address in PID-11; omit SSN from PID-19 unless explicitly required by the interface specification
Add a PV1 segment for the patient's current visit context including patient class (I for inpatient, O for outpatient, E for emergency), attending physician NPI and name in PV1-7, and visit number in PV1-19
Build the ORC segment with order control code NW (new order) in ORC-1, a unique placer order number in ORC-2, order status, ordering provider NPI and name in ORC-12, and the order effective date/time
Construct the OBR segment with the placer order number matching ORC-2 in OBR-2, the ordered test identifier in OBR-4 (local code or LOINC as agreed), specimen collection date/time in OBR-7, and any clinical notes in OBR-13
Add NTE segments after OBR for any free-text clinical notes relevant to the order, and include DG1 segments for diagnosis codes if required by the LIS to support test ordering rules or insurance billing
Known gotchas
Placer order numbers (ORC-2 / OBR-2) must be globally unique within your system and stable across the life of the order — the LIS will use this number to correlate results back to the original order; never reuse order numbers
Some LIS systems are version-sensitive to HL7v2 message structure; a message valid under v2.5.1 may be rejected by a LIS expecting v2.3.1 due to differences in allowed segments or field positions — confirm the required version with the LIS vendor
Ordering provider fields in ORC-12 and OBR-16 often require NPI but also expect a facility-specific provider ID that the LIS uses for internal routing and result delivery; populate both if the interface specification requires dual identifiers
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp