Ak1Segment¶
Ak1Segment models the X12 AK1 functional group response header segment, the first segment inside a 999/997 functional acknowledgement that identifies which inbound functional group is being acknowledged. It carries the functional identifier code and group control number so the acknowledgement can be correlated back to the original GS/GE envelope it responds to.
Purpose¶
- Represents the AK1 segment identity via
SegmentIdreturning the literal"AK1"(BR-020). - Carries
FunctionalCode,ControlNumber, andVersionControlNumber— the same three values that identify the functional group being acknowledged, mirroring the fields carried on the original GS header. - Builds an outbound AK1 segment from those properties via
Build(), and populates them from an inbound parsed segment viaFill(IEdiSegment).
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 "AK1". |
| FunctionalCode | string FunctionalCode { get; set; } |
The functional identifier code of the group being acknowledged (AK101), read/written at element 1. |
| ControlNumber | long ControlNumber { get; set; } |
The group control number of the functional group being acknowledged (AK102), read/written at element 2. |
| VersionControlNumber | string VersionControlNumber { get; set; } |
The version/release/industry identifier code of the acknowledged group (AK103), read/written at element 3. |
| Build | IEdiSegment Build() |
Creates a SegmentBuilder("AK1") and adds FunctionalCode, ControlNumber, and VersionControlNumber at elements 1-3, returning the built segment. |
| Fill | void Fill(IEdiSegment segment) |
Reads elements 1-3 via GetChildValue, converting element 2 to long, into FunctionalCode, ControlNumber, and VersionControlNumber. |
| Parse | static Ak1Segment Parse(IEdiSegment segment) |
Instantiates a new Ak1Segment, calls Fill(segment) on it, and returns it. |
Behavioral notes¶
- The class carries a code comment noting these are the same three field positions used by the GS segment (GS01/GS06/GS08)*.
Constraints and usage notes¶
Build()callsControlNumber.ToString()with no padding, unlikeAk2Segment, which zero-pads its control number (BR-042).
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- Common\SAIF.Common.Files\Edi\Segments\Ak1Segment.cs