HL7 RGV messages carry pharmacy or treatment give instructions — the scheduled administrations a pharmacy or treatment supplier hands off to the system that will give the medication. An RGV message describes how and when a dose is to be given against an order, typically one prepared through an RDE pharmacy encoded order, and is sent from the pharmacy or treatment application to the nursing or clinical application that administers it. This page explains what an RGV message represents, the trigger event that carries it, every segment the message can contain and what each one holds, and how an RGV give relates to FHIR. Sample content is constructed for illustration with fictional identifiers.
What an RGV message represents
An RGV message — RGV stands for Pharmacy/Treatment Give — communicates the give instructions for a medication: the scheduling and dosing information that tells a downstream application how each administration is to be performed. The core of the message is the RXG segment, which records drug or treatment administration instructions. A single RGV message may carry information about one scheduled administration or, with multiple RXG segments, about several.
This is the piece a dispense message does not carry. An RDS dispense records what was supplied on an occasion but not the give instructions or scheduling; when that give information needs to travel from the pharmacy or treatment application to another application, it is sent in an RGV message. The sender is the pharmacy or treatment system, and the receiver is usually a nursing application or another system that will act on the scheduled give.
The give and the administration are deliberately separable. Each RXG carries a give sub-ID counter in RXG-1, and the actual administrations — reported later in one or more RAS messages — are matched back to a scheduled give by recording that same sub-ID in the administration segment. This lets a receiver build a medication administration record in which each dose given is tied to the give instruction it satisfies.
When an RGV message is sent
An RGV message is sent when give instructions are issued for an order. For each scheduled administration of a medication, the pharmacy or treatment application issues either a single RGV message or a single RGV message carrying multiple RXG segments, one per scheduled administration. The same order can therefore produce the give message more than once over its life.
The default order control code for the RGV message — as for the related RDE, RDS, and RAS messages — is RE. State changes use other codes: an RGV sent with DC requests that the give instances identified by their RXG give sub-ID be discontinued, and a receiving system can reply with an RGV carrying DR to confirm the discontinuation.
Trigger event
The RGV message type carries a single trigger event:
RGV^O15– Pharmacy/treatment give message.
Because RGV has one trigger event, the receiver's handling turns on the contents of the order and its RXG give segments — the give code, give amount, scheduling, and give sub-ID — and on the order control code in ORC, rather than on the trigger code in MSH-9.
Integration topology
The diagram shows the pharmacy or treatment system emitting give instructions through the integration engine to the system that will administer the medication.
{{diagram: pharmacy/treatment system → RGV message → integration engine → nursing/clinical app / medication administration record}}
Typical senders: pharmacy information system, treatment or infusion-management application.
Typical receivers: nursing or clinical application and the medication administration record (MAR).
Direction: unidirectional notification from the pharmacy or treatment supplier to the system that will give the medication.
Segments in an RGV message
The RGV_O15 message is organised into groups: an optional PATIENT group (PID through the PATIENT_VISIT subgroup) and one or more ORDER groups. Each order opens with ORC and an optional TIMING group, then an optional ORDER_DETAIL (RXO) group and an optional ENCODING (RXE) group, and finally one or more GIVE groups built around the RXG segment. Cardinality follows HL7 notation: [X] optional, {X} repeating, [{X}] optional and repeating; a bare code is required. Each segment code links to its canonical field-by-field reference.
| Segment | Description |
|---|---|
MSH | Message Header. Opens every RGV message. It names the sending and receiving applications and facilities, stamps the creation time, declares the trigger event in MSH-9 (RGV^O15), carries the message control id in MSH-10, and pins the HL7 version. Receivers route on MSH-9 and deduplicate on MSH-10. |
[{SFT}] | Software Segment. Identifies the software product behind the sender — vendor, product, and version. Useful when give behaviour differs across pharmacy-system releases. Optional and repeating. |
[{NTE}] | Notes and Comments. Header-level notes that apply to the message as a whole. Optional and repeating. |
[PID] | Patient Identification. Identifies the patient the give instructions are for — the identifier list in PID-3, the name in PID-5. Required when the PATIENT group is present; the group as a whole is optional. |
[{NTE}] | Notes and Comments. Notes relative to the patient, following PID. Optional and repeating. |
[{AL1}] | Allergy Information. Patient allergies carried with the give. Optional and repeating. |
[PV1] | Patient Visit. The encounter the give belongs to — patient class, assigned location, and the providers on the visit. Opens the optional PATIENT_VISIT subgroup. |
[PV2] | Patient Visit Additional. Companion to PV1 with admit reason and expected dates when a visit is present. |
ORC | Common Order. Opens each order group and ties the give to its order. For an RGV the ORC carries the order control code — RE by default — and the placer and filler order numbers, which link the give back to the originating RDE order. Required, and the order group repeats. |
[{TQ1}] | Timing/Quantity. The dosing schedule and timing for the order. Optional and repeating; introduced as the replacement for the deprecated quantity/timing field in v2.5. |
[TQ2] | Timing/Quantity Order Sequence. Relates this order's timing to another order when sequenced or conditional dosing applies. Optional and repeating within the TIMING group. |
[RXO] | Pharmacy/Treatment Order. The original order as the prescriber expressed it, carried for reference. Optional; opens the ORDER_DETAIL group, which may carry its own notes, route, and component segments. |
[{NTE}] | Notes and Comments. Notes relative to the RXO order, within the ORDER_DETAIL group. |
{RXR} | Pharmacy/Treatment Route. The route, site, device, and method for the RXO order. Within the ORDER_DETAIL group it is required and repeating. |
[{RXC}] | Pharmacy/Treatment Component. Components of a compound or IV for the RXO order, each with its own notes. Optional and repeating. |
[RXE] | Pharmacy/Treatment Encoded Order. The pharmacy-encoded prescription, with its own encoded timing (TQ1/TQ2), route, and components. Optional; opens the ENCODING group, present when the receiving application needs its data. |
RXG | Pharmacy/Treatment Give. The core of the message. It records the give instruction: the give sub-ID counter in RXG-1 (used to match administrations back to this give), the dispense sub-ID in RXG-2, the give code in RXG-4, the minimum give amount in RXG-5 and maximum in RXG-6, the give units in RXG-7, the dosage form in RXG-8, and the substitution status in RXG-10. The give scheduling travels in the TQ1 segment of the GIVE group rather than in a date/time field on RXG. Opens the GIVE group, which is required and repeats. |
{TQ1} | Timing/Quantity. The scheduling for this give, within the GIVE group's TIMING_GIVE subgroup. Required and repeating in this position. |
[{TQ2}] | Timing/Quantity Order Sequence. Sequencing for the give timing. Optional and repeating within TIMING_GIVE. |
{RXR} | Pharmacy/Treatment Route. The route of administration (oral, IV, IM) and site for the give. Required and repeating within the GIVE group. |
[{RXC}] | Pharmacy/Treatment Component. The components of a compound or IV give — each base and additive with its amount. Optional and repeating. |
[OBX] | Observation/Result. Give-time observations carried in the GIVE group's OBSERVATION subgroup. Optional. |
[{NTE}] | Notes and Comments. Notes relative to the OBX, within the OBSERVATION subgroup. Optional and repeating. |
[ ] = optional, { } = repeating
The ORDER group repeats, and within each order the GIVE group repeats once per scheduled give, so a single RGV message can carry several give instructions for an order. The canonical segment pages carry the full field-by-field detail.
Sample RGV message
Note. Constructed for illustration. Patient identifiers, order numbers, dates, and names are fictional.
MSH|^~&|PHARM|MERCYGEN|NURSING|MERCYGEN|202006150900||RGV^O15^RGV_O15|MSG00021|P|2.5.1
PID|1||MR12345^^^MERCYGEN^MR||DOE^JOHN^Q||19800101|M
ORC|RE|ORD789^EHR|RX456789^PHARM
RXG|1|1|||00071015523^Lisinopril 10 MG Oral Tablet^NDC|10||MG|TAB||N
TQ1|1||BID|||202006150900
RXR|PO^Oral^HL70162
What this sample shows
The RGV^O15 in MSH-9 marks a pharmacy give. PID carries the medical record number MR12345, and ORC carries the order control code RE with placer order number ORD789 and filler order number RX456789, linking the give to its order. The RXG records the give instruction: give sub-ID 1 in RXG-1 (the handle a later RAS administration matches against), dispense sub-ID 1 in RXG-2, the give code for Lisinopril 10 MG in RXG-4, a give amount of 10 in RXG-5 with units MG in RXG-7, dosage form TAB in RXG-8, and no substitution — N in RXG-10. The TQ1 gives the schedule (twice daily), and the RXR gives the oral route.
Working with RGV messages
Read the give from RXG and its timing from TQ1
The give code and amount live in RXG, but the when lives in the TQ1 segment of the GIVE group, not in a date/time field on RXG. In v2.5.1 the old quantity/timing field RXG-3 is retained only for backward compatibility; read the schedule from TQ1. A receiver that ignores the GIVE-group TQ1 loses the administration schedule entirely.
Match administrations with the give sub-ID
RXG-1, the give sub-ID counter, is the join key between a scheduled give and the administration that satisfies it. A later RAS administration records this same sub-ID so the dose can be matched back to its give; when matching is not being done, the administration carries a sub-ID of 0. Preserve RXG-1 so the medication administration record can tie each dose to its instruction — and note that more than one administration can match a single give, as when the rate of an IV solution changes.
Idempotency and deduplication
Use MSH-10, the message control id, as the deduplication key. Because the filler order number alone does not uniquely identify a give instance across the RDE/RDS/RGV/RAS family, treat the filler order number together with the give sub-ID in RXG-1 as the natural business key for a scheduled give. Pharmacy feeds are replayed after outages, and treating a repeated control id as a duplicate prevents a replayed give from being scheduled twice.
Order control codes carry state
The give is not always a fresh instruction. The order control code in ORC defaults to RE, but a DC requests discontinuation of the give instances named by their RXG-1 sub-ID, and a DR confirms it. Handle these as state changes against the matching gives rather than as new schedules.
Vendor variance. The encoded order in
RXEand the original order inRXOare both optional, so some pharmacy systems repeat order detail on every RGV while others send only the GIVE group. Confirm a partner's field usage against their interface specification rather than assuming the base standard.
FHIR equivalent
A pharmacy or treatment give corresponds conceptually to the FHIR MedicationAdministration resource — it expresses the intent and instruction to give a medication — with the patient as a Patient resource and, for a messaging exchange, a MessageHeader at the head of a Bundle.
There is, however, no published mapping to lean on. The HL7 v2-to-FHIR Implementation Guide publishes official message maps only for a subset of message types — the ADT subset, OML_O21, ORM_O01, VXU_V04, ORU_R01, MDM_T02, and SIU_S12 — and provides no message map for RGV_O15. Among the pharmacy/treatment segments only RXA, RXO, and RXR have published ConceptMaps, and the RXG give segment has none. A FHIR representation of an RGV give is therefore composed manually, taking the give code, amount, units, and schedule from RXG and its GIVE-group TQ1, and referencing the authorising MedicationRequest derived from the order.
Common pitfalls
Pitfall. Looking for the give schedule on
RXG. In v2.5.1 the schedule is carried by theTQ1segment in the GIVE group;RXG-3is retained only for backward compatibility. Reading onlyRXGdrops the timing.
Pitfall. Discarding the give sub-ID in
RXG-1. It is the key that lets a later RAS administration be matched to this scheduled give; without it the medication administration record cannot reconcile doses to instructions.
Pitfall. Confusing a give with a dispense or an administration. The RGV give is the scheduled instruction, the RDS dispense is what was supplied, and the RAS administration is the dose actually given — three distinct events in the pharmacy family.
How Vorro handles RGV messages
Vorro ingests the RGV feed over MLLP or another transport, deduplicates on MSH-10, and routes each give to every subscribed destination in the format that system expects — most often a nursing application and the medication administration record. Vorro reads the give code, amount, and substitution status from RXG, takes the schedule from the GIVE-group TQ1, preserves the give sub-ID in RXG-1 so downstream RAS administrations can be matched to their give, links each give back to its order through the order numbers in ORC, and, where a FHIR destination is configured, maps the give to a MedicationAdministration resource — composed manually, since the v2-to-FHIR Implementation Guide publishes no map for this message.
Related messages
- RDE — the pharmacy encoded order an RGV give is issued against.
- RDS — the dispense message that records what was supplied, without the give instructions.
- RAS — the administration message that records the dose actually given, matched to the give by its sub-ID.
Sources
- HL7 v2-to-FHIR IG — message maps index — confirms no message map for RGV_O15
- HL7 v2-to-FHIR IG — segment maps index — confirms no ConceptMap for RXG
- HL7 Messaging Standard Version 2.5.1 product brief
- HL7 v2.5.1 Chapter 4 — RGV_O15 message structure and RXG segment (vico.org standard mirror)
- HL7 v2 RXG segment definition (hl7.eu standard mirror) </content>
