visit the hl7 website The Demo site for our new HL7 Version 2+ (plus) Standard

18.4.169 QBP/RSP - Find Candidates (QBP) and Response (RSP) (Events Q22 and K22) (3.3.57)

This query/response is designed for interaction between a client system and an MPI (Master Person Index). The query consists of a set of demographics for a person, and the response is the list of candidates considered by the MPI to match that set.

Each returned person, specified by a PID segment, can also have an optional QRI - Query Response Instance segment containing information about the quality of the match.

Segment Cardinality Implement Status
QBP^Q22^QBP_Q21
MSH

Message Header

[1..1] SHALL
SFT

Software Segment

 
QPD

Query Parameter Definition

[1..1] SHALL
RCP

Response Control Parameter

[1..1] SHALL
DSC

Continuation Pointer

[0..1]  

 

QBP_Q21

MSH-15 MSH-16 Immediate ACK Application Ack
Blank Blank - RSP^K22^RSP_K22
Blank Blank - RSP^K23^RSP_K23
Blank Blank - RSP^K25^RSP_K25
Blank Blank - RSP^K32^RSP_K32
Blank Blank - RSP^K2^4^RSP_K24
Blank Blank - RSP^K21^RSP_K21
NE NE - -
NE NE - -
NE NE - -
NE NE - -
NE NE - -
NE NE - -
AL, SU, ER NE ACK^Q23^ACK -
AL, SU, ER NE ACK^Q22^ACK -
AL, SU, ER NE ACK^Q24^ACK -
AL, SU, ER NE ACK^Q32^ACK -
AL, SU, ER NE ACK^Q21^ACK -
NE AL, SU, ER - RSP^K25^RSP_K25
NE AL, SU, ER - RSP^K22^RSP_K22
NE AL, SU, ER - RSP^K21^RSP_K21
NE AL, SU, ER - RSP^K23^RSP_K23
AL, SU, ER AL, SU, ER ACK^Q25^ACK RSP^K25^RSP_K25
NE AL, SU, ER - RSP^K24^RSP_K24
NE AL, SU, ER - RSP^K32^RSP_K32
AL, SU, ER AL, SU, ER ACK^Q22^ACK RSP^K22^RSP_K22
AL, SU, ER AL, SU, ER ACK^Q21^ACK RSP^K21^RSP_K21
AL, SU, ER AL, SU, ER ACK^Q24^ACK RSP^K24^RSP_K24
AL, SU, ER AL, SU, ER ACK^Q32^ACK RSP^K32^RSP_K32
AL, SU, ER AL, SU, ER ACK^Q23^ACK RSP^K23^RSP_K23
We need some ER7 examples...
We need some XML examples...
Segment Cardinality Implement Status
RSP^K22^RSP_K22
MSH

Message Header

[1..1] SHALL
ARV

Access Restriction

  v2.9
UAC

User Authentication Credential Segment

[0..1]  
MSA

Message Acknowledgment

[1..1] SHALL
ERR

Error

[0..1]  
QAK

Query Acknowledgment

[1..1] SHALL
QPD

Query Parameter Definition

[1..1] SHALL
QUERY_RESPONSE  
PID

Patient Identification

[1..1] SHALL
PD1

Patient Additional Demographic

[0..1]  
NK1

Next of Kin / Associated Parties

 
QRI

Query Response Instance

[0..1]  
DSC

Continuation Pointer

[0..1]  

 

RSP_K22

MSH-15 MSH-16 Immediate ACK Application Ack
Blank Blank - -
NE NE - -
AL, SU, ER NE ACK^K22^ACK -
We need some ER7 examples...
We need some XML examples...

Following is an example of a Q22/K22 query/response pair of messages. First is the query:

MSH|^~\&|CLINREG|WESTCLIN|HOSPMPI|HOSP|199912121135-0600||QBP^Q22^QBP_Q21|1|D|2.5

QPD|Q22^Find Candidates^HL7nnn|111069|@PID.5.1^EVERYMAN~@PID.5.2^ADAM~ @PID.8^M|80|MATCHWARE|1.2||^^^GOOD HEALTH HOSPITAL~^^^SOUTH LAB|

RCP|I|20^RD

This query is asking for a list of persons matching the name ADAM EVERYMAN with the gender Male. Candidates with a match level above 80 using the algorithm Matchware version 1.2 should be returned. The returned records should include identifiers for both the assigning authorities GOOD HEALTH HOSPITAL and SOUTH LAB. The RCP segment specifies that the number of matches should be limited to 20. Here is a sample response:

MSH|^~\&|HOSPMPI|HOSP|CLINREG|WESTCLIN|200712121135-0600||RSP^K22^RSP_K22|1|D|2.5.1|

MSA|AA|8699|

QAK|111069|OK|Q22^Find Candidates^HL7nnnn|3|

QPD|Q22^Find Candidates^HL7nnn|111069|@PID.5.1^EVERYMAN~ @PID.5.2^ADAM~@PID.8^M|80|MATCHWARE|1.2||^^^GOOD HEALTH HOSPITAL~^^^SOUTH LAB|

PID|||66785^^^GOOD HEALTH HOSPITAL~99999^^^SOUTH LAB||Everyman^Adam||19630423|M||C|C^^Madison^WI^99999|

QRI|95||MATCHWARE 1.2|

PID|||87443^^^GOOD HEALTH HOSPITAL~651189^^^SOUTH LAB||Everyman^Adam||19470606|M||C|555-555-2004^^Madison^WI^99999|

QRI|90||MATCHWARE 1.2|

PID|||43266^^^GOOD HEALTH HOSPITAL~81209^^^SOUTH LAB||Everyman^Adam||19901210|M||C|4444 Home Street^^Lodi^WI^99999|

QRI|85||MATCHWARE 1.2|

Three candidates were returned. Notice the 3 at the end of the QAK segment signifying the number of matches. Each has a PID and QRI segment, and the QRI segment in each case gives a confidence factor for each of the candidates