Constructs an HL7Message instance from a raw HL7 string.
The raw HL7 message string
OptionalAL1OptionalDG1OptionalEVNOptionalIN1OptionalIN2OptionalIN3OptionalMSHDirect access to specific segments by name, if they exist.
OptionalNK1OptionalNTEOptionalOBROptionalOBXOptionalPIDOptionalPR1OptionalPV1OptionalPV2OptionalROLRetrieves 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.