MLLP.Ack (mllp v0.9.4)
Handles all Ack message operations including getting ack messages for a given HL7 message, creating the ack for a given message, and handling the return value for different ack codes.
Link to this section Summary
Functions
Gets the ack message for a given message and its application status
Verifies the ack code in the ack message against the original HL7 message. Possible valid codes and their values include: AA -- Application Accept CA -- Application Accept AR -- Application Reject CR -- Application Reject AE -- Application Error CE -- Application Error
Link to this section Types
ack_verification_result()
Specs
dispatcher_result()
Specs
dispatcher_result() :: {:ok, :application_accept | :application_error | :application_reject}
Specs
t() :: %MLLP.Ack{ acknowledgement_code: nil | String.t(), hl7_ack_message: nil | HL7.Message.t(), text_message: String.t() }
Link to this section Functions
get_ack_for_message(message, code, text_message \\ "")
Specs
get_ack_for_message( message :: HL7.Message.t() | String.t(), acknowledgement_code :: atom() | String.t(), text_message :: String.t() ) :: HL7.Message.t()
Gets the ack message for a given message and its application status
verify_ack_against_message(bad_message, bad_ack)
Specs
verify_ack_against_message( message :: String.t() | HL7.Message.t(), ack_message :: String.t() | HL7.Message.t() ) :: ack_verification_result()
Verifies the ack code in the ack message against the original HL7 message. Possible valid codes and their values include: AA -- Application Accept CA -- Application Accept AR -- Application Reject CR -- Application Reject AE -- Application Error CE -- Application Error
All other possible codes would be considered bad ack codes and the method returns :error