Reference·QTY Segment·QTY02
X12 835 Reference

QTY02 in X12 835: A Field Guide to Quantity

Jul 28, 2026 · 4 min read
← QTY01

QTY02 looks like the simplest field in the segment — it is just a number. That simplicity is exactly why it gets tested carelessly: no label, no units, nothing to validate against except whatever QTY01 said it counts.

Quick answer

QTY02 is the numeric quantity value paired with the qualifier in QTY01. It can be a whole number or a decimal, and it carries no unit label of its own — its meaning is entirely dependent on the qualifier code that precedes it, whether that is a day count, a unit count, or another quantity type the payer is reporting.

What this element contains

Format
Numeric — a plain positive number, typically a whole day count but decimals are permitted where the qualifier calls for them
Dependency
Qualifier-driven — has no independent meaning apart from the QTY01 code it is paired with in the same segment
Scope
Claim-level — applies to the whole claim reported by the surrounding CLP segment, not to an individual service line

Example

Synthetic example Generated by Synthibase
QTY*CA*5

A synthetic QTY02 value of 5, meaning five covered days given the CA qualifier in QTY01.

Where this trips people up

Because QTY02 has no unit suffix in the raw segment, test data generators sometimes populate it with values that do not make sense for the paired qualifier — a covered-day count of 400 on a short inpatient stay, for instance — and a parser that only checks numeric formatting will accept it without complaint. Synthetic test files should keep QTY02 plausible relative to the claim's actual length of stay or service context, or the downstream validation rules that are supposed to catch unrealistic counts never get a chance to fire.

X12 835 QTY Segment Guide: Fields, Format, and Testing Gotchas
EDI 835 Remittance Advice: Complete Guide for Healthcare IT
How to Test 837I Institutional Claims
Generate QTY02 values that match the claim context
Synthibase ties QTY02 counts to the surrounding claim's actual stay dates and service data, so your validation logic is tested against realistic quantities instead of arbitrary numbers.
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.