HL7v2 Editor (HL7v2 Parser) About the tool The HL7v2 (version 2.x) is a widely used standard that uses a segment-based approach for structuring data. HL7v2 messages are usually encoded in ER7 (Encoding Rules 7) which can be hard to understand, inspect, or edit.
I've built this HL7v2 Editor as a solution for quickly inspecting HL7v2 messages and getting a detailed structure of each segment. This should make the process of understanding and editing the HL7 messages easier.
Get ready to explore some HL7v2!
Demo HL7v2 message 1
MSH|^~\&|MegaReg|XYZHospC|SuperOE|XYZImgCtr|20060529090131-0500||ADT^A01^ADT_A01|01052901|P|2.5 3
PID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL’S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O|||||||0105I30001^^^99DEF^AN 4
PV1||I|W^389^1^UABH^^^^3||||12345^MORGAN^REX^J^^^MD^0010^UAMC^L||67890^GRAINGER^LUCY^X^^^MD^0010^UAMC^L|MED|||||A0||13579^POTTER^SHERMAN^T^^^MD^0010^UAMC^L|||||||||||||||||||||||||||200605290900 5
OBX|1|NM|^Body Height||1.80|m^Meter^ISO+|||||F 6
OBX|2|NM|^Body Weight||79|kg^Kilogram^ISO+|||||F 8
DG1|1||786.50^CHEST PAIN, UNSPECIFIED^I9|||A The ER7-encoded (pipe-delimited) HL7v2 message. Parsed result
Field Separator (String)
MSH-1 : {
}
Encoding Characters (String)
MSH-2 : {
String Data
MSH-2.1 : "^~\&"
}
Sending Application (Hierarchic designator)
MSH-3 : {
Namespace ID
MSH-3.1 : "MegaReg"
}
Sending Facility (Hierarchic designator)
MSH-4 : {
Namespace ID
MSH-4.1 : "XYZHospC"
}
Receiving Application (Hierarchic designator)
MSH-5 : {
Namespace ID
MSH-5.1 : "SuperOE"
}
Receiving Facility (Hierarchic designator)
MSH-6 : {
Namespace ID
MSH-6.1 : "XYZImgCtr"
}
Date/Time Of Message (Time stamp)
MSH-7 : {
Time
MSH-7.1 : "20060529090131-0500"
}
Message Type (Message type)
MSH-9 : {
Message Code
MSH-9.1 : "ADT"
Trigger Event
MSH-9.2 : "A01"
Message Structure
MSH-9.3 : "ADT_A01"
}
Message Control ID (String)
MSH-10 : {
String Data
MSH-10.1 : "01052901"
}
Processing ID (Processing type)
MSH-11 : {
Processing ID
MSH-11.1 : "P"
}
Version ID (Version identifier)
MSH-12 : {
Version ID
MSH-12.1 : "2.5"
}
Recorded Date/Time (Time stamp)
EVN-2 : {
Time
EVN-2.1 : "200605290901"
}
Patient Identification
PID
Patient Identifier List (Extended composite ID with check digit)
PID-3 : {
Number
PID-3.1 : "56782445"
Assigning Authority
PID-3.4 : "UAReg"
Identifier Type Code
PID-3.5 : "PI"
}
Patient Name (Extended person name)
PID-5 : {
Family Name
PID-5.1 : "KLEINSAMPLE"
Given Name
PID-5.2 : "BARRY"
Second and Further Given Names or Initials Thereof
PID-5.3 : "Q"
Suffix (e.g., JR or III)
PID-5.4 : "JR"
}
Date/Time of Birth (Time stamp)
PID-7 : {
}
Administrative Sex (Coded value for user-defined tables)
PID-8 : {
Coded Value for User-Defined Tables
PID-8.1 : "M" (Male)
}
Race (Coded element)
PID-10 : {
Identifier
PID-10.1 : "2028-9"
Name of Coding System
PID-10.3 : "HL70005"
Alternate Identifier
PID-10.4 : "RA99113"
Name of Alternate Coding Syste
PID-10.6 : "XYZ"
}
Patient Address (Extended address)
PID-11 : {
Street Address
PID-11.1 : "260 GOODWIN CREST DRIVE"
City
PID-11.3 : "BIRMINGHAM"
State or Province
PID-11.4 : "AL"
Zip or Postal Code
PID-11.5 : "35209"
Address Type
PID-11.7 : "M"
}
Patient Address (Extended address)
PID-11 : {
Street Address
PID-11.1 : "NICKELL’S PICKLES"
Other Designation
PID-11.2 : "10000 W 100TH AVE"
City
PID-11.3 : "BIRMINGHAM"
State or Province
PID-11.4 : "AL"
Zip or Postal Code
PID-11.5 : "35200"
Address Type
PID-11.7 : "O"
}
Patient Account Number (Extended composite ID with check digit)
PID-18 : {
Number
PID-18.1 : "0105I30001"
Assigning Authority
PID-18.4 : "99DEF"
Identifier Type Code
PID-18.5 : "AN"
}
Patient Class (Coded value for user-defined tables)
PV1-2 : {
Coded Value for User-Defined Tables
PV1-2.1 : "I" (Inpatient)
}
Assigned Patient Location (Person location)
PV1-3 : {
Point of Care
PV1-3.1 : "W"
}
Attending Doctor (Extended composite ID number and name)
PV1-7 : {
Family Name
PV1-7.2 : "MORGAN"
Second and Further Given Names or Initials Thereof
PV1-7.4 : "J"
Degree (e.g., MD) deprecated as of v 2.5
PV1-7.7 : "MD"
Source Table
PV1-7.8 : "0010"
Assigning Authority
PV1-7.9 : "UAMC"
Name Type Code
PV1-7.10 : "L"
}
Consulting Doctor (Extended composite ID number and name)
PV1-9 : {
Family Name
PV1-9.2 : "GRAINGER"
Given Name
PV1-9.3 : "LUCY"
Second and Further Given Names or Initials Thereof
PV1-9.4 : "X"
Degree (e.g., MD) deprecated as of v 2.5
PV1-9.7 : "MD"
Source Table
PV1-9.8 : "0010"
Assigning Authority
PV1-9.9 : "UAMC"
Name Type Code
PV1-9.10 : "L"
}
Hospital Service (Coded value for user-defined tables)
PV1-10 : {
Coded Value for User-Defined Tables
PV1-10.1 : "MED" (Medical Service)
}
Ambulatory Status (Coded value for user-defined tables)
PV1-15 : {
Coded Value for User-Defined Tables
PV1-15.1 : "A0" (No functional limitations)
}
Admitting Doctor (Extended composite ID number and name)
PV1-17 : {
Family Name
PV1-17.2 : "POTTER"
Given Name
PV1-17.3 : "SHERMAN"
Second and Further Given Names or Initials Thereof
PV1-17.4 : "T"
Degree (e.g., MD) deprecated as of v 2.5
PV1-17.7 : "MD"
Source Table
PV1-17.8 : "0010"
Assigning Authority
PV1-17.9 : "UAMC"
Name Type Code
PV1-17.10 : "L"
}
Admit Date/Time (Time stamp)
PV1-44 : {
Time
PV1-44.1 : "200605290900"
}
Set ID - OBX (Sequence ID)
OBX-1 : {
}
Value Type (Coded values for HL7 tables)
OBX-2 : {
Coded Value for HL7-Defined Tables
OBX-2.1 : "NM" (Numeric)
}
Observation Identifier (Coded element)
OBX-3 : {
Text
OBX-3.2 : "Body Height"
}
Observation Value
OBX-5 : {
}
Units (Coded element)
OBX-6 : {
Name of Coding System
OBX-6.3 : "ISO+"
}
Observation Result Status (Coded values for HL7 tables)
OBX-11 : {
Coded Value for HL7-Defined Tables
OBX-11.1 : "F" (Final results; Can only be changed with a corrected result.)
}
Set ID - OBX (Sequence ID)
OBX-1 : {
}
Value Type (Coded values for HL7 tables)
OBX-2 : {
Coded Value for HL7-Defined Tables
OBX-2.1 : "NM" (Numeric)
}
Observation Identifier (Coded element)
OBX-3 : {
Text
OBX-3.2 : "Body Weight"
}
Observation Value
OBX-5 : {
}
Units (Coded element)
OBX-6 : {
Name of Coding System
OBX-6.3 : "ISO+"
}
Observation Result Status (Coded values for HL7 tables)
OBX-11 : {
Coded Value for HL7-Defined Tables
OBX-11.1 : "F" (Final results; Can only be changed with a corrected result.)
}
Patient Allergy Information
AL1
Set ID - AL1 (Sequence ID)
AL1-1 : {
}
Allergen Code/Mnemonic/Description (Coded element)
AL1-3 : {
}
Set ID - DG1 (Sequence ID)
DG1-1 : {
}
Diagnosis Code - DG1 (Coded element)
DG1-3 : {
Identifier
DG1-3.1 : "786.50"
Text
DG1-3.2 : "CHEST PAIN, UNSPECIFIED"
Name of Coding System
DG1-3.3 : "I9"
}
Diagnosis Type (Coded value for user-defined tables)
DG1-6 : {
Coded Value for User-Defined Tables
DG1-6.1 : "A" (Admitting)
}