HL7 RTB_Knn Generic Tabular Response
RTB_Knn is the generic tabular response shape. The Knn trigger is a placeholder, so concrete pages such as RTB_K13 are clearer when a named query profile is available. Use this page when the local data or partner documentation really points at a variable or site-defined RTB response.
In practice, RTB responses behave like small tables inside HL7 v2. The receiver acknowledges the query, reports query status, echoes the query definition, and returns profile-defined content. Many concrete tabular profiles use RDF to define columns and RDT to carry rows.
A small RTB Knn example
What workflow it represents
A requester sends a QBP-style query and the receiver answers with rows. The requester reads MSA for message acknowledgment, QAK for query status, QPD for the echoed query, and then the tabular content defined by the profile.
This shape is useful for lookup-style workflows where the result is naturally a list: candidate patients, recent observations, provider rows, available slots, code-table entries, or local reference data.
How to read the structure
The local RTB_Knn structure contains MSH, optional SFT, MSA, optional ERR, QAK, QPD, two profile-defined anyHL7Segment placeholders, and optional DSC. That wildcard shape is a reminder that the actual row definition belongs to the query profile.
When RDF/RDT are used, RDF is the column contract and each RDT segment is a row. Downstream maps should respect that column order exactly, because a shifted or silently renamed column can corrupt every row value.
Implementation traps
Do not choose RTB_Knn just to avoid agreeing on a concrete trigger and row definition. The placeholder still needs a profile that defines the query name, QPD parameters, response trigger, row segments, datatypes, and continuation behavior.
Also do not stop at MSA. A response can be accepted at the message layer while QAK reports no data, too many matches, application rejection, or another query-level status that should drive the caller's next step.
Reference notes
HL7 terminology identifies RTB as a tabular response. The local v2.5.1 RTB_Knn structure uses MSH, optional SFT, MSA, optional ERR, QAK, QPD, profile-defined result content, and optional DSC.