Previous Page TOC Index Next Page

10.4.3 SQM/SQR - schedule query message and response (event S25)

Original Mode record-oriented query transactions are initiated from the querying application using the Schedule Query (SQM) to request information about a filler application’s schedule(s). The filler application responds to these requests, using the Schedule Query Response (SQR) message to either return the requested information, or to signal that an interfacing error of some kind has occurred. The definitions for the SQM message and the SQR response are listed below.

SQM     Schedule Query        Chapter
MSH     Message Header        2
QRD     Query Definition        2
[ QRF ]    Query Filter         2
[ ARQ    Appointment Request       10
  [ APR ]   Appointment Preferences      10
  [ PID ]   Patient Identification      3
  { RGS    Resource Group Segment      10
    [ { AIS   Appointment Information - Service    10
        [ APR ]  Appointment Preferences      10
      }
    ]
    [ { AIG   Appointment Information - General Resource  10
        [ APR ]  Appointment Preferences      10
      }
    ]
    [ { AIP   Appointment Information - Personnel Resource 10
        [ APR ]  Appointment Preferences      10
      }
    ]
    [ { AIL   Appointment Information - Location Resource 10
        [ APR ]  Appointment Preferences      10
      }
    ]
  }
]
[ DSC ]    Continuation Pointer       2
SQR     Schedule Query Response     Chapter
MSH     Message Header        2
MSA     Message Acknowledgment      2
[ ERR ]    Error          2
QAK     Query Acknowledgment       2
[ { SCH    Schedule Activity Information     10
    [ { NTE } ]  Notes and Comments       2
    [ PID   Patient Identification      3
      [ PV1 ]  Patient Visit        3
      [ PV2 ]  Patient Visit-Additional Information   3
      [ DG1 ]  Diagnosis Information       6
    ]
    { RGS   Resource Group Segment      10
      [ { AIS  Appointment Information - Service    10
          [ {NTE} ] Notes and Comments       2
        }
      ]
      [ { AIG  Appointment Information - General Resource  10
          [ {NTE} ] Notes and Comments       2
        }
      ]
      [ { AIP  Appointment Information - Personnel Resource 10
          [ {NTE} ] Notes and Comments       2
        }
      ]
      [ { AIL  Appointment Information - Location Resource 10
          [ {NTE} ] Notes and Comments       2
        }
      ]
    }
  }
]
[ DSC ]    Continuation Pointer       2

If the deferred response mode (as defined in Chapter 2, Section 2.18, "Original Mode Deferred Access") is required, then modify the above message definition as follows:

• A code of D for "deferred" appears in the third field of the QRD segment, "Query Priority."

• The acknowledgment of the initial SQM message is a general acknowledgment (ACK).

• The SQR message is sent as if it were an unsolicited message. The original querying application responds with a general acknowledgment message (ACK).

There is only one trigger event defined for schedule information queries. This trigger event is used for all original mode record-oriented schedule information queries. The specification of information to return in the query response is defined by the values provided in certain fields of the QRD and QRF segments.

QRD-2-query format code is assumed to hold the value R, indicating that the response should be in a record-oriented format. A value of D is invalid in QRD-2-query format, in conjunction with this trigger event, and should generate an error.

QRD-9-what subject filter defines the kind of information that the query is requesting. The following codes are suggested as possible candidates for this field, defining the different kinds of scheduling information requests that might be required by querying applications. Refer to HL7 table 0048 - What subject filter for valid values.

Scheduling additions to HL7 Table 0048 - What subject filter

Value

Description

SAL

All schedule related information, including open slots, booked slots, blocked slots

SOP

Open slots on the identified schedule

SBK

Booked slots on the identified schedule

SBL

Blocked slots on the identified schedule

SSA

Time slots available for a single appointment

SSR

Time slots available for a recurring appointment

QRF-1-where subject filter allows the query to specify the department, the system, or the subsystem.

Any remaining definition and filtering of the query should be achieved by supplying information in the chapter-specific segments that fall between the QRF segment and DSC segment in the message definition.

Previous Page TOC Index Next Page