QPD-2 in HL7 v2: A Field Guide to Query Tag
QPD-2 is the requester's own bookkeeping value, separate from the message control ID, and it is the field that makes it possible to tell which response answers which of several queries in flight at once.
QPD-2 is the Query Tag field. The system sending a query assigns it freely, and it exists so that once a response comes back — carrying the same tag in the corresponding QAK segment — the requester can match that response to this specific outbound query, independent of the message control ID and independent of whatever else may be in flight at the same time.
What this field contains
Example
QPD-2 (SYNTHIBQ00019) is a fabricated query tag standing in for the value a requesting system would assign to this synthetic query.
Where this trips people up
It's easy to build a test harness that generates a fresh, effectively random query tag for every message without checking that the responding side's QAK actually echoes it back, since a single query fired in isolation looks correct either way. The gap only shows up once a test scenario fires several queries close together, at which point response-matching logic that was never really tested against concurrent queries starts pairing answers with the wrong requests, or failing to pair them at all.