Constructs an HL7Message instance from a raw HL7 string.
The raw HL7 message string
Optional
AL1Optional
DG1Optional
EVNOptional
IN1Optional
IN2Optional
IN3Optional
MSHDirect access to specific segments by name, if they exist.
Optional
NK1Optional
NTEOptional
OBROptional
OBXOptional
PIDOptional
PR1Optional
PV1Optional
PV2Optional
ROLRetrieves a value using path notation.
Format: 'SEGMENT-FIELD.COMPONENT.SUBCOMPONENT' (e.g., 'PID-5.1.2')
The value at the specified path
Retrieves all segments matching the specified name.
The name of the segment (e.g., 'PID', 'OBX')
An array of matching segments
Retrieves a specific segment by name. If there are multiple segments of the same type, returns the first one.
The name of the segment
The matching segment, or undefined if not found
Checks if a specific segment exists.
The name of the segment
True if the segment exists, false otherwise
Sets a value using path notation. Creates the field/component/subcomponent if it does not exist.
Format: 'SEGMENT-FIELD.COMPONENT.SUBCOMPONENT' (e.g., 'PID-5.1.2')
Value to set
Converts the HL7 message to a formatted string.
The HL7 message as a string
Represents an HL7 message, providing methods for parsing, accessing, and modifying its segments and fields.