Z85

Pharmacy Information Comprehensive

To retrieve patient pharmacy history information from the Server.

The following is a highly experimental approach to establishing a super segment pattern response to a general purpose query structure. It contains all of the pharmacy information segments as possible inclusions in the response. It differs from previously defined segment pattern queries in that it cuts across multiple related standard HL7 messages although there is a logical hierarchy that can be determined.

Query/Response Flow

Query Message
QBP^Z85
QBP_Q11
Response Message
RSP^Z86
RSP_Z86

Input Fields

QPD
SeqField NameTypeOptRepLenK/SSortOpTableSegment Field
1
MessageQueryName
CWER60-
2
QueryTag
STR32-
3
PatientList
PID-3: Patient Identifier List
CXO20SYPID.3
4
OrderControlCode
ORC-1: Order Control
ID*2S-119ORC.1
5
OrderingProvider
ORC-12: Ordering Provider
XCN120S-ORC.12
6
MedicationDispensed
RXD-2: Dispense/Give Code
CWEO100SY=RXD.2
7
DispenseDate.LL
RXD-3: Date/Time Dispensed
DTMO24SY> =RXD.3
8
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
QBP
O1
Hxx
O1
RCP
R1
DSC
O1
34 segments
R RequiredO Optional Choice
MSH
R1
SFT
O*
UAC
O1
MSA
R1
ERR
O1
QAK
R1
QPD
R1
PATIENT
O1
PID
R1
PD1
O1
NTE
O*
AL1
O*
COMMON_ORDER
R*
ORC
R1
TIMING
O*
TQ1
R1
TQ2
O*
ORDER_DETAIL
O1
RXO
R1
RXR
R*
RXC
O*
ENCODED_ORDER
O1
RXE
R1
TIMING_ENCODED
O*
TQ1
R1
TQ2
O*
RXR
R*
RXC
O*
DISPENSE
O1
RXD
R1
RXR
R*
RXC
O*
GIVE
O1
RXG
R1
RXR
R*
RXC
O*
ADMINISTRATION
O1
RXA
R1
RXR
R*
RXC
O*
OBSERVATION
R*
OBX
O1
NTE
O*
DSC
O1

Query Properties

Query Mode
Both
Query Type
Query
Query Characteristics

May specify patient, medication, a date range, how the response is to be sorted, and what segment groups are to be returned.

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.