HL7 v2.5.1 Specificationsv2.5.1

to moveEnter to openTry PID-5, ADT, 0004

SQR: Schedule query response

This page lists the structures and trigger events SQR defines, taken from the standard. The written commentary that theADT page carries has not been written for SQR.

Recognising SQR messages

SQR announces itself in MSH-9 like this:

MSH-9SQR^S25^SQR_S25
  1. MSH-9.1SQRmessage code: what kind of message this is
  2. MSH-9.2S25trigger event: what happened in the real world: schedule query message and response
  3. MSH-9.3SQR_S25message structure: which segments to expect, and in what order

How to use these specifications explains MSH-9 in full, with a worked example.

Message structures

SQR takes 1 structure.

SQR_S25: Schedule Query Message and Response

Sent when one thing happens: S25: Schedule Query Message and Response.

You must always send: MSH, MSA, QAK. Everything else is optional, or required only inside a group you chose to send.

SegmentNameOPTCardinality
MSHR1..1
MSAR1..1
ERRO0..*
QAKR1..1
SCHEDULEa group of 5 segments, repeated togetherO0..*
SCHin SCHEDULER1..1
TQ1in SCHEDULEO0..*
NTEin SCHEDULEO0..*
PATIENTin SCHEDULEa group of 4 segments, repeated togetherO0..1
PIDin PATIENTR1..1
PV1in PATIENTO0..1
PV2in PATIENTO0..1
DG1in PATIENTO0..1
RESOURCESin SCHEDULEa group of 5 segments, repeated togetherR1..*
RGSin RESOURCESR1..1
SERVICEin RESOURCESa group of 2 segments, repeated togetherO0..*
AISin SERVICER1..1
NTEin SERVICEO0..*
GENERAL_RESOURCEin RESOURCESa group of 2 segments, repeated togetherO0..*
AIGin GENERAL_RESOURCER1..1
NTEin GENERAL_RESOURCEO0..*
PERSONNEL_RESOURCEin RESOURCESa group of 2 segments, repeated togetherO0..*
AIPin PERSONNEL_RESOURCER1..1
NTEin PERSONNEL_RESOURCEO0..*
LOCATION_RESOURCEin RESOURCESa group of 2 segments, repeated togetherO0..*
AILin LOCATION_RESOURCER1..1
NTEin LOCATION_RESOURCEO0..*
DSCO0..1

R inside a group means required of that group. Send the group and you must include that segment; leave the group out and it never appears. This structure has 7 such groups: SCHEDULE, PATIENT, RESOURCES, SERVICE, GENERAL_RESOURCE, PERSONNEL_RESOURCE, LOCATION_RESOURCE.

Trigger events

The trigger event is the real-world thing that made the message get sent. SQR defines 1.

EventNameStructure
S25Schedule Query Message and ResponseSQR_S25