Healthcare Integrations — Taction Software

HL7 ORU Lab Results Interface: Build, Map and Troubleshoot

An HL7 ORU lab results interface delivers test results from a laboratory information system to EHRs, clinics and ordering providers as structured messages. Done well, results appear in the chart as discrete, trendable values within minutes. Done poorly, they arrive as unreadable text, attach to the wrong order or never arrive at all. This guide covers ORU^R01 structure, OBR and OBX segments, result statuses, LOINC mapping and discrete versus PDF results. For end-to-end delivery, see our lab integration services. All examples use synthetic data.

View All Services

How the ORU^R01 Message Works

The ORU R01 message is the standard HL7 v2 message for unsolicited observation results. It usually answers an earlier order, linking results back to the original request through order numbers. One message can contain one patient, one or many orders and many individual results. Understanding this hierarchy matters, because most lab results interface HL7 problems come from misplaced segments, missing order links or results grouped incorrectly under the wrong order.

Message Hierarchy

An ORU^R01 starts with MSH and PID, then repeats order groups. Each group contains ORC and OBR for the order, followed by OBX segments carrying individual results and optional NTE comments, as covered by our HL7 integration services.

The OBR Segment

OBR describes the ordered test or panel, including placer and filler order numbers, specimen collection time, ordering provider and result status. Receivers use it to match results to orders, often inside Mirth Connect channels.

The OBX Segment

Each OBX carries one result: value type, observation identifier, value, units, reference range, abnormal flag and result status. A single panel, like a metabolic panel, contains many OBX segments. Each value is independent.

Order Number Matching

Placer order numbers come from the ordering system, and filler order numbers come from the lab. Receivers must match both reliably, or results create unsolicited entries instead of completing orders.

Notes and Comments

NTE segments carry comments, such as specimen quality notes or interpretive text. Receivers must display them alongside the correct result, since comments often change how clinicians interpret a value. Never drop NTE segments.

Result Status Codes and Abnormal Flags

Result statuses and abnormal flags are small fields with large clinical consequences. They tell the receiving system whether a result is preliminary, final or corrected, and whether a value falls outside normal ranges. Misinterpreting them can hide critical results, display outdated values or fail to alert clinicians. Every HL7 ORU lab results specification should define exactly how each status and flag is handled, displayed and escalated by the receiving system.

Preliminary and Final Results

Status P marks preliminary results, and F marks final results. Receivers must update preliminary values when finals arrive, rather than creating duplicate entries that confuse clinicians reviewing the chart. Status changes must be visible.

Corrected Results

Status C indicates a corrected result replacing an earlier final value. Receivers must clearly show the correction, keep an audit trail and alert providers who already viewed the original result.

Cancelled Results

Status X or similar codes indicate a test that cannot be performed, such as a rejected specimen. Receivers must close the order and notify ordering staff so a new specimen can be collected.

Abnormal Flags

OBX-8 carries flags like H for high, L for low, and HH or LL for critical values. Receivers should highlight abnormal results and route critical values through urgent notification workflows. Ask our team to review yours.

Reference Ranges and Units

OBX-7 carries reference ranges and OBX-6 carries units. Ranges vary by lab, age and method, so receivers must display each result's own range rather than applying one fixed range everywhere.

LOINC Mapping for Lab Results

LOINC mapping lab results is where most of the real work in a lab interface happens. Labs use local test codes, and those codes almost never map cleanly to LOINC without careful clinical review. Accurate LOINC codes let EHRs trend results over time, support quality reporting and share data across organizations. Poor mapping produces duplicate result rows, broken trends and unreliable analytics. This mapping is a core part of our LIS integration work.

Why Local Codes Do Not Map Cleanly

A local code like GLU can mean serum, plasma or whole-blood glucose, measured different ways. LOINC distinguishes each, so mappers must understand specimen, method and units before assigning codes. Guessing creates errors.

A Worked Mapping Example

