Retrieve a provider location and its lazily-loaded graph¶
Loads a single clsProviderLocation by its surrogate key and exposes lazily-loaded navigation properties (addresses, relationships, ineligibility periods, provider type, owning provider, DCBS cost charges, MCO enrollments, services, and service contracts).
| Field | Value |
|---|---|
| Operation ID | OP-02 |
| Trigger | Caller request — e.g. LegalManagerBase.CurrentProviderId setter, clsCaseCostManager.GetProviderName, clsCaseCost.OnRetrieve |
| Inputs | IDataPortalInfo, provider-location ID |
| Outputs | clsProviderLocation |
| Primary components | clsProviderLocation.GetProviderLocation |
| Entry point | SAIF.Business.View.Provider/clsProviderLocation.vb:592 |
Steps¶
- Build
Criteria(dpi, inProviderLocationID); callRetrieveObject. BeforeRetrievecreates update info, setsSQLStatement = RETRIEVE_SQL, and binds:ProviderLocationID(SQL-PLOC-01 against PROVIDER_LOCATION).AfterRetrievereads the first row;Fill()maps ~27 columns (flags via.ToBoolean, name parts intoclsName, phone parts concatenated intoclsPhone), thenMarkOld().- On failure: if no row is returned, the object retains default field values.
- Rules BR-PLOC-001 (Level I), BR-PLOC-002 and BR-PLOC-003 (Level III) are registered at construction.
- On demand only, each navigation property issues a further query:
Addresses→ Load and select a provider-location addressChildRelationships/ParentRelationships→ Load provider relationshipsIneligibilityPeriods→ Load provider ineligibility periodsProviderType→ Load a provider typeProvider→ Retrieve a provider by ID or primary tax IDDCBSCostCharges→ Load DCBS cost-charge factorsMCOList→ Load MCO enrollmentsServices/ServiceContracts→ Load provider services and service contracts- If
IneligibilityPeriodsis accessed: no backing field is used — every access re-queriesPROVIDER_INELIG_PERIOD.*
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller request]) --> S1["Build Criteria dpi,<br>ProviderLocationID"]
S1 --> S2["RetrieveObject via<br>IDataPortalInfo"]
S2 --> S3["BeforeRetrieve binds<br>ProviderLocationID"]
S3 --> S4{Row returned?}
S4 -->|Yes| S5["AfterRetrieve: Fill ~27<br>columns, MarkOld"]
S4 -->|No| S6["Default-valued<br>clsProviderLocation"]
S5 --> S7["Rules BR-PLOC-001..003<br>registered"]
S6 --> S7
S7 --> S8["Navigation property<br>accessed?"]
S8 -->|Yes| S9[Lazy query per property<br>separate round trip each time]
S8 -->|No| EndOk([clsProviderLocation returned])
S9 --> EndOk
Failure and edge-case behavior¶
- No matching row: object retains default field values; BR-PLOC-001 / BR-PLOC-002 detect the invalid state.
- Every navigation property access is a separate database round trip (a per-property N+1 pattern).*
IneligibilityPeriodsre-queries on every access rather than caching, unlike other navigation properties.*
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. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
SAIF.Business.View.Provider/clsProviderLocation.vb