Skip to content

Provider ineligibility period retrieval

Provider ineligibility period retrieval reads PROVIDER_INELIG_PERIOD rows, either a single period by its identifier or the full set of periods for a provider location. Each period carries a start date, an optional termination date (open-ended when unset, mapped to Date.MaxValue at read time), and a reason code; the collection is the basis for eligibility-window checks used elsewhere in this library.

Field Value
Operation ID OP-VP-05
Trigger clsProviderIneligibilityPeriod.GetProviderIneligibilityPeriod(inDataportal, inIneligibilityPeriodID); clsProviderIneligibilityPeriodCollection.GetProviderIneligibilityPeriodCollection(inDataportal, inProviderLocationID) — invoked directly or via clsProviderLocation.IneligibilityPeriods
Inputs Ineligibility period ID (Decimal); or provider location ID (Decimal)
Outputs A populated clsProviderIneligibilityPeriod or clsProviderIneligibilityPeriodCollection
Primary components clsProviderIneligibilityPeriod.GetProviderIneligibilityPeriod, clsProviderIneligibilityPeriod.Load, clsProviderIneligibilityPeriodCollection.GetProviderIneligibilityPeriodCollection
Entry point Business\SAIF.Business.View.Provider\clsProviderIneligibilityPeriod.vb

Steps

  1. Request a single period. GetProviderIneligibilityPeriod builds a criteria carrying the ineligibility period ID and retrieves through the standard data-portal path.
  2. Bind the single-period parameter. BeforeRetrieve binds :IneligibilityPeriodID and executes the retrieve SQL against PROVIDER_INELIG_PERIOD (SQL-008, PROVIDER_INELIG_PERIOD).
  3. Read the single row. AfterRetrieve reads at most one row, fills the object (start date, reason code, provider location ID, termination date, update info), and marks it old only when a row was found.
  4. Request the period history for a location. GetProviderIneligibilityPeriodCollection builds a criteria carrying the provider location ID.
  5. Bind the collection parameter. BeforeRetrieve binds :ProviderLocationID and caches it on the collection instance, then executes the collection retrieve SQL against PROVIDER_INELIG_PERIOD (SQL-009, PROVIDER_INELIG_PERIOD).
  6. Populate the collection. AfterRetrieve iterates the result set, constructs a clsProviderIneligibilityPeriod per row, calls Load, and adds each to the collection.
  7. Normalize an open-ended termination date. Reading TerminationDate on a period whose underlying value is unset returns Date.MaxValue rather than a null or default date, so a period with no explicit end is treated as still in effect indefinitely.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Ineligibility period requested]) --> Which{Single or collection?}
    Which -->|Single, by ID| Single[Bind IneligibilityPeriodID parameter]
    Which -->|Collection, by location| Coll[Bind ProviderLocationID parameter]
    Single --> Exec1[Execute retrieve query]
    Exec1 --> Row{Row found?}
    Row -->|Yes| Fill1[Fill period; MarkOld]
    Row -->|No| Empty1([Object left in default state])
    Coll --> Exec2[Execute retrieve query]
    Exec2 --> Loop[For each row: create period,<br>Load, add to collection]
    Loop --> Done([Populated collection returned])
    Fill1 --> Read[TerminationDate read]
    Done --> Read
    Read --> Norm{Termination date set?}
    Norm -->|No| Max([Return Date.MaxValue])
    Norm -->|Yes| Actual([Return stored date])

Failure and edge-case behavior

  • A single-period lookup that matches no row leaves the object in its default (empty) state with no exception raised, consistent with other retrieval operations in this library.
  • A location with no ineligibility-period history returns an empty collection, which callers elsewhere in this library treat as "never ineligible" when testing a date against the collection.
  • This class re-retrieves the collection on every call to clsProviderLocation.IneligibilityPeriods (it is not cached on the location, unlike most of that location's other lazy-load properties), so repeated eligibility checks against the same location each issue a fresh query.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Business\SAIF.Business.View.Provider\clsProviderIneligibilityPeriod.vb
  • Business\SAIF.Business.View.Provider\clsProviderIneligibilityPeriodCollection.vb