Z95

Tabular Dispense History

To retrieve patient pharmacy dispense history information from the Server.

Note that this Query Profile includes no separate Output Description and Commentary. In the QBP/RTB combination using the QSC variant, the selection criteria in QPD-3-user parameters and the desired return data in RDF-2-column description are constructed from the same Virtual Table, which appears in the Input Specification.

Query/Response Flow

Query Message
QBP^Z95
QBP_Q13
Response Message
RTB^Z96
RTB_K13

Input Fields

QPD
SeqField NameTypeOptRepLenK/SSortOpTableSegment Field
1
MessageQueryName
CWER60-
2
QueryTag
STR32-
3
SelectionCriteria
STR*255-
VIRTUAL
SeqField NameTypeOptRepLenK/SSortOpTableSegment Field
1
PatientList
PID-3: Patient Identifier List
CXO20SYPID.3
2
PatientName
PID-5 Patient Name
XPN48-PID.5
3
OrderControlCode
ORC-1 Order Control
ID2S-119ORC.1
4
MedicationDispensed
RXD-2 Dispense/Give Code
CWE100SYRXD.2
5
DispenseDate
RXD-2 Date/Time Dispensed
DTM24S-RXD.3
6
QuantityDispensed
RXD-4 Actual Dispense Amount
NM20L-RXD.4
7
OrderingProvider
ORC-12 Ordering Provider
XCN120S-ORC.12

Message Structures

7 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
QPD
R1
RDF
O1
RCP
R1
DSC
O1
10 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
MSA
R1
ERR
O1
QAK
R1
QPD
R1
ROW_DEFINITION
O1
RDF
R1
RDT
O*
DSC
O1

Query Properties

Query Mode
Both
Query Type
Query
Query Characteristics

Selection criteria are chosen from a Virtual Table. May specify patient, medication, and a date range.

Response Characteristics

Columns from the Virtual Table listed in the Input/Output Specification are specified for output in the RDF segment.

Response Control Parameters (RCP)

SeqNameComponentTypeLenDescription
1Query Priority-ID1(D)eferred or (I)mmediate. Default is I.
2Quantity Limited Request-CQ10-
QuantityNM-Number of units (specified by the following component) that will be returned in each increment of the response. If no value is given, the entire response will be returned in a single increment.
UnitsCWE-CHaracters, LInes, PaGes, or RecorDs. Default is LI.
5Response Modality-CWE60Real time or Batch. Default is R.
6Sort-by Field-SRT256-
Sort-by FieldST-Segment field name of an output column by which the response may be sorted. SHALL contain a Y in the Sort column of the output specification table.
SequencingID-As specified in HL7 Table 0397- Sequencing. Default is Ascending.