Skip to content

Load provider tax IDs

Loads all tax-ID registrations for a provider, each including an embedded address, and supports payee-address resolution based on the tax ID effective today.

Field Value
Operation ID OP-08
Trigger clsProvider.TaxIDs; clsProvider.PayeeAddress
Inputs IDataPortalInfo, provider sequence number
Outputs clsProviderTaxIDCollection
Primary components clsProviderTaxIDCollection.GetProviderTaxIDs
Entry point SAIF.Business.View.Provider/clsProviderTaxIDCollection.vb:115

Steps

  1. Criteria inherits clsRetrieveOnlyBusinessCriteria and installs its SQL via SetRetrieveSQL(...) (SQL-PTAX-01 against PROVIDER_TAX_ID).
  2. BeforeRetrieve sets RequestType = DataRequestType.ResultSet, ID = "Retrieve Provider TaxID's", and binds :ProviderSeqNum.
  3. AfterRetrieve iterates clsResultSet.DataRow rows, Load()-ing a clsProviderTaxID each; Fill also populates an embedded clsAddress (formatting suspended via ActiveFormating = False while the parts are set, then re-enabled).
  4. Consumed by clsProvider.TaxIDs and by clsProvider.PayeeAddress, which selects the tax-ID record effective today and not yet expired whose tax ID equals the primary location's provider primary tax ID, falling back to the primary location's active payment address if none is found (BR-PRV-002).
  5. If no tax-ID record matches: TaxIDs.First(...) throws when no element matches, so the payment-address fallback branch may be unreachable in practice.**

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Caller request]) --> S1["BeforeRetrieve binds<br>ProviderSeqNum"]
    S1 --> S2["AfterRetrieve: iterate<br>ResultSet rows"]
    S2 --> S3[Load each row into clsProviderTaxID<br>with embedded clsAddress]
    S3 --> S4{PayeeAddress requested?}
    S4 -->|Yes| S5["Find tax ID effective today,<br>not expired"]
    S4 -->|No| EndOk(["clsProviderTaxIDCollection<br>returned"])
    S5 --> S6{Match found?}
    S6 -->|Yes| S7([Tax-ID address returned])
    S6 -->|No| S8(["Fallback to primary<br>location's active payment<br>address"])
    S7 --> EndOk
    S8 --> EndOk

Failure and edge-case behavior

  • No tax-ID rows for a provider: an empty clsProviderTaxIDCollection is returned.
  • clsProvider.PayeeAddress calls TaxIDs.First(...), which throws when no element matches; whether the payment-address fallback branch is ever reached is unknown.**

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/clsProviderTaxIDCollection.vb
  • SAIF.Business.View.Provider/clsProvider.vb