visit the hl7 website The Demo site for our new HL7 Version 2+ (plus) Standard

18.8.83 MSA - message acknowledgment segment (2.14.8)

The MSA segment contains information sent while acknowledging another message.

HL7 Attribute Table - MSA - Message Acknowledgment

Base Framework
Seq#Data ElementDescriptionFlagsImplementCardinalityLengthC.LENVocabularyData Type
MSA
100018Acknowledgment Code SHALL[1..1][2..2]univ: AcknowledgmentCode (CD) hl7VS-acknowledgmentCode (VS) acknowledgmentCodes (CS)
ID

Coded Value for HL7 Defined Tables

200010Message Control ID
=

Truncation not allowed!

SHALL[1..1][1..199]
ST

String Data

300020Text Message
W

withdrawn Element

SHOULD NOT   
400021Expected Sequence Number MAY[0..1] 
NM

Numeric

500022Delayed Acknowledgment Type
W

withdrawn Element

SHOULD NOT   
600023Error Condition
W

withdrawn Element

SHOULD NOT   
701827Message Waiting Number  MAY[0..1] 
NM

Numeric

801828Message Waiting Priority MAY[0..1][1..1]univ: V2MessageWaitingPriority (CD) hl7VS-messageWaitingPriority (VS) messageWaitingPriority (CS)
ID

Coded Value for HL7 Defined Tables

Seq#Data ElementDescriptionFlagsImplementCardinalityLengthC.LENVocabularyData Type
MSA
100018Acknowledgment Code SHALL[1..1][2..2]univ: AcknowledgmentCode (CD) hl7VS-acknowledgmentCode (VS) acknowledgmentCodes (CS)
ID

Coded Value for HL7 Defined Tables

200010Message Control ID
=

Truncation not allowed!

SHALL[1..1][1..199]
ST

String Data

300020Text Message
W

withdrawn Element

SHOULD NOT   
400021Expected Sequence Number MAY[0..1] 
NM

Numeric

500022Delayed Acknowledgment Type
W

withdrawn Element

SHOULD NOT   
600023Error Condition
W

withdrawn Element

SHOULD NOT   
701827Message Waiting Number  MAY[0..1] 
NM

Numeric

801828Message Waiting Priority MAY[0..1][1..1]univ: V2MessageWaitingPriority (CD) hl7VS-messageWaitingPriority (VS) messageWaitingPriority (CS)
ID

Coded Value for HL7 Defined Tables

Base FrameworkBase Standard Profile
Seq#Data ElementDescriptionFlagsImplementCardinalityLengthC.LENVocabularyData TypeImplementVocabulary
MSA 
100018Acknowledgment Code SHALL[1..1][2..2]univ: AcknowledgmentCode (CD) hl7VS-acknowledgmentCode (VS) acknowledgmentCodes (CS)
ID

Coded Value for HL7 Defined Tables

SHALL 
200010Message Control ID
=

Truncation not allowed!

SHALL[1..1][1..199]
ST

String Data

SHALL 
300020Text Message
W

withdrawn Element

SHOULD NOT   SHOULD NOT 
400021Expected Sequence Number MAY[0..1] 
NM

Numeric

MAY 
500022Delayed Acknowledgment Type
W

withdrawn Element

SHOULD NOT   SHOULD NOT 
600023Error Condition
W

withdrawn Element

SHOULD NOT   SHOULD NOT 
701827Message Waiting Number  MAY[0..1] 
NM

Numeric

MAY 
801828Message Waiting Priority MAY[0..1][1..1]univ: V2MessageWaitingPriority (CD) hl7VS-messageWaitingPriority (VS) messageWaitingPriority (CS)
ID

Coded Value for HL7 Defined Tables

MAY 
Base Framework Base Standard Profile
Seq# Data Element Description Flags Optionality Repetition Length C.LEN Table Data Type Optionality Table
MSA  
1 00018 Acknowledgment Code   R   [2..2]  
ID

Coded Value for HL7 Defined Tables

  (0008)
2 00010 Message Control ID   R   [1..199] =  
ST

String Data

   
3 00020 Text Message   W            
4 00021 Expected Sequence Number   O      
NM

Numeric

   
5 00022 Delayed Acknowledgment Type   W            
6 00023 Error Condition   W            
7 01827 Message Waiting Number   O      
NM

