Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is OBR segment required to view the OBX segment attachments in HL7 message?

Tags:

hl7

terser

I'm trying to parse an HL7 message file which is of version 2.3.1. OBX segment is coming as null when the message is parsed.

If I don't have OBR segment in HL7 message, Terser is failing to fetch the OBX segment values (it's returning null values), so is OBR segment mandatory to view OBX attachments in an HL7 message?

like image 535
Madesh Avatar asked Dec 29 '25 11:12

Madesh


1 Answers

The OBX segment mainly carry clinical report data. It is mainly used in ORU message and rarely with ORM, ADT and other. This segment is optional and can be repeated in message.

The OBR segment mainly carry placer and filler order numbers (used as identifiers), exam information etc. This segment is mandatory.

ORU (Observation Result) messages should contain the OBR segment followed by the OBX segment for each observation.

About its usage in ORM message:

Usage in the ORM Message
In an ORM message, the OBR segment is part of an optional group that provides details about the order. When the order placer creates the ORM message, they will include the Placer Order Number in the OBR-2 and/or ORC-2 fields. These two fields should contain the same information, and at least one of the two must contain the placer order number. The message may contain multiple orders for which the rules still apply.

About its usage in ORU message:

Usage in the ORU Message
In an ORU message, the OBR segment is used as a report header and contains important information about the order being fulfilled (i.e. order number, request date/time, observation date/time, ordering provider, etc.). It is part of a group that can be used more than once for each observation result that is reported in the message.

When the filler creates the ORU message, they will include the Filler Order Number (such as an accession number) in the OBR-3 and/or ORC-3 fields. If the filler order number is not present in the ORC-3, it must be present in the OBR-3 because the ORC segment is optional in the ORU message.

Considering this, OBR is mandatory segment in both the ORU and ORM (optional group) messages. This is irrespective of dependency of OBX segment on OBR segment.

To answer your comment, I never used REF message. But, first google search gave me this. It look that OBR is mandatory in those messages.

like image 163
Amit Joshi Avatar answered Jan 01 '26 09:01

Amit Joshi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!