Z87

Dispense Information

To retrieve patient pharmacy dispense history information from the Server.

Note that the following Query Profile contains many more input parameters. The user is allowed to populate as many of these as desired.

Query/Response Flow

Query Message
QBP^Z87
QBP_Q11
Response Message
RSP^Z88
RSP_Z88

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
DTM26S-RXD.3
6
QuantityDispensed
RXD-4 Actual Dispense Amount
NM20L-RXD.4
7
OrderingProvider
ORC-12 Ordering Provider
XCN120S-ORC.12

Message Structures

6 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
QPD
R1
RCP
R1
DSC
O1
33 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
MSA
R1
ERR
O1
QAK
R1
QPD
R1
RCP
R1
PATIENT
O1
PID
R1
PD1
O1
NTE
O*
ALLERGY
O1
AL1
R*
VISIT
O1
PV1
R1
PV2
O1
COMMON_ORDER
R*
ORC
R1
TIMING
O*
TQ1
R1
TQ2
O*
ORDER_DETAIL
O1
RXO
R1
NTE
O*
RXR
R*
COMPONENT
O1
RXC
R*
NTE
O*
ORDER_ENCODED
O1
RXE
R1
TIMING_ENCODED
O*
TQ1
R1
TQ2
O*
RXR
R*
RXC
O*
RXD
R1
RXR
R*
RXC
O*
OBSERVATION
R*
OBX
O1
NTE
O*
DSC
R1

Query Properties

Query Mode
Both
Query Type
Query
Segment Pattern
RDS_O01
Query Characteristics

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

Response Characteristics

Sorted by Medication Dispensed unless otherwise specified in SortControl.

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.
6Segment group inclusion-ID256What segment group(s) are to be included. If this field is not valued, all segment groups will be included.