---
title: StcSegment
summary: API reference for StcSegment.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common.Files
reference_type: package
---

# 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 `SegmentId` returning the literal `"STC"` ([BR-020](../../business-rules.md#br-020-first-element-is-the-segment-identifier)).
- Carries `StatusCategory` and `StatusCode` as the two sub-elements of the STC01 composite, together classifying the claim's adjudication/status state.
- Carries an optional `StatusDate`, converted via `DateMaker`, along with `ActionCode` and an optional `Amount` associated 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 attempts `Convert.ToDecimal(segment.GetChildValue(4))` unconditionally, so when element 4 is absent this converts an empty string rather than leaving `Amount` null, which throws a `FormatException`*.

> **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
