Skip to content

CompositeProcedureCodeElement

CompositeProcedureCodeElement models the composite procedure-code value shared by the SVC adjudication segment (as AdjudicatedMedicalService/BilledMedicalService) and structurally mirrors the equivalent composite used by SV1/SV2/SV3 via SvSegmentBase. Its Equals override deliberately compares only the qualifier, code, and the four modifier codes — excluding Description — which is the mechanism SvcSegment relies on to detect whether the billed and adjudicated procedure codes actually differ (BR-062), driving the billed-vs-adjudicated suppression rules on the SVC segment (BR-051).

Purpose

  • Represents a procedure-code composite element (qualifier, code, up to four modifiers, description) as a first-class comparable value type rather than raw composite sub-elements.
  • Builds the outbound composite via BuildElement(), omitting any modifier code sub-element that is null or empty, so only populated modifiers are written (BR-059).
  • Fills its properties from an inbound composite via FillServiceCode(IEdiCompositeDataElement).
  • Supplies value equality via Equals(CompositeProcedureCodeElement) that intentionally ignores Description, enabling SvcSegment to determine whether billed and adjudicated services are the same procedure (BR-062).

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, composite sub-element 1.
Code string Code { get; set; } The procedure/service code value, composite sub-element 2.
ModifierCode1 string ModifierCode1 { get; set; } The first procedure modifier code, composite sub-element 3, written only when populated.
ModifierCode2 string ModifierCode2 { get; set; } The second procedure modifier code, composite sub-element 4, written only when populated.
ModifierCode3 string ModifierCode3 { get; set; } The third procedure modifier code, composite sub-element 5, written only when populated.
ModifierCode4 string ModifierCode4 { get; set; } The fourth procedure modifier code, composite sub-element 6, written only when populated.
Description string Description { get; set; } A free-text description of the procedure read from composite sub-element 7; excluded from Equals comparisons (BR-062).
BuildElement EdiCompositeDataElement BuildElement() Constructs a new EdiCompositeDataElement with Qualifier/Code at sub-elements 1-2 and each non-empty modifier code at sub-elements 3-6.
FillServiceCode void FillServiceCode(IEdiCompositeDataElement element) Reads sub-elements 1-7 of the supplied composite element into Qualifier, Code, the four modifier codes, and Description.
Equals bool Equals(CompositeProcedureCodeElement testElement) Returns true when Qualifier, Code, and all four modifier codes match; Description is deliberately excluded from the comparison (BR-062).

Inherited public members

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

Member Signature Purpose Origin
HasChildren bool HasChildren { get; } Indicates whether any child data elements have been set on this composite element. SAIF.Framework.Common.Files — EdiCompositeDataElement
DataElements IEnumerable<IEdiDataElement> DataElements { get; set; } The ordered collection of child data elements backing this composite element. SAIF.Framework.Common.Files — EdiCompositeDataElement
GetElement IEdiDataElement GetElement(int index) Returns the child data element at the given 1-based sub-element index, or null if not set. SAIF.Framework.Common.Files — EdiCompositeDataElement
GetChildValue string GetChildValue(int elementIndex) Returns the string value of the child data element at the given 1-based sub-element index, or an empty string if not set. SAIF.Framework.Common.Files — EdiCompositeDataElement
ToString string ToString() Renders the composite element back into its serialized sub-element-delimited string form. SAIF.Framework.Common.Files — EdiCompositeDataElement

Behavioral notes

  • Equals(CompositeProcedureCodeElement) does not override object.Equals/GetHashCode, so it is a plain value-comparison method rather than a full equality-contract override*.
  • SvcSegment.Build() uses this Equals method to decide whether to emit the billed procedure composite and billed quantity at all, suppressing them when they match the adjudicated values (BR-051).

Constraints and usage notes

  • Equals(CompositeProcedureCodeElement testElement) dereferences testElement without a null check, so calling it with a null argument throws a NullReferenceException*.

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\CompositeProcedureCodeElement.cs
  • Common\SAIF.Common.Files\Edi\EdiCompositeDataElement.cs