Chapter 05: Query
Asking a system a question and getting an answer back.
Where most of HL7 v2 pushes information at you, this chapter is about requesting it: the query messages, their responses, and the several generations of query mechanism the standard accumulated.
What is in this chapter
- 61 trigger eventsthe real-world things that cause one of these messages to be sent
- 16 segmentsthe lines these messages are built from, and the fields on each
- 17 code tablesthe value sets the fields in this chapter draw from
- 18 message typesDSR, EDR, EQQ, ERP, QBP, QCK, QCN, QSB, QSX, QVR, RDY, RQQ, RSP, RTB, SPQ, TBR, UDM, VQQ
Message types defined here
DSRDisplay responseNamed by the standard without a structure of its own.
EDREnhanced display responseNamed by the standard without a structure of its own.
EQQEmbedded query language queryNamed by the standard without a structure of its own.
ERPEvent replay responseNamed by the standard without a structure of its own.
QBPQuery by parameter6 structures, fired by 22 trigger events.
QCKDeferred queryNamed by the standard without a structure of its own.
QCNCancel query1 structure, fired by 2 trigger events.
QSBCreate subscription1 structure, fired by 2 trigger events.
QSXCancel subscription/acknowledge messageNamed by the standard without a structure of its own.
QVRQuery for previous events1 structure, fired by 1 trigger event.
RDYDisplay based response1 structure, fired by 2 trigger events.
RQQEvent replay queryNamed by the standard without a structure of its own.
RSPSegment pattern response10 structures, fired by 13 trigger events.
RTBTabular response3 structures, fired by 7 trigger events.
SPQStored procedure requestNamed by the standard without a structure of its own.
TBRTabular data responseNamed by the standard without a structure of its own.
UDMUnsolicited display update messageNamed by the standard without a structure of its own.
VQQVirtual table queryNamed by the standard without a structure of its own.
Segments defined here
These 16 segments are defined in chapter 05. Messages in other chapters may still carry them.
DSPdisplay data segmentEQLEmbedded Query LanguageERQEvent replay queryQAKquery acknowledgment segmentQIDquery identification segmentQPDquery parameter definitionQRDOriginal-Style Query DefinitionQRFOriginal style query filterQRIquery response instance segmentRCPresponse control parameter segmentRDFtable row definition segmentRDTtable row data segmentSPRStored Procedure Request DefinitionURDResults/update DefinitionURSUnsolicited SelectionVTQVirtual Table Query Request
Trigger events
A trigger event is the thing that happens in the hospital and causes a message to be sent. Chapter 05 defines 61 of them.
J01cancel query/acknowledge messageJ02cancel subscription/acknowledge messageK11K13K15K21K22K23K24K25K31Q01original mode display query - immediate responseQ02deferred queryQ03deferred response to a queryQ04embedded query language queryQ05unsolicited display update messageQ07Virtual Table queryQ08stored procedure requestQ09event replay queryQ11Q13Q15Q16Create subscriptionQ17query for previous eventsQ21Q22Q23Q24Q25Q31R07R08R09R11Z73Z74Z75Z76Z77Z78Z79Z80Z81Z82Z83Z84Z85Z86Z87Z88Z89Z90Z91Z92Z93Z94Z95Z96Z97Z98Z99