HL7 RSP_Z86 Pharmacy Information Comprehensive Response

HL7 message structure RSP_Z86 groups and segments from HL7 v2.5.1 Hide structure

These are the generated groups and segments for the version selected at the top of the page. The article explains the workflow, and this panel follows the chosen HL7 version.

Message Structure

SegmentNameRequiredRepeatable
Message Header Yes No
Software Segment No Yes
Message Acknowledgment Yes No
Error No No
Query Acknowledgment Yes No
Query Parameter Definition Yes No
RSP_Z86.QUERY_RESPONSE
Query Response group Yes Yes
RSP_Z86.PATIENT
Patient group No No
Patient Identification Yes No
Patient Additional Demographic No No
Notes and Comments No Yes
Patient Allergy Information No Yes
RSP_Z86.COMMON_ORDER
Common Order group Yes Yes
Common Order Yes No
RSP_Z86.TIMING
Timing group No Yes
Timing/Quantity Yes No
Timing/Quantity Relationship No Yes
RSP_Z86.ORDER_DETAIL
Order Detail group No No
Pharmacy/Treatment Order Yes No
Pharmacy/Treatment Route Yes Yes
Pharmacy/Treatment Component Order No Yes
RSP_Z86.ENCODED_ORDER
Encoded Order group No No
Pharmacy/Treatment Encoded Order Yes No
RSP_Z86.TIMING_ENCODED
Timing Encoded group No Yes
Timing/Quantity Yes No
Timing/Quantity Relationship No Yes
Pharmacy/Treatment Route Yes Yes
Pharmacy/Treatment Component Order No Yes
RSP_Z86.DISPENSE
Dispense group No No
Pharmacy/Treatment Dispense Yes No
Pharmacy/Treatment Route Yes Yes
Pharmacy/Treatment Component Order No Yes
RSP_Z86.GIVE
Give group No No
Pharmacy/Treatment Give Yes No
Pharmacy/Treatment Route Yes Yes
Pharmacy/Treatment Component Order No Yes
RSP_Z86.ADMINISTRATION
Administration group No No
Pharmacy/Treatment Administration Yes No
Pharmacy/Treatment Route Yes Yes
Pharmacy/Treatment Component Order No Yes
RSP_Z86.OBSERVATION
Observation group Yes Yes
Observation/Result No No
Notes and Comments No Yes
Continuation Pointer No No

RSP_Z86 is the comprehensive pharmacy-information response. It is meant for a query that needs more than one pharmacy slice: the order, the encoded order, dispense information, give information, administration information, routes, components, and observations can all appear under the returned common-order group.

That breadth is useful, but it makes profile discipline essential. A receiver should know which optional pharmacy groups the sender can actually return and which group is authoritative for the workflow being displayed.

A small RSP Z86 example

MSH|^~\&|PHARM|CITYHOSP|MEDREC|CITYHOSP|20260718104000||RSP^Z86^RSP_Z86|RSPZ860001|P|2.5.1 MSA|AA|QBPZ850001 QAK|QPHARM001|OK|Z85^Pharmacy Information Comprehensive^HL7nnn|1|1|0 QPD|Z85^Pharmacy Information Comprehensive^HL7nnn|QPHARM001|123456^^^CITYHOSP^MR|20260701000000|20260717235959 PID|1||123456^^^CITYHOSP^MR||Smith^Jane^Anne^^Ms^^L||19800314|F ORC|RE|MED448811^EHR|RX998877^PHARM RXE|^^^20260715120000|AMOX500^Amoxicillin 500 mg capsule^L|1|CAP^capsule^UCUM|30|CAP^capsule^UCUM RXR|PO^Oral^HL70162 RXD|1|AMOX500^Amoxicillin 500 mg capsule^L|20260715124000|30|CAP^capsule^UCUM|RX998877^PHARM RXG|1||20260715160000|AMOX500^Amoxicillin 500 mg capsule^L|1|CAP^capsule^UCUM RXA|1|1|20260715160500|20260715161000|AMOX500^Amoxicillin 500 mg capsule^L|1|CAP^capsule^UCUM OBX|1|CE|PHARMSTATUS^Pharmacy status^L||ACTIVE^Active therapy^L||||||F

What systems do with it

A medication reconciliation viewer, clinical repository, pharmacy portal, or integration service might request RSP_Z86 when it needs a broad picture of the patient's pharmacy activity. The sender is normally a pharmacy or medication-history system that can combine order and fulfillment data.

Use QAK for the query result, QPD for the echoed question, and then read the pharmacy groups by purpose. RXE is encoded order detail, RXD is dispense detail, RXG is give detail, and RXA is administration detail.

How to read the structure

The query-response group may include patient demographics and allergies, then one or more common-order groups. Each common-order group starts with ORC and can branch into timing, requested order, encoded order, dispense, give, administration, route, component, and observation content.

The local v2.5.1 structure does not include RCP in this response, unlike some nearby response profiles. That makes QAK, QPD, and any continuation pointer especially important for understanding what subset was returned.

Implementation traps

The danger is flattening everything into "medications." Orders, dispenses, gives, and administrations are different events. Mixing them can make a medication look active, supplied, and administered when only one of those things is true.

Another trap is ignoring route and component segments. RXR and RXC often carry the information that makes a compound, infusion, or treatment instruction usable downstream.

Reference notes

HL7 identifies event Z86 as Pharmacy Information Comprehensive (Response). Segment references and generated structure pages show the response grammar using ORC with optional RXO, RXE, RXD, RXG, RXA, RXR, RXC, and OBX content. See HL7 Europe event Z86.