Logic for parsing HL7 Message
This page will cover our logic for how we parse and read the HL7 messages and eventually use it for our escalation logic
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?