Skip to content

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

  1. Build Criteria(dpi, inProviderLocationID); call RetrieveObject.
  2. BeforeRetrieve creates update info, sets SQLStatement = RETRIEVE_SQL, and binds :ProviderLocationID (SQL-PLOC-01 against PROVIDER_LOCATION).
  3. AfterRetrieve reads the first row; Fill() maps ~27 columns (flags via .ToBoolean, name parts into clsName, phone parts concatenated into clsPhone), then MarkOld().
  4. On failure: if no row is returned, the object retains default field values.
  5. Rules BR-PLOC-001 (Level I), BR-PLOC-002 and BR-PLOC-003 (Level III) are registered at construction.
  6. On demand only, each navigation property issues a further query:
  7. Addresses → Load and select a provider-location address
  8. ChildRelationships / ParentRelationships → Load provider relationships
  9. IneligibilityPeriods → Load provider ineligibility periods
  10. ProviderType → Load a provider type
  11. Provider → Retrieve a provider by ID or primary tax ID
  12. DCBSCostCharges → Load DCBS cost-charge factors
  13. MCOList → Load MCO enrollments
  14. Services / ServiceContracts → Load provider services and service contracts
  15. If IneligibilityPeriods is accessed: no backing field is used — every access re-queries PROVIDER_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).*
  • IneligibilityPeriods re-queries on every access rather than caching, unlike other navigation properties.*

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