HL7 QCK_Q02 Deferred Query Acknowledgment

HL7 message structure QCK_Q02 groups and segments from HL7 v2.5.1 Hide structure

These are the generated groups and segments for the version selected at the top of the page. The article explains the workflow, and this panel follows the chosen HL7 version.

Message Structure

SegmentNameRequiredRepeatable
Message Header Yes No
Software Segment No Yes
Message Acknowledgment Yes No
Error No No
Query Acknowledgment No No

QCK_Q02 appears in the older deferred query workflow. The requester sends a query that cannot or should not be answered immediately. The receiver returns QCK_Q02 to say whether the query request was accepted, rejected, or errored, then sends the actual deferred display response later as DSR_Q03.

This pattern feels unusual if you are used to modern request-response APIs. QCK_Q02 is not the data response. It is the application saying, "I received the query and here is whether I can work on it."

A small QCK Q02 example

MSH|^~\&|ARCHIVE|CITYHOSP|PORTAL|CITYHOSP|20260717102001||QCK^Q02^QCK_Q02|QCKQ020001|P|2.5.1 MSA|AA|QRYQ020001 QAK|QRYQ020001|OK

What workflow it represents

The receiver sends QCK_Q02 shortly after it accepts a deferred query. The requester should record the query ID and wait for the later response instead of treating the acknowledgment as the final answer. If the receiver rejects the query, ERR should explain what went wrong.

Deferred query flows need operational discipline. Message control IDs, query IDs, and audit logs are how support teams prove that the later response belongs to the original request.

How to read the structure

MSH identifies the QCK message. MSA acknowledges the triggering query message. ERR is optional for error detail, and QAK gives query-level status when the receiver can report it.

There is no QRD, QRF, or result payload in QCK_Q02. If your implementation puts data here, it is mixing the acknowledgment and response layers and will be painful to troubleshoot.

Implementation traps

The common mistake is closing the workflow as soon as MSA-1 is AA. That only means the receiver accepted the query request. The business answer still arrives later.

Another trap is not planning for a rejected deferred query. A requester should surface a clear error, retry only when the error is transient, and avoid sending repeated duplicate queries that create duplicate work on the receiver.

Reference notes

HL7's original deferred query material separates the first acknowledgment from the later display response. Caristix and the HL7 v2 query chapter both describe Q02 as the deferred query acknowledgment side of that flow.