clsProviderAddress¶
clsProviderAddress represents one address row belonging to a provider location, inheriting the framework clsAddress type. Unlike most types in this library it is never retrieved standalone through the portal (BeforeRetrieve issues no data request) — it is always materialized as part of clsProviderAddressCollection's load or synthesized by the static GetAddress helpers that implement parent/child address fallback for payee resolution.
Purpose¶
- Treats an address with no expiration date as open-ended, remaining active indefinitely (BR-PADR-001).
- Fixes the three valid address type codes (Correspondence =
COR, Payment =PAY, Physical =PHY), rejecting any other value (BR-PADR-006). - Resolves child/parent address precedence: the parent's non-empty address wins (cloned, flagged
IsParent, re-stamped with the child's business name and location ID); otherwise the child's own address is used (BR-PADR-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 |
|---|---|---|
GetAddress |
Shared Function GetAddress(...) As clsProviderAddress (three overloads: by IDs, mixed ID/object, objects) |
Resolves the effective address for a location, optionally scoped to an AddressTypes value, using the parent/child preference chain (OP-04, BR-PADR-005). |
GetAddress |
Shared Function GetAddress(child As clsProviderLocation, parent As clsProviderLocation, addressType As AddressTypes) As clsProviderAddress |
Resolves the address for a child location, preferring the parent's non-empty address per the fallback rule (BR-PADR-005). |
GetAddressTypeCode |
Shared Function GetAddressTypeCode(addressType As AddressTypes) As String |
Converts an AddressTypes enum value to its fixed database code, throwing Exception("Invalid Address Type.") for unrecognized values (BR-PADR-006). |
AddressTypes (enum) |
Public Enum AddressTypes — members Correspondence, Payment, Physical |
Identifies which of the three address roles a clsProviderAddress instance represents; each maps to a fixed code via GetAddressTypeCode (BR-PADR-006). |
ProviderLocationID |
ReadOnly Property ProviderLocationID As Decimal |
Identifies the owning location for this address row. |
StartDate |
ReadOnly Property StartDate As Date |
The effective start date used by the active-window check (BR-PADR-002). |
TerminationDate |
ReadOnly Property TerminationDate As Date |
The expiration date, or Date.MaxValue when the underlying exp_date column is null (BR-PADR-001). |
IsParent |
ReadOnly Property IsParent As Boolean |
True when this address instance was cloned from a parent location's address during GetAddress resolution (BR-PADR-005). |
IsValid |
ReadOnly Property IsValid As Boolean (inherited/overridden from clsAddress) |
Reflects the base address's format-validation rules; not used to gate any write since none exist for this type. |
IsDirty |
ReadOnly Property IsDirty As Boolean (inherited/overridden from clsAddress) |
Indicates in-memory field changes; has no effect on persistence since the type is never retrieved or saved standalone (BR-DATA-001). |
Behavioral notes¶
- OP-04:
Fill(invoked fromclsProviderAddressCollection.AfterRetrieve) applies BR-PADR-001 by substitutingDate.MaxValuefor a null expiration date. BeforeRetrieveon this type only constructsclsUpdateInfoand issues no data request itself — all loading happens via the owning collection or the staticGetAddresshelpers.- When
GetAddress(child, parent, addressType)clones the parent's address, the clone keeps the parent's address content but is re-stamped with the child's business name and provider-location ID (BR-PADR-005).
Constraints and usage notes¶
- Never retrieved directly by ID; always obtained through
clsProviderAddressCollectionor the staticGetAddressoverloads.* - Address type codes are fixed and validated; passing an unrecognized
AddressTypesvalue toGetAddressTypeCodethrows (BR-PADR-006).
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/clsProviderAddress.vb