hl7batch / error
EL6005
hl7batch.separator
Applies to: hl7v2
What it catches and why it matters
FHS, BHS and MSH headers disagree on the field separator or the encoding characters, or a header's encoding characters are malformed. Split-and-merge tooling reads every message with the first header's separators, so a disagreeing message is misparsed.
Failing example
These synthetic fragments illustrate the defect; they are not complete interchange files. Backslash escapes name bytes such as \r (CR) and \n (LF).
BHS|^~\& MSH*^~\&*EXAMPLE (field separator changes from | to *)
How to fix it
Use consistent declared separators and well-formed encoding characters throughout each enclosing batch/file context. Regenerate payload fields with the same declarations.
False positives and limits
Separately valid messages concatenated under one batch header may disagree. Validate them separately or normalize their serialization before batching; changing only the header is insufficient.
Acknowledgments and suppression
Related acknowledgment codes (apply only to the described defect): ACK code 101 (ERR-3): a required field is absent, only when this finding reports empty MSH-2; other separator and batch-header defects need partner-specific handling HL7 ACKs acknowledge individual messages. Batch/file envelope and count errors have no universal ACK code; response batches and error handling depend on the partner agreement. ERR-3 uses Table 0357 and does not determine the acknowledgment status in MSA-1. Sources: https://www.hl7.eu/refactored/ctrl.html (2.10.3.2) https://www.hl7.eu/refactored/segERR.html https://terminology.hl7.org/5.5.0/CodeSystem-v2-0357.html Suppress the rule with --disable EL6005, or list it under "disable" in .edilint.yml. To accept the occurrences a file already has without suppressing the rule, record them with --write-baseline and run with --baseline. Reference: https://crb2nu.github.io/edilint/rules/EL6005.html