Z97

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 Query Profiles that specify an RDY response message, the display format follows the response grammar.

The message structure for QBP^Z97^QPB_Q15 can be found in 5.4.3. Use the QBP^Q15^QPB_Q15 Message structure.

Query/Response Flow

Query Message
QBP^Z97
QBP_Q15
Response Message
RDY^Z98
RDY_K15

Input Fields

QPD
SeqField NameTypeOptRepLenK/SSortOpTableSegment Field
1
MessageQueryName
CWER60-
2
QueryTag
STR32-
3
PatientList
PID-3: Patient Identifier List
CXO20SYPID.3
4
MedicationDispensed
RXD-2: Dispense/Give Code
CWEO100SY=RXD.2
5
DispenseDate.LL
RXD-3: Date/Time Dispensed
DTMO24SY> =RXD.3
6
DispenseDate.UL
RXD-3: Date/Time Dispensed
DTMO24SY< =RXD.3

Message Structures

7 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
QPD
R1
Hxx
O1
RCP
R1
DSC
O1
9 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
MSA
R1
ERR
O1
QAK
R1
QPD
R1
DSP
O*
DSC
O1

Query Properties

Query Mode
Both
Query Type
Query
Query Characteristics

May specify patient, medication, a date range, and how the response is to be sorted.

Response Characteristics

Returns data formatted for screen display. Data are 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.