Skip to main content
Version: v0.0.4

Function: fieldWhitespaceTrimmed()

fieldWhitespaceTrimmed(position, leadingCount, trailingCount): Hl7ParseWarning

Build a FIELD_WHITESPACE_TRIMMED warning. Emitted when the parser trims leading or trailing whitespace from a field value (the trimFields option, on by default). The message carries only the leading/trailing character counts: NEVER the field value itself (before or after trimming): so no PHI is exposed; the trimmed value is still preserved verbatim in the parsed output.

Parameters

position

Hl7Position

leadingCount

number

trailingCount

number

Returns

Hl7ParseWarning

Example

import { fieldWhitespaceTrimmed } from "@cosyte/hl7";
const w = fieldWhitespaceTrimmed({ segmentIndex: 1, fieldIndex: 5 }, 2, 1);