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.
Seq# | DataElement | Description | Must Implement | Flags | Cardinality | Length | C.LEN | Vocabulary | DataType |
---|---|---|---|---|---|---|---|---|---|
QAK | |||||||||
1
|
00696 | Query Tag |
MAY
True: False: |
C= |
[1..1] [0..1] |
32 | ST | ||
2 | 00708 | Query Response Status | [0..1] | [2..2] | ID | ||||
3 | 01375 | Message Query Name | [0..1] | CWE | |||||
4 | 01434 | Hit Count Total | = | [0..1] | 10 | NM | |||
5 | 01622 | This payload | = | [0..1] | 10 | NM | |||
6 | 01623 | Hits remaining | = | [0..1] | 10 | NM |
(Definition from QAK.1 in Ch. 5)
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.
(Definition from QID.1 in Ch. 5)
Definition: This field identifies the instance of a query.
(Definition from QPD.2 in Ch. 5)
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 this field is valued, the responding system is required to echo it back as the first field in the query acknowledgement 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.
Implementation considerations: It is not necessary to value this field in implementations where the only return message on the socket will be the response to the query that was just sent. Conversely, in an "asynchronous" implementation where many queries, responses, and other messages may be communicated bidirectionally over the same socket, it is essential that this field be valued so that the Client knows to which query the Server is responding.
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.
(Definition from QAK.3 in Ch. 5)
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.
(Definition from QID.2 in Ch. 5)
Definition: This field contains the name of the query. These names are assigned by the function-specific chapters of this specification. Site-specific query names begin with the letter "Z." Refer to User defined table 0471 – Query name for suggested values.
(Definition from QPD.1 in Ch. 5)
Definition: This field contains the name of the query. These names are assigned by the function-specific chapters of this specification. It is one to one with the Query Profile for this query name, and it is in fact an identifier for that Query Profile. Site-specific query names begin with the letter "Z." Refer to User defined table 0471 – Query name in Chapter 2C, Code Tables, for suggested values.
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."
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.
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.