Function: encodingMismatch()
encodingMismatch(
position,detail):Hl7ParseWarning
Build an ENCODING_MISMATCH warning. Emitted when the MSH-2 encoding
characters declared by the sender do not match what the parser observed
downstream (e.g. the sender declares ^~\& but uses !@#$ as actual
separators in later segments).
Parameters
position
detail
string
Returns
Example
import { encodingMismatch } from "@cosyte/hl7";
const w = encodingMismatch({ segmentIndex: 0 }, "MSH-2 declares ^~\\& but segment used !@#$");