Interface: AckErrorDetail
One ERR segment's worth of error detail for buildAck. Carries codes and
locations only: never echoed PHI values (the phi-redaction-review gate
binds this contract).
Example
import { buildAck } from "@cosyte/hl7";
const ack = buildAck(inbound, {
code: "AE",
error: { conditionCode: "101", severity: "E", location: "PID^1^5" },
});
Properties
conditionCode?
readonlyoptionalconditionCode?:string
HL7 Table 0357 message error condition code (ERR-3.1). Defaults to "207"
(Application internal error). The standard display text is looked up from
Table 0357 and emitted in ERR-3.2; unknown codes emit with empty text
(the code is preserved verbatim: never dropped).
location?
readonlyoptionallocation?:string
Error location (ERR-2, an HL7 ERL). A structural path such as "PID^1^5"
(segment id ^ segment sequence ^ field position). Must not contain a
patient data value: locations point at where, never what.
severity?
readonlyoptionalseverity?:ErrSeverity
HL7 Table 0516 severity (ERR-4). Defaults to "E" (Error).