Question:
My question relates to HL7 v2 Query / Query response. In chapter 5 of the specification, it talks about a query and its response should be thought of as a message pair. Does that mean when a server responds to a query it should only respond with information pertaining to the query?
I ask because we are interacting with a service that can respond to a query with information from a previously timed out query in addition to the current query.
Would you consider that a breach of HL7?
Answer:
It’s certainly true that the expectation is that the query and response are a pair. Well, at least, that they are tied together. A single query may lead to multiple responses. Concerning the use of these messages, the specification says:
The variety of potential queries is almost unlimited
These transactions provide a format, or a set of tools to support queries to the extent desired by the institution. The resources available and local policies will influence the type of queries that are implemented
(Both quotes from section 5.2)
I wonder about the wisdom of responding to a new query with information from a previous query, but it’s certainly not a “breach of HL7″ (i.e. not conformant).

Most systems certainly won’t expect to receive answers from a previously query, in terms of processing and privacy this sounds like a nightmare.
So although maybe not a breach of HL7 v2 (because the scenario is not explicitely forbidden) it is certainly not in the spirit of HL7 v2.
Remember that HL7 v2 has a core principles that IMHO is violated by this vendor:
“snapshot mode” (send everything as it is NOW, in this case: at the time of receipt of THIS query – not as things have been before [=old response]). A system that sends a query expects a response to its query, not some old hat stuff still in cache somewhere.