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¶
- Request a single period.
GetProviderIneligibilityPeriodbuilds a criteria carrying the ineligibility period ID and retrieves through the standard data-portal path. - Bind the single-period parameter.
BeforeRetrievebinds:IneligibilityPeriodIDand executes the retrieve SQL againstPROVIDER_INELIG_PERIOD(SQL-008, PROVIDER_INELIG_PERIOD). - Read the single row.
AfterRetrievereads 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. - Request the period history for a location.
GetProviderIneligibilityPeriodCollectionbuilds a criteria carrying the provider location ID. - Bind the collection parameter.
BeforeRetrievebinds:ProviderLocationIDand caches it on the collection instance, then executes the collection retrieve SQL againstPROVIDER_INELIG_PERIOD(SQL-009, PROVIDER_INELIG_PERIOD). - Populate the collection.
AfterRetrieveiterates the result set, constructs aclsProviderIneligibilityPeriodper row, callsLoad, and adds each to the collection. - Normalize an open-ended termination date. Reading
TerminationDateon a period whose underlying value is unset returnsDate.MaxValuerather 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.*
Related documentation¶
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.vbBusiness\SAIF.Business.View.Provider\clsProviderIneligibilityPeriodCollection.vb