For clarity, A is the system initiating the query and B is the system sending the responses. Multiple queries and responses are permitted within single messages. The responses to a given query may be broken into several separate DSR messages. A single DSR message may contain responses to more than one QRY.
QRY (A to B) Query Message Chapter
MSH Message Header 2
QRD Query Definition 2
[ QRF ] Query Filter 2
[ DSC ] Continuation Pointer 2
QCK (B to A) Query General Acknowledgment Chapter
MSH Message Header 2
MSA Message acknowledgment 2
[ ERR ] Error 2
[ QAK ] Query Acknowledgment 2