The RXC (Pharmacy/Treatment Component Order) segment describes a single component of a compound or multi-ingredient pharmacy order. Each RXC names one ingredient — a base or an additive — along with its amount, units, and strength. Multiple RXC segments together define the full recipe of a compound, attaching to the order detail expressed by the parent RXO, RXE, RXD, or RXG segment.
Purpose
The RXC segment exists to express the constituent ingredients of a compounded medication or IV admixture. Many pharmacy orders are not a single product but a mixture: a base solution plus one or more additives. RXC lets each of those ingredients be transmitted with its own code, amount, units, and strength, and distinguishes the role of each ingredient (base versus additive) through the RX Component Type. This makes the full composition machine-readable for preparation, labeling, and verification.
Used in
The RXC segment appears in RDE messages (Pharmacy/Treatment Encoded Order) and other pharmacy messages, where it follows the order-detail segment it components. Each RXC attaches to a parent pharmacy segment such as RXE (or RXO in the request) and is often accompanied by an RXR route segment for the overall preparation.
Field-by-field reference
Source: HAPI HL7v2 v2.5.1 javadocs (RXC javadoc) for sequence, name, data type, and repetition. Length is not published in the javadocs (—); Required and Table # are filled from the HL7 v2.5.1 standard where well-established.
| Seq | Name | Data Type | Length | Req | Repeat | Table # | Description |
|---|---|---|---|---|---|---|---|
| RXC-1 | RX Component Type | id | — | R | — | HL70166 | Whether the component is a base or additive |
| RXC-2 | Component Code | ce | — | R | — | — | Coded identifier of the component substance |
| RXC-3 | Component Amount | nm | — | R | — | — | Amount of this component |
| RXC-4 | Component Units | ce | — | R | — | — | Units for the component amount |
| RXC-5 | Component Strength | nm | — | O | — | — | Strength of this component |
| RXC-6 | Component Strength Units | ce | — | O | — | — | Units for the component strength |
| RXC-7 | Supplementary Code | ce | — | O | Y | — | Additional codes such as billing modifiers |
| RXC-8 | Component Drug Strength Volume | nm | — | O | — | — | Volume associated with the strength |
| RXC-9 | Component Drug Strength Volume Units | cwe | — | O | — | — | Units for the drug strength volume |
Most-used fields
The fields most integrations rely on are RXC-1 (RX Component Type), which distinguishes the base from each additive, and RXC-2 (Component Code), which identifies the ingredient by NDC or RxNorm. RXC-3 and RXC-4 (Component Amount and Component Units) quantify how much of the ingredient goes into the compound, and RXC-5 with RXC-6 (Component Strength and its units) further specify concentration. Repeated RXC segments are read together to reconstruct the complete recipe of the preparation.
Version differences (2.3 to 2.8.2)
In v2.3 the RXC segment ended at field 6, covering component type, code, amount, units, and strength with units. v2.4 added RXC-7 (Supplementary Code) as a repeating field for billing and classification modifiers. v2.5 and v2.5.1 added RXC-8 (Component Drug Strength Volume) and RXC-9 (Component Drug Strength Volume Units), supporting volume-based strength expressions. Releases from v2.6 through v2.8.2 refined coded data types toward CWE and clarified the HL70166 binding on RXC-1, while the v2.5.1 field sequence documented here remained stable.
Common mistakes
A common error is misusing RXC-1 (RX Component Type), for example marking more than one ingredient as the base or omitting the type entirely; HL7 table HL70166 distinguishes base (B) from additive (A). Another is omitting component units (RXC-4) while supplying an amount, which makes the recipe ambiguous. Integrators sometimes send a single RXC where multiple ingredients exist, collapsing additives into one line; each ingredient should be its own RXC segment. Finally, RXC-7 (Supplementary Code) is repeating and must use the repetition separator (~) when carrying multiple modifiers.
Examples
A minimal valid RXC segment:
RXC|B|0338-0049-04^Sodium Chloride 0.9%^NDC|1000|mL
A fully-populated RXC segment:
RXC|A|00409-1782-01^Potassium Chloride^NDC|20|mEq|2|mEq/mL|MOD7^Additive modifier~MOD8^Stability note|10|mL^Milliliter^UCUM
Annotated breakdown:
RXC|A|00409-1782-01^Potassium Chloride^NDC|20|mEq|2|mEq/mL|...
| | | | | |
| | | | | +--> RXC-6 Component Strength Units (mEq/mL)
| | | | +----> RXC-5 Component Strength (2)
| | | +--------> RXC-4 Component Units (mEq)
| | +-----------> RXC-3 Component Amount (20)
| +-----------------------------------------------> RXC-2 Component Code (NDC for Potassium Chloride)
+-------------------------------------------------> RXC-1 RX Component Type (A = additive)
In context inside an RDE message (compound order with base and additive):
MSH|^~&|PHARMSYS|GENHOSP|EHR|GENHOSP|20260612090000||RDE^O11^RDE_O11|MSG00072150|P|2.5.1
PID|1||MRN112233^^^GENHOSP^MR||Okafor^Jane^L||19771103|F
ORC|NW|ORD778901^EHR|RX0000457825^PHARMSYS|||||20260612085500|||BB7654321^Patel^Anya^^^^Dr
RXE|1^^^20260612090000^^R|0338-0049-04^Sodium Chloride 0.9% IV^NDC|1000||mL|SOL^Solution^HL70488|Infuse over 8 hours|||1000|mL|0|||RX0000457825|0|0
RXR|IV^Intravenous^HL70162
RXC|B|0338-0049-04^Sodium Chloride 0.9%^NDC|1000|mL
RXC|A|00409-1782-01^Potassium Chloride^NDC|20|mEq|2|mEq/mL
A second in-context excerpt (TPN-style compound with multiple additives):
MSH|^~&|PHARMSYS|GENHOSP|EHR|GENHOSP|20260612091500||RDE^O11^RDE_O11|MSG00072151|P|2.5.1
PID|1||MRN445566^^^GENHOSP^MR||Reyes^Mateo^A||19590215|M
ORC|NW|ORD778902^EHR|RX0000457826^PHARMSYS|||||20260612091000|||CC2468013^Nguyen^Linh^^^^Dr
RXE|1^^^20260612091500^^R|TPN-BASE^Total Parenteral Nutrition Base^LOCAL|1500||mL|SOL^Solution^HL70488|Infuse over 24 hours|||1500|mL|0|||RX0000457826|0|0
RXR|IV^Intravenous^HL70162
RXC|B|TPN-DEXTROSE^Dextrose 50%^LOCAL|500|mL|50|g/100mL
RXC|A|00074-1101-01^Amino Acids 10%^NDC|500|mL|10|g/100mL
RXC|A|00409-1782-01^Potassium Chloride^NDC|20|mEq|2|mEq/mL
FHIR mapping
No segment-level ConceptMap is published in the v2-to-FHIR IG for RXC. Conceptually, a set of RXC segments corresponds to the ingredient or dosage components of a FHIR MedicationRequest (or to the ingredients of a contained Medication resource): the Component Code maps to ingredient item, the Component Type to base-versus-additive role, and the Component Amount, Units, and Strength to ingredient strength and quantity. Because no published ConceptMap exists, integrators must define field-level mappings themselves.
Engine considerations
RXC segments are short but appear in repeating groups, so engines must collect all consecutive RXC segments under a parent order to reconstruct the full compound rather than processing only the first. The CE and CWE composites require correct component (^) and subcomponent (&) parsing, and RXC-7 (Supplementary Code) is repeating and must be iterated by repetition (~). Engines should validate RXC-1 against HL70166, ensure exactly one base where the workflow requires it, and confirm that every component amount carries units.
How Vorro parses and produces RXC
Vorro parses each RXC positionally into typed fields and groups consecutive RXC segments with their parent order so the complete compound recipe is preserved as an ordered ingredient list. CE/CWE composites are decomposed into individually addressable components, and RXC-7 is exposed as an ordered repeating collection. When producing RXC, Vorro emits one segment per ingredient, sets RXC-1 from the configured base/additive role, normalizes component codes against configured terminologies (NDC, RxNorm), and verifies that component amounts and strengths are paired with their unit fields before serialization.
