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

# Sv1Segment

`Sv1Segment` models the X12 SV1 professional service-line segment, used in 837P claim transactions to carry a single billed professional service line: the procedure/service code (inherited from `SvSegmentBase`), the charge amount, unit and quantity, place-of-service code, up to four diagnosis-code pointers, and an emergency indicator. It is inbound-only in this library: `Build()` throws `NotImplementedException` ([BR-054](../../business-rules.md#br-054-dmg-hi-sv1-sv2-sv3-are-inbound-only-segments)).

## Purpose
- Represents the SV1 segment identity via `SegmentId` returning the literal `"SV1"` ([BR-020](../../business-rules.md#br-020-first-element-is-the-segment-identifier)).
- Carries `ChargeAmount`, `UnitTypeCode`, `ServiceQuantity`, and `ServiceLocationCode` describing the billed service line's charge and setting.
- Carries up to four `DiagnosisPointerCode` values linking the service line back to diagnosis codes on the claim, read either as a single data element or a composite of up to four sub-elements depending on how the source segment was structured.
- Sets `EmergencyIndicator` true only when element 9 is exactly `"Y"` and the segment carries more than 8 elements, i.e. element 9 is actually present ([BR-060](../../business-rules.md#br-060-sv1-emergency-indicator-conditions)).
- Is inbound-only: `Fill(IEdiSegment)` populates the object from a parsed segment, but `Build()` throws `NotImplementedException` ([BR-054](../../business-rules.md#br-054-dmg-hi-sv1-sv2-sv3-are-inbound-only-segments)).

## 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 `"SV1"`. |
| ChargeAmount | `decimal ChargeAmount { get; set; }` | The charge amount for the service line (SV102), element 2. |
| UnitTypeCode | `string UnitTypeCode { get; set; }` | The unit-of-measure code for `ServiceQuantity` (SV103), element 3. |
| ServiceQuantity | `decimal? ServiceQuantity { get; set; }` | The quantity of units billed for the service (SV104), element 4. |
| ServiceLocationCode | `string ServiceLocationCode { get; set; }` | The place-of-service code for the service line (SV105), element 5. |
| DiagnosisPointerCode1 | `string DiagnosisPointerCode1 { get; set; }` | The first diagnosis-code pointer linking this line to the claim's diagnosis list (SV107), element 7 (or sub-element 1 of the SV107 composite). |
| DiagnosisPointerCode2 | `string DiagnosisPointerCode2 { get; set; }` | The second diagnosis-code pointer, sub-element 2 of the SV107 composite. |
| DiagnosisPointerCode3 | `string DiagnosisPointerCode3 { get; set; }` | The third diagnosis-code pointer, sub-element 3 of the SV107 composite. |
| DiagnosisPointerCode4 | `string DiagnosisPointerCode4 { get; set; }` | The fourth diagnosis-code pointer, sub-element 4 of the SV107 composite. |
| EmergencyIndicator | `bool EmergencyIndicator { get; set; }` | True only when element 9 (SV109) is exactly `"Y"` and the segment has more than 8 elements ([BR-060](../../business-rules.md#br-060-sv1-emergency-indicator-conditions)). |
| Build | `IEdiSegment Build()` | Always throws `NotImplementedException`; outbound SV1 generation is not supported ([BR-054](../../business-rules.md#br-054-dmg-hi-sv1-sv2-sv3-are-inbound-only-segments)). The commented-out source suggests an intended implementation would add the four diagnosis pointer codes as a composite at element 7*. |
| Fill | `void Fill(IEdiSegment segment)` | Reads `ServiceCode` directly from element 1 if it is a plain data element, or via `FillServiceCode` if it is a composite; reads `ChargeAmount`/`ServiceQuantity` via `ConvertToDecimalOrZero`, `ServiceLocationCode` at element 5; reads element 7 either as a single `DiagnosisPointerCode1` or, if composite, splits it into all four diagnosis pointer codes; sets `EmergencyIndicator` per [BR-060](../../business-rules.md#br-060-sv1-emergency-indicator-conditions) when the segment has more than 8 elements. |
| Parse | `static Sv1Segment Parse(IEdiSegment segment)` | Instantiates a new `Sv1Segment`, calls `Fill(segment)` on it, and returns it. |

## Inherited public members

Members in this section are inherited from `SvSegmentBase` in `SAIF.Framework.Common.Files`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Qualifier | `string Qualifier { get; set; }` | The procedure-code qualifier identifying the coding system in use, composite sub-element 1. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| ServiceCode | `string ServiceCode { get; set; }` | The procedure/service code value, either read directly from a plain element 1 or from composite sub-element 2. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| ServiceModifierCode1 | `string ServiceModifierCode1 { get; set; }` | The first of up to four procedure modifier codes, composite sub-element 3. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| ServiceModifierCode2 | `string ServiceModifierCode2 { get; set; }` | The second procedure modifier code, composite sub-element 4. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| ServiceModifierCode3 | `string ServiceModifierCode3 { get; set; }` | The third procedure modifier code, composite sub-element 5. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| ServiceModifierCode4 | `string ServiceModifierCode4 { get; set; }` | The fourth procedure modifier code, composite sub-element 6. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| ServiceDescription | `string ServiceDescription { get; set; }` | A free-text description of the procedure, composite sub-element 7. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| BuildElement | `EdiCompositeDataElement BuildElement()` | Constructs a composite element with `Qualifier`/`ServiceCode` and the four modifier codes. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |
| FillServiceCode | `void FillServiceCode(IEdiCompositeDataElement element)` | Reads sub-elements 1-7 of a composite element into `Qualifier`, `ServiceCode`, the four modifier codes, and `ServiceDescription`. | `SAIF.Framework.Common.Files` — `SvSegmentBase` |

## Behavioral notes
- Element positions SV106 (service type code) and SV108 (a monetary amount) are read by neither `Build()` nor `Fill()`; a code comment explicitly notes these are unused, along with SV110-SV121*.

## Constraints and usage notes
- Any caller invoking `Build()` on an `Sv1Segment` receives a `NotImplementedException` rather than a built segment ([BR-054](../../business-rules.md#br-054-dmg-hi-sv1-sv2-sv3-are-inbound-only-segments)).

> **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\Sv1Segment.cs
- Common\SAIF.Common.Files\Edi\Segments\SvSegmentBase.cs
