HL7 v2 RXA Segment Guide: Fields, Format, and Testing Gotchas
RXA is the segment that tells a receiving system a dose actually went into a patient — what was given, how much, when, and whether it counted. Immunization registries, MAR feeds, and VXU messages all lean on it, and most of the RXA bugs QA teams chase down live in a handful of fields.
RXA (Pharmacy/Treatment Administration) records a single administration or non-administration event for a drug, vaccine, or treatment. It shows up in VXU immunization messages and in pharmacy administration feeds, almost always paired with an RXR (route) segment and often an ORC. Testing it well means covering the timing fields, the coded product, the dose, and the two status/action fields that decide whether the event even counts.
The fields that actually matter in practice
Example
A synthetic RXA line for a single-dose adult Hepatitis B administration, showing the give sub-ID counters, timing, coded product, dose, completion status, and action code.
Where this trips people up
Teams test the "happy path" administration and stop there, but RXA carries just as much meaning when nothing was actually given. A refused dose, a historical record entered after the fact, or a deleted/corrected entry all still produce an RXA segment — just with different values in RXA-20 and RXA-21. If your test suite only ever generates CP/A combinations, you will never catch the code that mishandles a refusal or a delete, and that gap tends to surface first in a live immunization registry submission.