visit the hl7 website The Demo site for our new HL7 Version 2+ (plus) Standard

18.4.148.1 Proposed dispense history example and Query Profile (5.9.1.1)

The following is the structure of the Pharmacy Dispense Information (RDR) message, an original-mode query that was defined in Chapter 4.

Segment Cardinality Implement Status
RDR^RDR^RDR_RDR
MSH

Message Header

[1..1] SHALL
MSA

Message Acknowledgment

[1..1] SHALL
SFT

Software Segment

[0..1]  
UAC

User Authentication Credential Segment

[0..1]  
DEFINITION [1..*] SHALL
QRD

QRD (added by default)

[1..1] SHALL
QRF

QRF (added by default)

[0..1]  
PATIENT [0..1]  
PID

Patient Identification

[1..1] SHALL
NTE

Notes and Comments

 
ORDER [1..*] SHALL
ORC

Common Order

[1..1] SHALL
TIMING  
TQ1

Timing/Quantity

[1..1] SHALL
TQ2

Timing/Quantity Relationship

 
ENCODING [0..1]  
RXE

Pharmacy/Treatment Encoded Order

[1..1] SHALL
TIMING_ENCODED  
TQ1

Timing/Quantity

[1..1] SHALL
TQ2

Timing/Quantity Relationship

 
RXR

Pharmacy/Treatment Route

[1..*] SHALL
RXC

Pharmacy/Treatment Component Order

 
DISPENSE [1..*] SHALL
RXD

Pharmacy/Treatment Dispense

[1..1] SHALL
RXR

Pharmacy/Treatment Route

[1..*] SHALL
RXC

Pharmacy/Treatment Component Order

 
DSC

Continuation Pointer

[0..1]  

 

RDR_RDR

MSH-15 MSH-16 Immediate ACK Application Ack
We need some ER7 examples...
We need some XML examples...

The function served by that query can be more clearly defined within the new query functionality. In the RDR message, the full meaning of the filter elements in the QRD and QRF segments could be discerned only by inference. By contrast, needed parameters can be explicitly defined in the Query Profile for the new Dispense History query, as shown in the following example.

Example: The user wishes to know all the medications dispensed for the patient whose medical record number is "555444222111" for the period beginning 5/31/98 and ending 5/31/99. The following QBP message is generated:

MSH|^~\&|PCR|Gen Hosp|PIMS||199811201400-0800||QBP^Z81^QBP_Q11|ACK9901|P|2.8||||||||

QPD|Z81^Dispense History^HL7nnnn|Q001|555444222111^^^MPI^MR||19980531|19990531|

RCP|I|999^RD|

The pharmacy system identifies medical record number "555444222111" as belonging to Adam Everyman and locates 4 prescription dispenses for the period beginning 5/31/98 and ending 5/31/99and returns the following RSP message:

MSH|^~\&|PIMS|Gen hosp|PCR||199811201400-0800||RSP^Z82^RSP_Z82|8858|P|2.8||||||||

MSA|AA|ACK9901|

QAK|Q001|OK|Z81^Dispense History^HL7nnnn|4|

QPD|Z81^Dispense History^HL7nnnn|Q001|555444222111^^^MPI^MR||19980531|19990531|

PID|||555444222111^^^MPI^MR||Everyman^Adam||19600614|M||C|2101 Webster # 106^^Oakland^CA^94612||^^^^^510^6271111|^^^^^510^6277654|||||343132266|||N|||||||||

ORC|RE||89968665||||||199805121345-0700|||77^Hippocrates^Harold^H^III^DR^MD||^^^^^510^ 2673600||||||

RXE|1^BID^^19980529|00378112001^Verapamil Hydrochloride 120 mg TAB^NDC |120||mgm||||||||||||||||||||||||||

RXD|1|00378112001^Verapamil Hydrochloride 120 mg TAB^NDC |199805291115-0700|100|||1331665|3|||||||||||||||||

RXR|PO||||

ORC|RE||89968665||||||199805291030-0700|||77^Hippocrates^Harold^H^III^DR^MD||^^^^^510^ 2673600||||||

