HL7 QVR_Q17 Query for Previous Events
QVR_Q17 asks a responder for previous events. It is a query-style message that can carry normal QPD parameters and, when useful, an example HL7 segment that describes the kind of event being requested.
Think of it as a safer, more explicit cousin of replay-by-email: it asks the source system to locate prior events under a defined query contract.
A small QVR Q17 example
What systems do with it
The requester asks for historical messages or events matching a patient, date range, event type, location, or other profile-defined parameters. The optional query-by-example segment can help the responder understand what kind of event is being requested.
The response pattern depends on the profile. Some responders return a query response. Others trigger replay of matching events through an operational feed.
How to read the structure
MSH identifies QVR^Q17^QVR_Q17. QPD carries the query name, tag, and parameters. The optional QBP group can contain an HL7 segment such as EVN to express a query-by-example hint. RCP controls response timing and limits. DSC supports continuation.
Implementation traps
Define exactly what "previous event" means. Is it the original message, the latest corrected business event, the audit record, or a regenerated message? Those are different things operationally.
Also add replay safeguards. QVR_Q17 can produce old messages that downstream systems already processed years ago.
Reference notes
HL7 v2 includes QVR_Q17 as a query for previous events. The local v2.5.1 structure shows QPD, optional query-by-example content, RCP, and DSC.