QtySegment¶
QtySegment models the X12 QTY quantity segment, a generic carrier for a single qualified numeric quantity (e.g. units, visits) used across 837/835 transactions wherever a count value needs to be reported with a qualifying code.
Purpose¶
- Represents the QTY segment identity via
SegmentIdreturning the literal"QTY"(BR-020). - Carries
QuantityQualifierCodeidentifying what the quantity represents, paired withQuantityholding the numeric value.
Context¶
- Namespace:
SAIF.Common.Files.Edi.Segments - Assembly/package:
SAIF.Framework.Common.Files
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| SegmentId | string SegmentId { get; } |
Returns the literal X12 segment identifier "QTY". |
| QuantityQualifierCode | string QuantityQualifierCode { get; set; } |
The code qualifying what Quantity represents (QTY01), element 1. |
| Quantity | decimal Quantity { get; set; } |
The qualified numeric quantity value (QTY02), element 2. |
| Build | IEdiSegment Build() |
Creates a SegmentBuilder("QTY") and adds QuantityQualifierCode and Quantity at elements 1-2, returning the built segment. |
| Fill | void Fill(IEdiSegment segment) |
Reads elements 1-2 via GetChildValue, converting element 2 to decimal, into QuantityQualifierCode and Quantity. |
| Parse | static QtySegment Parse(IEdiSegment segment) |
Instantiates a new QtySegment, calls Fill(segment) on it, and returns it. |
Sources¶
- Common\SAIF.Common.Files\Edi\Segments\QtySegment.cs