RXE|1^^D100^^20020731^^^TAKE 1 TABLET DAILY -GENERIC FOR CALAN SR|00182196901^VERAPAMIL HCL ER TAB 180MG ER^NDC |100||180MG|TABLET SA|||G|||0|BC3126631^CHU^Y^L||213220929|0|0|19980821|||

RXD|1|00182196901^VERAPAMIL HCL ER TAB 180MG ER^NDC |19980821|100|||213220929|0|TAKE 1 TABLET DAILY -GENERIC FOR CALAN SR||||||||||||

RXR|PO||||

ORC|RE||235134037||||||199809221330-0700|||8877^Hippocrates^Harold^H^III^DR^MD||^^^^^555^555-5001||||||RXD|1|00172409660^BACLOFEN 10MG TABS^NDC|199809221415-0700|10|||235134037|5|AS DIRECTED||||||||||||

RXR|PO||||

ORC|RE||235134030||||||199810121030-0700|||77^Hippocrates^Harold^H^III^DR^MD||^^^^^555^555-5001||||||

RXD|1|00054384163^THEOPHYLLINE 80MG/15ML SOLN^NDC|199810121145-0700|10|||235134030|5|AS DIRECTED||||||||||||

RXR|PO

18.4.148.1.1 Associated dispense history Query Profile (5.9.1.1.1)

Query Profile

The message structure for QBP^Z81^QPB_Q11 can be found in 5.4.1. Use the QBP^Q11^QPB_Q11 Message structure.

Segment Cardinality Implement Status
RSP^Z82^RSP_Z82
MSH

Message Header

[1..1] SHALL
ARV

Access Restriction

  v2.9
UAC

User Authentication Credential Segment

[0..1]  
MSA

Message Acknowledgment

[1..1] SHALL
ERR

Error

[0..1]  
QAK

Query Acknowledgment

[1..1] SHALL
QPD

Query Parameter Definition

[1..1] SHALL
RCP

Response Control Parameter

[1..1] SHALL
QUERY_RESPONSE [1..*] SHALL
PATIENT [0..1]  
PID

Patient Identification

[1..1] SHALL
PD1

Patient Additional Demographic

[0..1]  
NTE

Notes and Comments

 
VISIT [0..1]  
AL1

Patient Allergy Information

[1..*] SHALL
PV1

Patient Visit

[1..1] SHALL
PV2

Patient Visit - Additional Information

[0..1]  
COMMON_ORDER [1..*] SHALL
ORC

Common Order

[1..1] SHALL
TIMING  
TQ1

Timing/Quantity

[1..1] SHALL
TQ2

Timing/Quantity Relationship

 
ORDER_DETAIL [0..1]  
RXO

Pharmacy/Treatment Order

[1..1] SHALL
NTE

Notes and Comments

 
RXR

Pharmacy/Treatment Route

[1..*] SHALL
TREATMENT [0..1]  
RXC

Pharmacy/Treatment Component Order

[1..*] SHALL
NTE

Notes and Comments

 
ENCODED_ORDER [0..1]  
RXE

Pharmacy/Treatment Encoded Order

[1..1] SHALL
TIMING_ENCODED  
TQ1

Timing/Quantity

[1..1] SHALL
TQ2

Timing/Quantity Relationship

 
RXR

Pharmacy/Treatment Route

[1..*] SHALL
RXC

Pharmacy/Treatment Component Order

 
RXD

Pharmacy/Treatment Dispense

[1..1] SHALL
RXR

Pharmacy/Treatment Route

[1..*] SHALL
RXC

Pharmacy/Treatment Component Order

 
OBSERVATION [1..*] SHALL
OBX

Observation/Result

[0..1]  
NTE

Notes and Comments

 
DSC

Continuation Pointer

[0..1]  

 

RSP_Z82

MSH-15 MSH-16 Immediate ACK Application Ack
We need some ER7 examples...
We need some XML examples...

Input Parameter Specification

Input Parameter Field Description and Commentary