Reference·OBR Segment·OBR-31
HL7 v2 Reference

OBR-31 in HL7 v2: A Field Guide to Reason for Study

Jul 27, 2026 · 4 min read
← OBR-25

OBR-31 carries the clinical justification for an order — the kind of field that's supposed to support medical necessity checks and prior-authorization workflows. In practice it arrives as anything from a clean coded diagnosis to a hastily typed free-text note, and systems that expect only the former reject or garble the latter.

Quick answer

OBR-31 is the thirty-first field of the HL7 v2 OBR segment — the Reason for Study, carrying the clinical indication or justification for the ordered test, which can repeat and can be coded, free text, or both.

What this field contains

coded form
Diagnosis code — a structured code such as an ICD value, when the ordering system supplies one
free-text form
Clinical note — a short free-text justification typed by the ordering clinician
repetition
Multiple reasons — the field can repeat when more than one indication applies to the order

Example

Synthetic example Generated by Synthibase
OBR|1|ORD44219^SYNTHIB|FIL98831^SYNTHIB|CBC^Complete Blood Count^L|||20260726090000|||||||||3021^HAYES^DEREK^A^^^MD||||||||CH|F||||||R/O anemia

OBR-31 carries R/O anemia, a free-text clinical indication for the order. Synthetic order — not a real patient.

Where this trips people up

Medical-necessity or prior-authorization logic that expects OBR-31 to always contain a clean, codeable diagnosis breaks as soon as a clinician orders through a workflow that only supports free text, which is common in urgent or add-on order scenarios. The field passes HL7 validation either way since both forms are legal, so the failure shows up downstream as a rejected claim or a stalled auth request rather than as a parsing error at intake. Test both coded and free-text variants of this field explicitly.

HL7 v2 OBR Segment Guide: Fields, Format, and Testing Gotchas
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Healthcare API Testing Guide: FHIR and X12
Generate orders with realistic clinical reasons
Synthibase generates synthetic OBR segments with a realistic mix of coded and free-text clinical indications, so downstream authorization logic gets tested against both.
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.