clsProviderLocation¶
clsProviderLocation is the second aggregate root in this library, representing a single firm or person site tied back to its owning clsProvider. It implements iPayee alongside clsProvider, and exposes ten-plus lazily-loaded navigation properties (addresses, relationships, ineligibility periods, provider type, DCBS cost charges, MCO enrollments, services, service contracts) — each of which issues its own database query the first time it is read, producing a per-property N+1 access pattern when a caller walks the full graph.*
Purpose¶
- Serves as the primary lookup target for legal/claim consumers resolving a payee's business location (used directly by
LegalManagerBase,clsCaseCostManager, andclsCaseCostin consuming projects). - Enforces structural integrity via rule checks that the location ID, owning provider ID, and provider type code all resolve to real, non-zero/non-empty values (BR-PLOC-001, BR-PLOC-002, BR-PLOC-003).
- Determines whether a location is ineligible on a given date by checking all its ineligibility windows (BR-PLOC-004).
- Reports payee type as the constant
"PROV"classification, mirroringclsProvider's behavior (BR-PRV-005). - Computes its dirty state as a composite of its own field state and its embedded name object's dirty state (BR-PLOC-005).
Context¶
- Namespace:
SAIF.Business.View.Provider - Assembly/package:
SAIF.Business.View.Provider(embedded/project-compiled); also distributed as the NuGet packageSAIF.BOF.Business.View.Provider.
Public members¶
| Member | Signature | Purpose |
|---|---|---|
GetProviderLocation |
Shared Function GetProviderLocation(dpi As IDataPortalInfo, providerLocationID As Decimal) As clsProviderLocation |
Retrieves a single location by ID, mapping ~27 columns including flags, name, and phone (OP-02). |
ProviderLocationID |
ReadOnly Property ProviderLocationID As Decimal |
Primary key of the location row; must be greater than zero on a valid load (BR-PLOC-001). |
ProviderID |
ReadOnly Property ProviderID As Decimal |
Owning provider's key; must resolve to a value greater than zero (BR-PLOC-002). |
ProviderTypeCode |
ReadOnly Property ProviderTypeCode As String |
Code of the provider type governing this location's behavior; must be non-empty (BR-PLOC-003). |
Addresses |
ReadOnly Property Addresses As clsProviderAddressCollection |
Lazily loads all addresses for this location on first access (OP-04). |
ActiveAddresses |
ReadOnly Property ActiveAddresses As clsProviderAddressCollection |
Lazily loads and filters addresses to those active as of today (BR-PADR-002). |
ChildRelationships |
ReadOnly Property ChildRelationships As clsProviderRelationshipCollection |
Lazily loads relationships where this location is the parent (OP-05). |
ParentRelationships |
ReadOnly Property ParentRelationships As clsProviderRelationshipCollection |
Lazily loads relationships where this location is the child (OP-05). |
IneligibilityPeriods |
ReadOnly Property IneligibilityPeriods As clsProviderIneligibilityPeriodCollection |
Re-queries PROVIDER_INELIG_PERIOD on every access (not cached) to return this location's ineligibility windows (OP-06). |
Provider |
ReadOnly Property Provider As clsProvider |
Lazily loads the owning clsProvider (OP-01), forming a reciprocal navigation cycle with clsProvider.ProviderLocations.* |
ProviderType |
ReadOnly Property ProviderType As clsProviderType |
Lazily loads the clsProviderType referenced by ProviderTypeCode (OP-07). |
DCBSCostCharges |
ReadOnly Property DCBSCostCharges As clsDCBSCostChargeList |
Lazily loads DCBS cost-to-charge factors for this location (OP-10). |
MCOList |
ReadOnly Property MCOList As clsMCOProviderList |
Lazily loads MCO enrollments for this location (OP-11). |
Services |
ReadOnly Property Services As clsProviderServiceList |
Lazily loads service code assignments for this location (OP-12). |
ServiceContracts |
ReadOnly Property ServiceContracts As clsProviderServiceContractList |
Lazily loads service contracts for this location, windowed by the default 721-day offset (BR-PSVC-001) (OP-12). |
IsDuringIneligibilityPeriod |
Function IsDuringIneligibilityPeriod(asOfDate As Date) As Boolean |
Returns true when the given date falls inside any of this location's ineligibility windows (BR-PLOC-004). |
IsApproved |
ReadOnly Property IsApproved As Boolean |
Converts the APPROVED_FLAG Y/N column to a Boolean indicating provider approval status. |
IsBusiness |
ReadOnly Property IsBusiness As Boolean |
Converts the business/person Y/N flag; true when the location represents a business rather than an individual. |
IsCriticalAccessHospital |
ReadOnly Property IsCriticalAccessHospital As Boolean |
Converts the CAH Y/N flag identifying critical access hospital status. |
IsIneligible |
ReadOnly Property IsIneligible As Boolean |
Converts the ineligible Y/N flag stored directly on the location row (distinct from date-windowed IsDuringIneligibilityPeriod). |
IsPossibleFraud |
ReadOnly Property IsPossibleFraud As Boolean |
Converts the possible-fraud Y/N flag used to surface a fraud-risk indicator to callers. |
IsPrimaryLocation |
ReadOnly Property IsPrimaryLocation As Boolean |
Converts the primary-location Y/N flag consumed by clsProvider.PrimaryLocation selection (BR-PRV-006). |
HasRecentActivity |
ReadOnly Property HasRecentActivity As Boolean |
Converts a Y/N flag indicating whether the location has had recent claim/legal activity. |
PayeeType / PayeeTypeCode |
ReadOnly Property (via iPayee) |
Always resolve to the "Provider"/"PROV" payee classification (BR-PRV-005). |
PayeeAddress, PayeeID, PayeePhoneNumber, PayeeEmailAddress |
ReadOnly Property (via iPayee) |
Location-level payee identity surfaced for payment-related consumers (mirrors clsProvider's iPayee implementation).* |
IsValid |
ReadOnly Property IsValid As Boolean (overridden from clsBusinessBase) |
Reflects the combined result of BR-PLOC-001, BR-PLOC-002, and BR-PLOC-003. |
IsDirty |
ReadOnly Property IsDirty As Boolean (overridden from clsBusinessBase) |
True when the location's own state or its embedded name object is dirty (BR-PLOC-005). |
Save |
Function Save() As clsProviderLocation (overridden from clsBusinessBase) |
Calls ApplyEdit()/MyBase.Save() but cannot persist changes since no write SQL exists (BR-DATA-001).* |
Behavioral notes¶
- OP-02 populates ~27 columns on load, mapping flag columns via
.ToBoolean, name parts into an embeddedclsName, and phone parts concatenated into aclsPhone. - None of the navigation properties are cached across accesses;
IneligibilityPeriodsexplicitly re-queries the database every time it is read. Rule_ValidProviderLocation(Level I),Rule_ValidProviderandRule_ValidProviderTypeCode(Level III) are registered at construction and driveIsValid.
Constraints and usage notes¶
- Every navigation property access is a separate round trip; callers walking the whole location graph should expect multiple queries rather than a single join.*
- The type cannot persist edits;
Save()is present only for interface compatibility with the BOF write pattern (BR-DATA-001).
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