Specifies individual components of a compound or IV admixture, including the component drug code, amount, units, and component type (base versus additive). It follows the RXO or RXE segment and is used when a pharmacy order involves multiple ingredients, for example an IV bag with a base solution plus one or more additives. Pharmacy systems use RXC in compounding workflows within RDE and related messages.
from zato.hl7v2 import RXC, CWE
rxc = RXC()
rxc.rx_component_type = 'B'
code = CWE(identifier='VITA', text='Vitamin A')
rxc.component_code = code
rxc.component_amount = '5000'How to construct and work with real-world RXC segments.
Required component type, code, amount, and units for an oral supplement
from zato.hl7v2.v2_9 import RXC
from zato.hl7v2.v2_9 import CWE
rxc = RXC()
rxc.rx_component_type = 'B'
rxc.component_code = CWE(
identifier='VITA',
text='Vitamin A 5000 IU',
)
rxc.component_amount = '5000'
rxc.component_units = CWE(identifier='IU', text='IU')Strength, units, repeatable supplementary codes, volume, and bottle dispense
from zato.hl7v2.v2_9 import RXC
from zato.hl7v2.v2_9 import CWE
rxc = RXC()
rxc.rx_component_type = 'B'
rxc.component_code = CWE(
identifier='ZINC', text='Zinc Chelate 25 mg')
rxc.component_amount = '25'
rxc.component_units = CWE(
identifier='MG', text='mg')
rxc.component_strength = '25'
rxc.component_strength_units = CWE(
identifier='MG', text='mg')
rxc.supplementary_code = [
CWE(identifier='PLAN', text='Wellness plan'),
CWE(identifier='TIER', text='Gold tier'),
]
rxc.component_drug_strength_volume = '50'
rxc.component_drug_strength_volume_units = CWE(
identifier='ML', text='mL')
rxc.dispense_amount = '60'
rxc.dispense_units = CWE(
identifier='BOT', text='Bottle')Additive component type, concentration volume, and vial dispense for nutrition support
from zato.hl7v2.v2_9 import RXC
from zato.hl7v2.v2_9 import CWE
rxc = RXC()
rxc.rx_component_type = 'A'
rxc.component_code = CWE(
identifier='AMIX', text='Amino wellness blend')
rxc.component_amount = '20'
rxc.component_units = CWE(
identifier='ML', text='mL')
rxc.component_strength = '8'
rxc.component_strength_units = CWE(
identifier='GM', text='g')
rxc.component_drug_strength_volume = '250'
rxc.component_drug_strength_volume_units = CWE(
identifier='ML', text='mL')
rxc.dispense_amount = '1'
rxc.dispense_units = CWE(
identifier='VIAL', text='Vial')Step-by-step guides for working with HL7 v2 in Zato.
RXC describes a single component line in a compound or multi-part pharmacy order: component role (base or additive), coded ingredient, quantities, optional strength and supplementary codes, and dispense amounts for nutrition and wellness workflows. It appears with ORC, RXO, RXE, RXD, RXR, and PID.
Fields 1–4 are required: rx_component_type, component_code, component_amount, and component_units. Populate optional fields only when your interface guide calls for them.
from zato.hl7v2.v2_9 import RXC, CWE
rxc = RXC()
rxc.rx_component_type = 'B'
rxc.component_code = CWE(
identifier='MV', text='Daily multivitamin')
rxc.component_amount = '1'
rxc.component_units = CWE(
identifier='TAB', text='Tablet')Field 7 repeats in ER7 with ~ between occurrences. In Python, assign a list of CWE instances to supplementary_code.
from zato.hl7v2.v2_9 import RXC, CWE
rxc = RXC()
rxc.rx_component_type = 'B'
rxc.component_code = CWE(
identifier='OM3', text='Omega-3')
rxc.component_amount = '2'
rxc.component_units = CWE(
identifier='GEL', text='Softgel')
rxc.supplementary_code = [
CWE(identifier='PKG', text='Family pack'),
CWE(identifier='NOTE', text='Store in a cool place'),
]HL7 table HL70166 classifies the component role (for example base versus additive) within a compound order. Use the codes your trading partner documents so pharmacy systems can assemble the mixture correctly.
RXO and RXE carry the overall requested or encoded order lines; RXC breaks out individual ingredients or parts when the order is compound or multi-component. Your specification should tie RXC lines to the parent order with ORC and related segments.
Zato connects to any system that speaks HL7v2 over MLLP or FHIR over REST. This includes Epic, Cerner, Meditech, Allscripts, and other EHR platforms.
Yes, Zato has built-in MLLP support for sending and receiving HL7v2 messages. MLLP channels handle the framing protocol automatically.
Zato supports HL7 v2.9, which is backward compatible with earlier versions including v2.3, v2.5, and v2.7. Standard segments and datatypes are available as typed Python classes.
Yes. Zato handles both HL7v2 and FHIR natively, so you can parse v2 messages and build FHIR resources with IG-specific extensions in the same service. Typed Python classes are available for both protocols, including extensions from US Core, UK Core, Da Vinci, and other Implementation Guides.
Complete list of fields in the RXC segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | rx_component_type | ID | Required | No | HL70166 |
| 2 | component_code | CWE | Required | No | HL70697 |
| 3 | component_amount | NM | Required | No | - |
| 4 | component_units | CWE | Required | No | HL70698 |
| 5 | component_strength | NM | Optional | No | - |
| 6 | component_strength_units | CWE | Optional | No | HL70699 |
| 7 | supplementary_code | CWE | Optional | Yes | HL70700 |
| 8 | component_drug_strength_volume | NM | Optional | No | - |
| 9 | component_drug_strength_volume_units | CWE | Optional | No | HL70701 |
| 10 | dispense_amount | NM | Optional | No | - |
| 11 | dispense_units | CWE | Optional | No | HL70703 |
Get started with Zato and connect your systems in minutes.