Skip to main content

core.hl7message.getacktype

Home > @medplum/core > Hl7Message > getAckType

Hl7Message.getAckType() method

Returns this message's acknowledgment code (MSA-1), if it is a recognized HL7 ACK code.

Useful on an ACK message to decide the outcome of the acknowledged message — e.g. AA/CA (accepted) vs AR/CR (rejected) vs AE/CE (error). The value is upper-cased before matching. Returns undefined when there is no MSA segment, MSA-1 is empty, or the value is not a known AckCode.

Signature:

getAckType(): AckCode | undefined;

Returns:

AckCode | undefined

The AckCode, or undefined.