HL7 messaging insights. HL7 2.X has one primary message used for moving “results” from a producer to a consumer: The ORU^R01 “unsolicited result” message. A lab system is an example producer (creating lab results) while an electronic medical record (EMR) system is an example consumer (storing/displaying the lab result).
The contents of the ORU message are “wide open” and everything from vital signs to dictated documents can be sent via this single HL7 message. To allow one message structure to carry such a mixture of data, the ORU message encodes the pieces of the result being sent in an OBX segment.
Here is an subset of an example result message for a Urinalysis:
MSH|^~\&|X|Y|LIS|TEST9999|199807311532||ORU^R01|3738|P|2.2
PID|107|21613…
ORC|RE|8642753…
OBR|1|8642753100117|21079900680|003038^URINALYSIS, ROUTINE^L|…
OBX|1|NM|013060^Specific Gravity^L||1.010||1.005-1.030|||N|F|…
OBX|2|CE|013045^Urine-Color^L||Y^Yellow^L||Y|||N|F|…
OBX|3|ST|013052^Appearance^L||Hazy||Clear|A||N|F|…
The key here is that the lab result is sending three types of data and each is keyed in the OBX-2 field telling what type of data is being sent in that given OBX. Thus, a NM indicates a numeric value for Specific Gravity, a CE indicates coded value for Urine color, and a ST is a string value for the urine appearance.
This same message can be used to send “lines of text” in a transcribed clinical document setting:
MSH|^~\&|PSCRIBE||RDHL701||20021021070646||ORU^R01|20021021070646|P|2.3
PID|||12345||Bob^Joe|…
PV1||I|IQ^363^07||…
OBR|1|P123|F123|502^CHEST XRAY^L|…
OBX|3|TX|502^CHEST XRAY^L|1|Portable chest 8:05 p.m.||||||F
OBX|4|TX|502^CHEST XRAY^L|1|||||||F
OBX|5|TX|502^CHEST XRAY^L|1|Swan-Ganz check||||||F
OBX|6|TX|502^CHEST XRAY^L|1|Comparison prior same day||||||F
OBX|7|TX|502^CHEST XRAY^L|1|||||||F
OBX|8|TX|502^CHEST XRAY^L|1|Swan tip projects over what is likely a proximal branch of the right||||||F
OBX|9|TX|502^CHEST XRAY^L|1|lower lobe pulmonary artery. Basilar air space disease. No definite||||||F
…
If you want to include a binary object as part of the ORU, HL7 uses the ORU message with an ED (encapsulated data) data type in an OBX-5. The type of encoded of object is sent along with a base-64 encoded version of that object.
Here is an example of sending the same radiology report as a Word document packaged/embedded inside of an HL7 message looks like this:
MSH|^~\&|PSCRIBE||RDHL701||20021021070646||ORU^R01|20021021070646|P|2.3
PID|||12345||Bob^Joe|…
PV1||I|IQ^363^07||…
OBR|1|P123|F123|502^CHEST XRAY^L|…
OBX|1|ED|502^CHEST XRAY^L||Word^TEXT^^Base64^JVBERi0xLjMKJeTjz9IKNSAwI… (many more bytes!)
In training class, I stress that it is not difficult to encode a binary object into HL7 messaging. The critical problem is that both ends of the connection must support all three of these items:
- the ED data type,
- the document type being sent, and
- have a method of getting that document all the way to the user’s screen.
Latest posts by Dave Shaver (see all)
- HL7 ADT Q&A with Dave Shaver - July 2, 2014
- Health Standards Community Membership Archetypes: Who uses HL7? - August 6, 2013
- Note from the Field: Meditech 6.0 HL7 Integration - September 6, 2011
Pingback: Sending Images or Formatted Documents via HL7 Messaging - NeoTool Healthcare IT Blog()
Pingback: PDF Attachment in HL7 Message()
Pingback: Sending text documents or reports via an HL7 interface()
Pingback: Embedding or Sending a CCR Document Inside an HL7 2.X Message | HL7 Standards()
Pingback: Sending Text Documents or Reports via an HL7 Interface | HL7 Standards()
Pingback: Confluence: SW Maintenance()