Reference·RXA Segment·RXA-20
HL7 v2 Reference

HL7 v2 RXA-20 Field Guide: Completion Status Codes and Common Mistakes

Jul 27, 2026 · 4 min read
← RXA-9 RXA-21 →

RXA-20 decides whether the rest of the segment describes something that actually happened. Skip validating this field and your test suite is only ever exercising the "dose given normally" path.

Quick answer

RXA-20 is a coded field indicating whether the administration was completed, refused, not administered, or only partially administered. It works closely with RXA-21 (Action Code) — a refusal or non-administration still produces a valid RXA segment, just with different downstream handling expected.

Valid code values

CP
Complete — the administration happened as documented — the default assumption most test data leans on
RE
Refused — the patient or guardian declined; the segment still documents the encounter, not a dose given
NA
Not Administered — recorded but the substance was never actually given — common for cancelled or held orders
PA
Partially Administered — less than the intended amount was given, which should line up with the value in RXA-6

Example

Synthetic example Generated by Synthibase
RXA|0|1|20260726090000||08^Hep B, adult^CVX|0.5|mL^^UCUM|||||||||||CP|A

RXA-20 holds CP, marking this synthetic Hepatitis B dose as completed.

Where this trips people up

Systems that count "doses given" by simply counting RXA segments, without checking RXA-20, will overstate administration numbers whenever a refusal or non-administration flows through the same feed. It is worth deliberately testing RE and NA values alongside a non-zero RXA-6 — some source systems populate a dose amount out of habit even when nothing was given, and code that trusts the amount field over the status field will report a phantom administration.

HL7 v2 RXA Segment Guide: Fields, Format, and Testing Gotchas
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Regression Testing for EHR Upgrades: A Complete Guide
Test every completion status, not just CP
Synthibase generates RXA segments across the full completion-status range — refusals, non-administrations, and partial doses — so your reporting logic gets validated against the cases that actually cause miscounts.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.