Skip to main content
Version: v0.0.4

Function: timestampFallbackFormat()

timestampFallbackFormat(position, matchedFormat): Hl7ParseWarning

Build a TIMESTAMP_FALLBACK_FORMAT warning. Emitted when a date/time field could not be parsed with its primary (strict HL7) format but a fallback format from ParseOptions.dateFormats or built-in fallbacks succeeded.

Parameters

position

Hl7Position

matchedFormat

string

Returns

Hl7ParseWarning

Example

import { timestampFallbackFormat } from "@cosyte/hl7";
const w = timestampFallbackFormat(
{ segmentIndex: 1, fieldIndex: 7 },
"YYYY-MM-DD",
);