Logic for parsing HL7 Message

This guide explains how Rooster reads and interprets HL7 lab messages to determine criticality, route results, and trigger alerts.

Rooster may receive HL7 messages with different segments than those extracted from your interface system. For example, while the ordering doctor may be in PRT 2 in your HL7, our system retrieves it from ORC12.1 instead.

Accession No

LIS & others - OBR 3.1 Beaker - ORC 4.1

orderedByMCR / ordering doctor

LIS & others - OBR 16.1 Beaker & RIS - ORC 12.1

orderedLocation

ORC 13

hospitalService AKA specialtyCode

Everything else: PV1 10 RAD (rispacs): PV1 52

patientUIN

PID 3.1 NOTE: ADT uses PID 2.1 because it’s ngemr, lab is sap

patientBirthdate

PID 7

MSH Timestamp

MSH 7

message control ID

MSH 10

procedureCode

OBR 4.1

specimen source

SPM 8.1 if exists, else OBR 15

specimen type

SPM 4.1

specimen collection time

SPM 17

testResultCode (lab)

OBX 3.1

testResultValue (lab / ecg) will either be string or number depending on filter for testResultCode

OBX 5 NOTE: if OBX 2 is “SN”, it’s a structured number eg. a ratio, safe to remove all the ^ delmiters and read as a string

testResultValue (rad / pathology)

OBX 8

r1Flag (rad)

ZPF 3

admitDatetime

PV1.44

Last updated

Was this helpful?