Skip to main content
Version: v0.0.4

Function: versionMismatch()

versionMismatch(position, declared, expected): Hl7ParseWarning

Build a VERSION_MISMATCH warning. Emitted when MSH-12 declares an HL7 version that does not match what the active profile or ParseOptions expected.

Parameters

position

Hl7Position

declared

string

expected

string

Returns

Hl7ParseWarning

Example

import { versionMismatch } from "@cosyte/hl7";
const w = versionMismatch({ segmentIndex: 0, fieldIndex: 12 }, "2.9", "2.5");