Skip to content
The Path

Module 2 · Reading an HL7 v2 message·12 min

Reading an unknown message, step by step

The five-step method, then a guided exercise on a message you have never seen.

A message you have never seen lands in your queue. No need to panic: you do not have to know every segment by heart. You need a method, always the same one, that works on any message.

The exercise message is waiting further down. Method first.

The five-step method

Step Question Where to look
0 How do I split it? MSH-1, MSH-2, MSH-12
1 What is it? MSH-9
2 Who is talking to whom? MSH-3 to MSH-6, then MSH-7 and MSH-11
3 Which patient? PID, then PV1
4 What does it say? the clinical segments: OBR, OBX
5 Can you trust it? codes, flags, statuses

0. First of all: delimiters and version

On an unknown message, check MSH-1 and MSH-2 first: the delimiters are not always |^~\&. Then MSH-12, the version, which tells you which rules apply. That is step zero, ten seconds, and it saves you from misreading everything.

1. What is it? MSH-9

Always start with MSH-9. It gives the message type, the event and the structure. An ORU^R01 is a result, an ADT^A01 an admission. Once you know the type, you know which segments to expect and in which order.

2. Who is talking to whom? MSH-3 to MSH-6

Four fields in a row:

  • MSH-3: the sending application;
  • MSH-4: the sending facility;
  • MSH-5: the receiving application;
  • MSH-6: the receiving facility.

Also glance at MSH-7 (the message date) and MSH-11. If MSH-11 is not P (production), you may be reading a training or debugging message.

3. Which patient? PID

In PID, three fields are enough to identify the person: PID-3 (the record number), PID-5 (the name) and PID-7 (the date of birth). PV1-2, when present, tells you whether the person is an inpatient or an outpatient. Careful: PID-3 only means something with its authority, the 4th component (LELEUX in 1024^^^LELEUX^MR). Number 1024 at another hospital is another person.

4. What does it say? The clinical segments

This part depends on the type. For a result, OBR says which test was ordered, and OBR-25 gives the status of the whole order. Then each OBX carries one measurement. Always read them in this order:

  • OBX-3: what was measured;
  • OBX-5: the value;
  • OBX-6: the unit;
  • OBX-7: the reference range.

5. Can you trust it? Codes, flags, statuses

The last step is the one that prevents serious mistakes. Check:

  • OBX-8, the flag: N normal, L low, H high;
  • OBX-11, the status: F final, P preliminary, C correction;
  • OBR-25, the status of the whole order: P as long as at least one result is not final;
  • the coding system at the end of OBX-3: LN for LOINC, L for a local code.

Guided exercise

Your turn. Here is the blood panel message, opened on MSH-9. For each question, click the field mentioned and read the explanation.

A message that arrived this morning in the Leleux Clinic interface engine. Answer the questions by clicking the fields.

ORU^R01^ORU_R01· Observation result (unsolicited)
||||||||||
||||||||
||
|||||||||||||||||||||||||
|||||||||||
|||||||||||
|||||||||||
  1. Step 1. What type of message is it? Which structure does MSH-9.3 announce?
  2. Step 2. Which application sends? Which one receives? Is it a production message?
  3. Step 3. Who is the patient? What is her record number? Is she an inpatient?
  4. Step 4. How many results does the message hold? What is the CRP unit?
  5. Step 5. Which result is too low? Which is too high? Which is not final yet?
Show the answers
  1. An observation result, ORU^R01. The structure is ORU_R01.
  2. LAB, the clinical laboratory, sends to HIS, the patient record, both at the Leleux Clinic. MSH-11 is P: production.
  3. Marie Dubois, born March 12, 1985, record 1024. PV1-2 is O: she is an outpatient.
  4. Three OBX segments, so three results: hemoglobin, CRP and glucose. CRP is in mg/L.
  5. Hemoglobin is low (L), CRP is high (H), glucose is normal (N). But glucose has status P: it is a preliminary result, not validated yet. OBR-25 is P as well: the order as a whole is not complete.

Did you spot the step 5 trap? The glucose looks reassuring, but it is not final yet. A receiver that displayed it as a validated result would mislead the physician.

A sleep study report. The lab sends the hospital record an AHI of 28.5/h, flagged “high”: moderate sleep apnea.

ORU^R01^ORU_R01· Observation result (unsolicited)
||||||||||
|||||||||||
|||||||
|||||||||||||||||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||

And in FHIR?

The logic stays the same. An Observation resource carries the code in code (with system to say LOINC), the value in valueQuantity, the flag in interpretation and the status in status (final, preliminary).

Check your understanding

1 of 4

You open an unknown HL7 message and have spotted its delimiters. Which field do you read next?

+50 XPPass the quiz (3 correct answers) to complete the lesson.

Reviewed and checked on 27 September 2026