Local code GLU, serum, measured in mg/dL, maps to LOINC 2345-7, glucose in serum or plasma, mass per volume. A whole-blood glucose result would need a different LOINC code entirely.

Building a Mapping Table

Keep mappings in a version-controlled table with local code, description, specimen, units, LOINC code and reviewer. Never bury mappings inside transformation scripts, where they become impossible to audit. Review ownership explicitly and regularly.

Clinical Review of Mappings

Every mapping should be reviewed by someone with laboratory knowledge. Automated suggestion tools help, but incorrect mappings can merge results that should stay separate, directly affecting clinical interpretation. Document every reviewer decision.

Maintaining Mappings Over Time

Labs add tests, change methods and retire codes. Establish a change process so new or modified tests are mapped before results flow, rather than discovered later as unmapped errors. Monitor unmapped codes daily.

Discrete Versus PDF Results

Not all lab results arrive in the same form. Some are discrete values stored in structured fields, while others are embedded documents, such as PDF reports for pathology or genetic tests. The distinction matters greatly to the receiving EHR, because only discrete results can be trended, used in decision support or reported for quality programs. A strong EHR/EMR integration plan defines which results must be discrete and which may be documents.

Discrete Numeric Results

Numeric results use OBX value type NM with units and ranges. These power trending, flowsheets, decision support alerts and quality measures, so they should always be discrete whenever possible. Units must stay consistent.

Coded and Text Results

Some results use coded values, such as positive or negative, or free text. Coded values are preferable, because receivers can interpret them consistently across labs and reporting systems. Free text should be the exception.

Embedded PDF Reports

Pathology, genetics and complex reports often arrive as base64-encoded PDFs in OBX using the ED data type. Receivers must decode, store and display them correctly within the patient chart. Test large files early.

Why the Distinction Matters

A PDF-only glucose result cannot be trended or trigger alerts. Agree with labs which tests must arrive discretely, and accept documents only where structured data genuinely is not practical. Document the agreed list.

Hybrid Result Messages

Many labs send both discrete values and a PDF copy. Receivers must link them to the same order, avoid showing duplicates and make the discrete values the primary clinical record.

Frequently Asked Questions

What is an HL7 ORU message?

An HL7 ORU message delivers observation results, usually lab results, from a performing system to an ordering system or EHR. The most common type, ORU^R01, contains patient identity, order details in OBR segments and individual results in OBX segments, including values, units, reference ranges, abnormal flags and result status.

What is the difference between OBR and OBX segments?

OBR describes the order or test panel, including order numbers, collection time and ordering provider. OBX carries individual results within that order, such as each value in a metabolic panel. One OBR is usually followed by several OBX segments, and receivers use OBR to match results to orders.

Why is LOINC mapping important for lab results?

LOINC gives each lab test a standard code, so results can be trended, compared and reported consistently across systems and organizations. Without accurate mapping, the same test from different labs appears as separate items, breaking trends, decision support and quality reporting. Mapping requires clinical review, not just automated matching.

How should corrected lab results be handled?

Corrected results, usually status C, must replace the earlier final value while keeping a visible audit trail. Receivers should mark the result as corrected and notify providers who already reviewed the original. Silently overwriting values without notification can create patient safety risks and undermine clinician trust in the interface.

Can lab results be sent as PDFs in HL7?

Yes. PDF reports can be embedded in OBX segments using the ED data type, usually base64-encoded. This suits pathology and complex reports. However, PDF-only results cannot be trended or used in decision support, so routine numeric tests should always be sent as discrete values instead.

How long does it take to build a lab results interface?

A single lab results interface typically takes four to ten weeks, depending on the number of tests, mapping complexity and test environment availability. LOINC mapping and validation with laboratory staff often take longer than interface development itself, so plan clinical review time early in the project schedule.

Need a Lab Results Interface Built or Fixed?

Our integration engineers are ready to help. Free consultation, no obligation.