Skip to content

clsProviderRelationship

clsProviderRelationship represents one parent/child link between two provider locations in the PROVIDER_RELATIONSHIP table. It is never retrieved individually — its Criteria throws on all five IBusinessCriteria SQL properties — and instead is always materialized as a row within clsProviderRelationshipCollection's load, which also builds the destination clsProviderLocation for each relationship row.

Purpose

  • Determines whether the relationship is currently active by checking today against the start date and, when present, the termination date (BR-PREL-003).
  • Provides direction-aware navigation to the other end of the relationship, inverting the source relationship type so callers always resolve the opposite party (BR-PREL-004).
  • Supplies a human-readable description of the "works for" relationship for display in downstream legal/claim UIs.*

Context

  • Namespace: SAIF.Business.View.Provider
  • Assembly/package: SAIF.Business.View.Provider (embedded/project-compiled); also distributed as the NuGet package SAIF.BOF.Business.View.Provider.

Public members

Member Signature Purpose
IsActive ReadOnly Property IsActive As Boolean True when today is on/after the start date and on/before the termination date (an absent termination date is treated as Date.MaxValue) (BR-PREL-003).
WorksForDescription ReadOnly Property WorksForDescription As String Human-readable label describing the "works for" relationship for this row.*
DestinationProviderLocation ReadOnly Property DestinationProviderLocation As clsProviderLocation The location at the far end of the relationship — the child location when this row was sourced from the parent side, and vice versa (BR-PREL-004).
DestinationRelationshipType ReadOnly Property DestinationRelationshipType As RelationshipTypes The relationship type of the destination end, always the inverse of the source type used to load this row (BR-PREL-004).
ChildProviderLocationID ReadOnly Property ChildProviderLocationID As Decimal Identifies the child-side location of this relationship row (consumed by clsRequestManager in the application layer).
ProviderRelationshipCode ReadOnly Property ProviderRelationshipCode As String Code identifying the relationship kind; the value "WRK" denotes a "works for" relationship (BR-PREL-001).
StartDate ReadOnly Property StartDate As Date Start date of the relationship's active window (BR-PREL-003).
TerminationDate ReadOnly Property TerminationDate As Date Termination date of the relationship, or Date.MaxValue when open-ended (BR-PREL-003).
IsValid ReadOnly Property IsValid As Boolean (overridden from clsBusinessBase) Reflects the type's rule-check state; not used to gate any write since none exist.
IsDirty ReadOnly Property IsDirty As Boolean (overridden from clsBusinessBase) Indicates in-memory field changes; has no effect on persistence since the type is never retrieved or saved standalone (BR-DATA-001).
Save Function Save() As clsProviderRelationship (overridden from clsBusinessBase) Present for BOF interface compatibility; cannot persist because Criteria throws on all SQL properties, including RetrieveSQL (BR-DATA-001).*

Behavioral notes

  • OP-05: clsProviderRelationshipCollection.AfterRetrieve constructs each clsProviderRelationship and calls Load(), which also materialises the destination clsProviderLocation for that row.
  • clsProviderRelationship.Criteria throws ApplicationException on all five SQL properties (RetrieveSQL included), confirming individual relationships are never retrieved directly outside the owning collection.

Constraints and usage notes

  • Always obtained via clsProviderRelationshipCollection; direct construction/retrieval of a standalone relationship is not supported.
  • DestinationRelationshipType/DestinationProviderLocation values depend entirely on which side (Parent/Child) the owning collection was loaded from (BR-PREL-004).

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.View.Provider/clsProviderRelationship.vb