hl7batch / error
EL6002
hl7batch.unopened
Applies to: hl7v2
What it catches and why it matters
FTS or BTS appears without its matching FHS or BHS header.
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).
BTS|1 (no preceding BHS)
How to fix it
Restore the missing envelope header or remove an accidental extra trailer. Keep each BTS inside its corresponding BHS batch and each FTS paired with FHS.
False positives and limits
A capture starting midway through a batch may lack the header. Check the complete file before changing the sender.
Acknowledgments and suppression
No direct acknowledgment code is mapped for this rule. 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 EL6002, 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/EL6002.html