Skip to content

SvSegmentBase

SvSegmentBase is the shared abstract base class for the three X12 service-line segments — Sv1Segment (professional/SV1), Sv2Segment (institutional/SV2), and Sv3Segment (dental/SV3). It owns the composite procedure-code element (qualifier, service code, up to four modifiers, and description) that is structurally identical across all three service-line segment types, so each subclass builds and fills that shared composite through BuildElement()/FillServiceCode(IEdiCompositeDataElement) instead of duplicating the composite-mapping logic.

Purpose

  • Models the procedure/service-code composite element (qualifier + code + up to four modifiers + description) common to SV1, SV2, and SV3 segments.
  • Provides BuildElement() so subclasses can construct the outbound composite element from Qualifier/ServiceCode/modifier properties.
  • Provides FillServiceCode(IEdiCompositeDataElement) so subclasses can populate those same properties from an inbound composite element.

Context

  • Namespace: SAIF.Common.Files.Edi.Segments
  • Assembly/package: SAIF.Framework.Common.Files

Public members

Member Signature Purpose
Qualifier string Qualifier { get; set; } The procedure-code qualifier identifying the coding system in use (e.g. HCPCS/CPT), read from/written to composite sub-element 1.
ServiceCode string ServiceCode { get; set; } The procedure/service code value itself, composite sub-element 2.
ServiceModifierCode1 string ServiceModifierCode1 { get; set; } The first of up to four procedure modifier codes, composite sub-element 3.
ServiceModifierCode2 string ServiceModifierCode2 { get; set; } The second procedure modifier code, composite sub-element 4.
ServiceModifierCode3 string ServiceModifierCode3 { get; set; } The third procedure modifier code, composite sub-element 5.
ServiceModifierCode4 string ServiceModifierCode4 { get; set; } The fourth procedure modifier code, composite sub-element 6.
ServiceDescription string ServiceDescription { get; set; } A free-text description of the procedure, read from composite sub-element 7 on FillServiceCode; not written by BuildElement().
BuildElement EdiCompositeDataElement BuildElement() Constructs a new EdiCompositeDataElement populated with Qualifier and ServiceCode at sub-elements 1-2 and the four modifier codes at sub-elements 3-6.
FillServiceCode void FillServiceCode(IEdiCompositeDataElement element) Reads sub-elements 1-7 of the supplied composite element into Qualifier, ServiceCode, the four modifier codes, and ServiceDescription.

Behavioral notes

  • BuildElement() always writes all four modifier sub-elements regardless of whether they are populated, unlike the sibling CompositeProcedureCodeElement.BuildElement(), which omits empty modifiers*.

Constraints and usage notes

  • This is an abstract class; it is only usable through Sv1Segment, Sv2Segment, or Sv3Segment, all of which are inbound-only segments whose Build() implementations throw NotImplementedException (BR-054).

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\SvSegmentBase.cs