StSegment¶
StSegment models the X12 ST transaction-set header, the segment that opens every transaction set (e.g. an 837 claim, an 835 remittance, a 277 status) within a functional group. Its control number is zero-padded to at least four digits on output, matching the paired SeSegment.ControlNumber format (BR-041), and its optional implementation convention reference is written only when populated (BR-059).
Purpose¶
- Represents the ST segment identity via
SegmentIdreturning the literal"ST"(BR-020). - Carries
TransactionSetIdentifierCodeidentifying the transaction set type, andControlNumberuniquely identifying this instance within the functional group, zero-padded to at least four digits onBuild()(BR-041). - Writes the optional
VersionConventionReference(implementation guide reference) onBuild()only when it is non-empty (BR-059).
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 "ST". |
| TransactionSetIdentifierCode | string TransactionSetIdentifierCode { get; set; } |
The transaction set type identifier code (ST01), element 1. |
| ControlNumber | long ControlNumber { get; set; } |
The transaction set control number matching the paired SeSegment.ControlNumber (ST02), zero-padded to at least four digits on Build() (BR-041). |
| VersionConventionReference | string VersionConventionReference { get; set; } |
The implementation convention reference for the transaction set (ST03), written on Build() only when non-empty (BR-059). |
| Build | IEdiSegment Build() |
Creates a SegmentBuilder("ST"), adds TransactionSetIdentifierCode at element 1, adds ControlNumber formatted with at least four digits at element 2, and adds VersionConventionReference at element 3 only when non-empty, returning the built segment (BR-041, BR-059). |
| Fill | void Fill(IEdiSegment segment) |
Reads elements 1-3 via GetChildValue, converting element 2 to long, into TransactionSetIdentifierCode, ControlNumber, and VersionConventionReference. |
| Parse | static StSegment Parse(IEdiSegment segment) |
Instantiates a new StSegment, calls Fill(segment) on it, and returns it. |
Sources¶
- Common\SAIF.Common.Files\Edi\Segments\StSegment.cs