HL7 RSP_K21 Get Person Demographics Response
RSP_K21 is the response to a QBP person-demographics query. It tells the requester whether the query was accepted, whether a person was found, and what demographic details the receiver is willing to return. The payload is patient-shaped, even though the interaction is a query response rather than an ADT event.
The practical core is MSA for message acknowledgment, QAK for query status, echoed QPD for the original question, and a repeating query-response group that can carry PID, PD1, NK1, and QRI.
A small RSP K21 example
What systems do with it
The requester typically uses RSP_K21 to populate demographics, confirm identity, or decide whether a user needs to resolve candidates manually. A portal may use it to confirm enrollment. An integration engine may use it to enrich a message before routing. A clinical app may use it to avoid creating a duplicate local patient.
PID carries the actual person identifiers and demographics. PD1 can provide patient-level primary-care or living arrangement details. NK1 may return contact or next-of-kin information when the profile allows it. QRI tells the requester how confident the matching service is about the result.
How to read the structure
Start with status. MSA says whether the query message was accepted at the application layer. QAK says what happened to the query itself. A clean interface checks both before trusting the PID group.
The query-response group can repeat when the receiver returns more than one candidate. That is useful for a human search screen and dangerous for an unattended interface unless the next step is clearly defined.
Implementation traps
Do not overwrite local demographics blindly. Query responses are snapshots from another system with its own data-quality rules. Decide which fields are authoritative and which should only be displayed for confirmation.
Also watch identifier domains in PID-3. If a response returns multiple identifiers, the receiver may include local, enterprise, national, and temporary values. Mapping the wrong one into a local MRN field is a small mistake with a long operational tail.
Reference notes
The HL7 refactored pages show RSP_K21 as the response structure for person-demographics query workflows. IHE demographics query guidance uses QBP/RSP interactions to return patient demographic candidates and status. See HL7 Europe QBP_Q21 and IHE ITI-21.