tosch-hl7
    Preparing search index...

    Class Segment

    Class representing a segment with access to fields.

    Index

    Constructors

    • Creates an instance of Segment.

      Parameters

      • line: string

        The raw HL7 segment line.

      Returns Segment

    Methods

    • Retrieves a specific component of a field.

      Parameters

      • fieldIndex: number

        The field index.

      • componentIndex: number

        The 1-based index of the component within the field.

      Returns string

    • Retrieves a specific field by index.

      Parameters

      • index: number

        The field index (1-based access, but Field 0 = segment name)

      Returns undefined | string

    • Retrieves a field as an HL7Field object for advanced access.

      Parameters

      • index: number

        The field index.

      Returns HL7Field

    • Retrieves all fields of the segment.

      Returns string[]

    • Retrieves the name of the segment.

      Returns string

    • Retrieves a specific subcomponent of a component.

      Parameters

      • fieldIndex: number

        The field index.

      • componentIndex: number

        The 1-based index of the component.

      • subcomponentIndex: number

        The 1-based index of the subcomponent.

      Returns string

    • Converts the segment to a string in HL7 format.

      Returns string

      The segment as a string.