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¶
- Request the tax IDs for a provider.
GetProviderTaxIDsbuilds a criteria carrying the provider ID and retrieves through the standard data-portal path. - Construct the retrieve-only criteria. The criteria's constructor calls the base
clsRetrieveOnlyBusinessCriteriaconstructor and thenSetRetrieveSQLwith the full inlineSELECTtext at construction time, rather than exposing aRetrieveSQLproperty computed on demand as the other criteria classes in this library do (BR-004). - Bind the provider parameter.
BeforeRetrievesets the request type toResultSet, sets the SQL statement from the criteria's retrieve SQL, and binds:ProviderSeqNum(SQL-018, PROVIDER_TAX_ID). - Populate the collection from a result set.
AfterRetrieveiterates aclsResultSet(rather than a raw data reader, unlike most other collections in this library) and, for each row, constructs aclsProviderTaxID, callsLoad, and adds it to the collection. - Fill each tax ID's address inline.
clsProviderTaxID.Fillpopulates aclsAddressmember directly from the row's city, address lines, state, country, and zip fields, togglingActiveFormatingoff 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, orDeleteSQLimplementation at all — attempting to save changes to this collection would fail at the baseclsRetrieveOnlyBusinessCriterialevel rather than through an explicit thrown exception in this library's own code, unlike the pattern used byclsProviderType(BR-001).* - A provider with no tax ID rows returns an empty collection with no exception raised.
- The exact base-class enforcement behavior of
clsRetrieveOnlyBusinessCriteriaresides inSAIF.BOF.Business, not in this library's own source, so the precise failure mode for an attempted save could not be independently confirmed.**
Related documentation¶
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.vbBusiness\SAIF.Business.View.Provider\clsProviderTaxIDCollection.vb