HL7 RSP_K11 Segment Pattern Response
RSP_K11 is the response side of the query-by-parameter pattern. The requester sends a QBP_Q11, and the receiver returns an RSP_K11 with acknowledgment status, query status, the echoed query definition, and optional row-style result content.
In real interfaces, this message often feels more like an API response than a clinical event. The important thing is not just whether the message parsed. It is whether MSA, QAK, QPD, and the returned data all agree about what question was answered.
A small RSP K11 example
What systems do with it
The receiver sends RSP_K11 after it evaluates the query parameters. The requester uses the message to continue a workflow, populate a screen, confirm an identifier, or decide that manual review is needed. Integration engines often use this pattern to enrich a message before routing it onward.
ERR and QAK are just as important as the returned data. ERR explains syntax or application problems. QAK tells the requester whether the query succeeded, found no data, hit a limit, or was rejected by the receiver's query rules.
How to read the structure
MSA acknowledges the original message control ID from MSH-10. QAK echoes the query tag from QPD and carries the query response status. QPD should match the original query definition closely enough that the requester can log exactly what was asked.
The optional row-definition group is where RSP_K11 becomes a segment-pattern response. RDF describes the columns, and each RDT carries one row of values. That can be useful, but it also means both sides must agree on datatypes, order, repetitions, and null handling.
Implementation traps
Do not treat the presence of MSA-1 AA as proof that a useful result exists. A receiver can accept the query message and still return a QAK status that means no match or no data. Your integration logic should read both layers.
Also be careful with row definitions that change over time. If the receiver adds a column to RDF and the requester maps RDT by position, an apparently harmless change can shift every downstream value into the wrong field.
Reference notes
HL7's refactored RSP_K11 description shows the response layout with MSH, MSA, ERR, QAK, QPD, an optional row definition, and DSC for continuation. See the HL7 Europe RSP_K11 and QBP_Q11 pages.