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

18.8.137 QAK- query acknowledgment segment (5.5.2)

The QAK segment contains information sent with responses to a query. The QAK segment may appear as an optional segment placed after the (optional) ERR segment in any query response (message) to any original mode query.

HL7 Attribute Table - QAK - Query Acknowledgment

Base Framework
Seq#Data ElementDescriptionFlagsImplementCardinalityLengthC.LENVocabularyData Type
QAK

100696Query Tag
C

Condition defined for this element

=

Truncation not allowed!

MAY[0..1] 32
ST

String Data

200708Query Response Status MAY[0..1][2..2]univ: QueryResponseStatus (CD) hl7VS-queryResponseStatus (VS) queryResponseStatus (CS)
ID

Coded Value for HL7 Defined Tables

301375Message Query Name MAY[0..1] QueryName (CD)
CWE

Coded with Exceptions

401434Hit Count Total
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

501622This payload
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

601623Hits remaining
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

Conditions/Invariants

The root for the expression is on the segment.

Seq. Referenced Elements Introduction Invariant Comment
1 ?

Seq#Data ElementDescriptionFlagsImplementCardinalityLengthC.LENVocabularyData Type
QAK

100696Query Tag
C

Condition defined for this element

=

Truncation not allowed!

MAY[0..1] 32
ST

String Data

200708Query Response Status MAY[0..1][2..2]univ: QueryResponseStatus (CD) hl7VS-queryResponseStatus (VS) queryResponseStatus (CS)
ID

Coded Value for HL7 Defined Tables

301375Message Query Name MAY[0..1] QueryName (CD)
CWE

Coded with Exceptions

401434Hit Count Total
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

501622This payload
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

601623Hits remaining
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

Base FrameworkBase Standard Profile
Seq#Data ElementDescriptionFlagsImplementCardinalityLengthC.LENVocabularyData TypeImplementVocabulary
QAK 

100696Query Tag
C

Condition defined for this element

=

Truncation not allowed!

MAY[0..1] 32
ST

String Data

MAY
200708Query Response Status MAY[0..1][2..2]univ: QueryResponseStatus (CD) hl7VS-queryResponseStatus (VS) queryResponseStatus (CS)
ID

Coded Value for HL7 Defined Tables

MAY 
301375Message Query Name MAY[0..1] QueryName (CD)
CWE

Coded with Exceptions

MAY
401434Hit Count Total
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

MAY
501622This payload
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

MAY
601623Hits remaining
=

Truncation not allowed!

MAY[0..1] 10
NM

Numeric

MAY
Base Framework Base Standard Profile
Seq# Data Element Description Flags Optionality Repetition Length C.LEN Table Data Type Optionality Table
QAK  

1 00696 Query Tag
C

Condition defined for this element

O     32=  
ST

String Data

   
2 00708 Query Response Status   O   [2..2]  
ID

Coded Value for HL7 Defined Tables

  (0208)
3 01375 Message Query Name   O      
CWE

Coded with Exceptions

  (0471)
4 01434 Hit Count Total   O     10=  
NM

Numeric

   
5 01622 This payload   O     10=  
NM

Numeric

   
6 01623 Hits remaining   O     10=  
NM

Numeric

   
Seq# Data Element Description Optionality Repetition Length C.LEN Table Data Type
QAK
1 00696 Query Tag C     32=  
ST

String Data

2 00708 Query Response Status O   [2..2] (0208)
ID

Coded Value for HL7 Defined Tables

3 01375 Message Query Name O     (0471)
CWE

Coded with Exceptions

4 01434 Hit Count Total O     10=  
NM

Numeric

5 01622 This payload O     10=  
NM

Numeric

6 01623 Hits remaining O     10=  
NM

Numeric

18.8.137.1 QAK field definitions (5.5.2.0)

18.8.137.2 QAK-1 Query Tag (ST) 00696 (5.5.2.1)

Definition: This field may be valued by the initiating system to identify the query, and may be used to match response messages to the originating query. If it is valued, the responding system is required to echo it back as the first field in the query acknowledgment segment (QAK). This field differs from MSA-2-message control ID in that its value remains constant for each message (i.e., all continuation messages) associated with the query, whereas MSA-2-Message control ID may vary with each continuation message, since it is associated with each individual message, not the query as a whole. QAK-1-Query tag is not conditional on the presence of the QRD-1-Query ID field in the original mode queries; in the original mode queries QAK-1-Query tag is not used.

18.8.137.3 QAK-2 Query Response Status (ID) 00708 (5.5.2.2)

Definition: This field allows the responding system to return a precise response status. It is especially useful in the case where no data is found that matches the query parameters, but where there is also no error. Refer to HL7 Table 0208 - Query Response Status in Chapter 2C, Code Tables, for valid values.

18.8.137.4 QAK-3 Message Query Name (CWE) 01375 (5.5.2.3)

Definition: This field contains the name of the query. These names are assigned by the function-specific chapters of this specification. Site-specific event replay query names begin with the letter "Z." Refer to User defined table 0471 - Query name in Chapter 2C, Code Tables, for suggested values.

18.8.137.5 QAK-4 Hit Count Total (NM) 01434 (5.5.2.4)

Definition: This field, when used, contains the total number of records found by the Server that matched the query. For tabular responses, this is the number of rows found. For other response types, the Query Profile defines the meaning of a "hit."

18.8.137.6 QAK-5 This Payload (NM) 01622 (5.5.2.5)

Definition: This field, when used, contains the total number of matching records that the Server sent in the current response. Where the continuation protocol is used to transmit the response in partial installments, this number will differ from the value sent in QAK-4-Hit count total.

18.8.137.7 QAK-6 Hits Remaining (NM) 01623 (5.5.2.6)

Definition: This field, when used, contains the number of matching records found by the Server that have yet to be sent. It is only meaningful when the Server uses the continuation protocol to transmit partial responses.