Skip to content

Provider tax ID retrieval

Provider tax ID retrieval reads every PROVIDER_TAX_ID row for a provider through a collection whose criteria structurally supports only retrieval — it inherits clsRetrieveOnlyBusinessCriteria and calls SetRetrieveSQL directly rather than implementing the full IBusinessCriteria create/update/delete surface used elsewhere in this library (BR-004). Each tax ID row carries its own mailing address, W-9 sent/received dates, and 1099-reportable flag.

Field Value
Operation ID OP-VP-06
Trigger clsProviderTaxIDCollection.GetProviderTaxIDs(inDataportal, inProviderSeqNum) — invoked directly or via clsProvider.TaxIDs
Inputs Provider ID (Decimal, bound as ProviderSeqNum)
Outputs A populated clsProviderTaxIDCollection; each item exposes TaxID, TaxIDDisplay, RegisteredName, EffectiveDate/ExpirationDate, Is1099Reportable, W9SentDate/W9ReceivedDate, and Address
Primary components clsProviderTaxIDCollection.GetProviderTaxIDs, clsProviderTaxIDCollection.Criteria (inherits clsRetrieveOnlyBusinessCriteria), clsProviderTaxID.Load
Entry point Business\SAIF.Business.View.Provider\clsProviderTaxIDCollection.vb

Steps

  1. Request the tax IDs for a provider. GetProviderTaxIDs builds a criteria carrying the provider ID and retrieves through the standard data-portal path.
  2. Construct the retrieve-only criteria. The criteria's constructor calls the base clsRetrieveOnlyBusinessCriteria constructor and then SetRetrieveSQL with the full inline SELECT text at construction time, rather than exposing a RetrieveSQL property computed on demand as the other criteria classes in this library do (BR-004).
  3. Bind the provider parameter. BeforeRetrieve sets the request type to ResultSet, sets the SQL statement from the criteria's retrieve SQL, and binds :ProviderSeqNum (SQL-018, PROVIDER_TAX_ID).
  4. Populate the collection from a result set. AfterRetrieve iterates a clsResultSet (rather than a raw data reader, unlike most other collections in this library) and, for each row, constructs a clsProviderTaxID, calls Load, and adds it to the collection.
  5. Fill each tax ID's address inline. clsProviderTaxID.Fill populates a clsAddress member directly from the row's city, address lines, state, country, and zip fields, toggling ActiveFormating off during the raw assignment and back on afterward so the address does not reformat itself mid-load.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([GetProviderTaxIDs called]) --> Bind[Bind ProviderSeqNum parameter<br>on retrieve only criteria]
    Bind --> Exec[Execute retrieve SQL as a ResultSet]
    Exec --> Loop[For each row: create clsProviderTaxID,<br>Load, add to collection]
    Loop --> Done([Populated collection returned])

Failure and edge-case behavior

  • The collection's criteria has no CreateSQL, InsertSQL, UpdateSQL, or DeleteSQL implementation at all — attempting to save changes to this collection would fail at the base clsRetrieveOnlyBusinessCriteria level rather than through an explicit thrown exception in this library's own code, unlike the pattern used by clsProviderType (BR-001).*
  • A provider with no tax ID rows returns an empty collection with no exception raised.
  • The exact base-class enforcement behavior of clsRetrieveOnlyBusinessCriteria resides in SAIF.BOF.Business, not in this library's own source, so the precise failure mode for an attempted save could not be independently confirmed.**

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

  • Business\SAIF.Business.View.Provider\clsProviderTaxID.vb
  • Business\SAIF.Business.View.Provider\clsProviderTaxIDCollection.vb