StcSegment¶
StcSegment models the X12 STC health-care claim status segment used in 277 claim status response transactions, carrying the claim's status category and code (as a composite element), an optional status date, an action code, and an optional monetary amount associated with the status.
Purpose¶
- Represents the STC segment identity via
SegmentIdreturning the literal"STC"(BR-020). - Carries
StatusCategoryandStatusCodeas the two sub-elements of the STC01 composite, together classifying the claim's adjudication/status state. - Carries an optional
StatusDate, converted viaDateMaker, along withActionCodeand an optionalAmountassociated with the status.
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 "STC". |
| StatusCategory | string StatusCategory { get; set; } |
The status category code, sub-element 1 of the STC01 composite. |
| StatusCode | string StatusCode { get; set; } |
The specific status code, sub-element 2 of the STC01 composite. |
| StatusDate | DateTime? StatusDate { get; set; } |
The date associated with the status (STC02), formatted as yyyyMMdd on Build() when set, and parsed via DateMaker.MakeDateTime on Fill(). |
| ActionCode | string ActionCode { get; set; } |
The action code associated with the status (STC03), element 3. |
| Amount | decimal? Amount { get; set; } |
An optional monetary amount associated with the status (STC04), written on Build() only when set. |
| Build | IEdiSegment Build() |
Creates a SegmentBuilder("STC"), adds StatusCategory/StatusCode as sub-elements 1-2 of composite element 1, adds StatusDate at element 2 when not null, adds ActionCode at element 3, and adds Amount at element 4 when not null, returning the built segment. |
| Fill | void Fill(IEdiSegment segment) |
Reads the composite at element 1 into StatusCategory/StatusCode, parses element 2 via DateMaker.MakeDateTime into StatusDate, reads ActionCode at element 3, and converts element 4 to decimal for Amount. |
| Parse | static StcSegment Parse(IEdiSegment segment) |
Instantiates a new StcSegment, calls Fill(segment) on it, and returns it. |
Behavioral notes¶
Fill()always attemptsConvert.ToDecimal(segment.GetChildValue(4))unconditionally, so when element 4 is absent this converts an empty string rather than leavingAmountnull, which throws aFormatException*.
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\StcSegment.cs