Skip to content

clsProviderServiceContractList

clsProviderServiceContractList is a self-loading List(Of clsProviderServiceContractInfo) that queries PROVIDER_SERVICE_CONTRACT directly via SqlHelper.ResultSetQuery, decorating each contract with MCOPlanInfo when a plan ID is present. Its constructor applies an offset window (default 721 days) that limits results to contracts still open or only recently expired, and it orders results by effective date descending. It backs clsProviderLocation.ServiceContracts.

Purpose

  • Loads service contracts for a provider location, restricting results to those still open or expired within the offset window so stale historical contracts are excluded by default (BR-PSVC-001).
  • Decorates each contract with matching MCOPlanInfo when a non-blank plan ID is present, applying the same plan-match validation used for MCO enrollments (BR-MCO-001).
  • Orders results by effective date descending, surfacing the most recent contract first.

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
.ctor Sub New(dpi As IDataPortalInfo, providerLocationID As Decimal, Optional offset As Decimal = 721) Queries PROVIDER_SERVICE_CONTRACT bound on :ProviderLocationID; when offset > 0 (default 721 days), additionally restricts to exp_date is null or exp_date > (sysdate - :Offset), orders by eff_date desc, and decorates each contract with MCOPlanInfo when a plan ID is present (OP-12, SQL-PSVC-02, BR-PSVC-001, BR-MCO-001).
Item Default Property Item(index As Integer) As clsProviderServiceContractInfo (from List(Of clsProviderServiceContractInfo)) Returns the service contract at the given position in the loaded list.
Count ReadOnly Property Count As Integer (from List(Of clsProviderServiceContractInfo)) Number of service contracts loaded within the offset window.
GetEnumerator Function GetEnumerator() As List(Of clsProviderServiceContractInfo).Enumerator (from List(Of clsProviderServiceContractInfo)) Enumerates the loaded contracts, ordered by effective date descending.

Behavioral notes

  • OP-12: passing an offset of zero or less removes the exclusion of older expired contracts entirely, returning the full contract history for the location (BR-PSVC-001).
  • Each contract with a non-blank plan ID triggers a GetMCOInfo/SetPlan call identical to clsMCOProviderList's decoration step, so this constructor can throw ApplicationException("MCO plan submitted does not match plan assigned.") if plan data is inconsistent (BR-MCO-001).

Constraints and usage notes

  • Callers needing the complete, unfiltered contract history (including long-expired contracts) must explicitly pass offset <= 0 — the default constructor call via clsProviderLocation.ServiceContracts applies the 721-day window.*
  • No create/update/delete surface — load-only list.

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/clsProviderServiceContract.vb