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:
SQR^S25^SQR_S25- MSH-9.1
SQRmessage code: what kind of message this is - MSH-9.2
S25trigger event: what happened in the real world: schedule query message and response - MSH-9.3
SQR_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.
| Segment | Name | OPT | Cardinality |
|---|---|---|---|
| MSH | R | 1..1 | |
| MSA | R | 1..1 | |
| ERR | O | 0..* | |
| QAK | R | 1..1 | |
| SCHEDULE | a group of 5 segments, repeated together | O | 0..* |
| SCHin SCHEDULE | R | 1..1 | |
| TQ1in SCHEDULE | O | 0..* | |
| NTEin SCHEDULE | O | 0..* | |
| PATIENTin SCHEDULE | a group of 4 segments, repeated together | O | 0..1 |
| PIDin PATIENT | R | 1..1 | |
| PV1in PATIENT | O | 0..1 | |
| PV2in PATIENT | O | 0..1 | |
| DG1in PATIENT | O | 0..1 | |
| RESOURCESin SCHEDULE | a group of 5 segments, repeated together | R | 1..* |
| RGSin RESOURCES | R | 1..1 | |
| SERVICEin RESOURCES | a group of 2 segments, repeated together | O | 0..* |
| AISin SERVICE | R | 1..1 | |
| NTEin SERVICE | O | 0..* | |
| GENERAL_RESOURCEin RESOURCES | a group of 2 segments, repeated together | O | 0..* |
| AIGin GENERAL_RESOURCE | R | 1..1 | |
| NTEin GENERAL_RESOURCE | O | 0..* | |
| PERSONNEL_RESOURCEin RESOURCES | a group of 2 segments, repeated together | O | 0..* |
| AIPin PERSONNEL_RESOURCE | R | 1..1 | |
| NTEin PERSONNEL_RESOURCE | O | 0..* | |
| LOCATION_RESOURCEin RESOURCES | a group of 2 segments, repeated together | O | 0..* |
| AILin LOCATION_RESOURCE | R | 1..1 | |
| NTEin LOCATION_RESOURCE | O | 0..* | |
| DSC | O | 0..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.
| Event | Name | Structure |
|---|---|---|
| S25 | Schedule Query Message and Response | SQR_S25 |