Numeric

   
8 01828 Message Waiting Priority   O   [1..1]  
ID

Coded Value for HL7 Defined Tables

  (0520)
Seq# Data Element Description Optionality Repetition Length C.LEN Table Data Type
MSA
1 00018 Acknowledgment Code R   [2..2] (0008)
ID

Coded Value for HL7 Defined Tables

2 00010 Message Control ID R   [1..199] =  
ST

String Data

3 00020 Text Message W        
4 00021 Expected Sequence Number O      
NM

Numeric

5 00022 Delayed Acknowledgment Type W        
6 00023 Error Condition W        
7 01827 Message Waiting Number O      
NM

Numeric

8 01828 Message Waiting Priority O   [1..1] (0520)
ID

Coded Value for HL7 Defined Tables

18.8.83.1 MSA field definitions (2.14.8.0)

18.8.83.2 MSA-1 Acknowledgment Code (ID) 00018 (2.14.8.1)

Definition: This field contains an acknowledgment code, see message processing rules. Refer to HL7 Table 0008 - Acknowledgment Code for valid values.

18.8.83.3 MSA-2 Message Control ID (ST) 00010 (2.14.8.2)

Definition: This field contains the message control ID of the message sent by the sending system. It allows the sending system to associate this response with the message for which it is intended.

18.8.83.4 MSA-3 Text Message 00020 (2.14.8.3)

Attention: The MSA-3 was deprecated as of v 2.4 and the detail was withdrawn and removed from the standard as of v 2.7. The reader is referred to the ERR segment. The ERR segment allows for richer descriptions of the erroneous conditions.

18.8.83.5 MSA-4 Expected Sequence Number (NM) 00021 (2.14.8.4)

Definition: This optional numeric field is used in the sequence number protocol.

18.8.83.6 MSA-5 Delayed Acknowledgment Type 00022 (2.14.8.5)

Attention: The MSA-5 was deprecated as of v2.2 and the detail was withdrawn and removed from the standard as of v 2.5.

18.8.83.7 MSA-6 Error Condition 00023 (2.14.8.6)

Attention: The MSA-3 was deprecated as of v 2.4 and the detail was withdrawn and removed from the standard as of v 2.7. The reader is referred to the ERR segment. The ERR segment allows for richer descriptions of the erroneous conditions.

18.8.83.8 MSA-7 Message Waiting Number (NM) 01827 (2.14.8.7)

Definition: If present, indicates the number of messages the Acknowledging Application has waiting on a queue for the Requesting Application. These messages would then need to be retrieved via a query. This facilitates receiving applications that cannot receive unsolicited message (i.e., polling).

For example, if there are 3 low priority messages, 1 medium priority message and 1 high priority message, the message waiting number would be 5, because that is the total number of messages.

Use Case: An application that is playing a "requesting" role has limited network access to a centralized application playing a receiving role. When the requesting application contacts the acknowledging application with a regular update or query message, the acknowledging application replies with the appropriate response message, along with an indication that there are urgent messages waiting. The requesting application submits a query to retrieve the queued messages.

18.8.83.9 MSA-8 Message Waiting Priority (ID) 01828 (2.14.8.8)

Definition: If present, indicates that the Sending Application has messages waiting on a queue for the Receiving Application. These messages would then need to be retrieved via a query. This facilitates receiving applications that cannot receive unsolicited messages (i.e., polling). The code specified identifies how important the most important waiting message is (and can govern how soon the receiving application is required to poll for the message).

For example, if there are 3 low priority messages, 1 medium priority message and 1 high priority message, the message waiting priority would be 'high', because that is the highest priority of any message waiting.

With some applications, there is no guarantee that the sending application will be running. The receiving application is therefore unable to submit unsolicited messages. To mitigate this, a polling approach is used where the receiving application requests any queued messages when it is connected. To avoid the network overhead of continuous polling, the sending application needs a way to indicate that there are queued messages awaiting retrieval. It is also useful to provide an indication of the importance of those messages to indicate how quickly they must be retrieved.

Refer to HL7 Table 0520 - Message Waiting Priority in Chapter 2C, Code Tables, for valid values.

See MSA-7 above for Use Case.