Retrieve a provider by ID or primary tax ID¶
Loads a single clsProvider aggregate root, keyed either by its surrogate ProviderID or by its 9-digit primary tax ID, and returns it in read-only state for claim/legal consumers.
| Field | Value |
|---|---|
| Operation ID | OP-01 |
| Trigger | Caller request — provider or location navigation, or a direct lookup by tax ID |
| Inputs | IDataPortalInfo; provider ID (Decimal) or primary tax ID (String) |
| Outputs | clsProvider marked ReadOnly = True |
| Primary components | clsProvider.GetProvider |
| Entry point | SAIF.Business.View.Provider/clsProvider.vb:317, 331 |
Steps¶
- Construct
Criteriawith the supplied key; the constructor setsCriteriaRetrieveTypetoGetByProviderIDorGetByPrimaryTaxID. - Call
inDataportal.DataAccessLayer.RetrieveObject(criteria)— the portal invokesBeforeRetrieve. BeforeRetrievecreatesclsUpdateInfofromDataPortalInfo.UserID, creates a newIDataRequestwithSQLStatement = MyCriteria.RetrieveSQL, and binds either:PrimaryTaxID(max length 9) or:ProviderID(SQL-PRV-01, SQL-PRV-01b against PROVIDER left-joined to PROVIDER_TAX_ID).- Portal executes;
AfterRetrievecastsResulttoclsSAIFDataReader, callsFill()on the first row (FormattedPrimaryTaxID,ProviderID,PrimaryTaxID,RegisteredName, update info), thenMarkOld(). - On failure: if the reader returns no rows,
Fillis skipped and the object is returned with default values (ProviderID = 0). - Caller sets
ReadOnly = Trueon the returned object (BR-PRV-004). Rule BR-PRV-001 is registered at construction and evaluated by the framework rule engine onPrimaryTaxID.
Origin: Step 2's portal dispatch (
IDataPortalInfo.DataAccessLayer.RetrieveObject) and theclsSAIFDataReaderaccessors used in step 4 are implemented in the SAIF BOF Framework package; their internal steps are outside this repository.**
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller request]) --> S1[Construct Criteria<br>by ProviderID or PrimaryTaxID]
S1 --> S2["RetrieveObject via<br>IDataPortalInfo"]
S2 --> S3["BeforeRetrieve binds<br>parameter"]
S3 --> S4{Row returned?}
S4 -->|Yes| S5[AfterRetrieve: Fill, MarkOld]
S4 -->|No| S6[Default-valued clsProvider<br>ProviderID = 0]
S5 --> S7[ReadOnly = True]
S6 --> S7
S7 --> EndOk([clsProvider returned])
Failure and edge-case behavior¶
- No matching row: the returned
clsProviderkeeps default field values (ProviderID = 0); downstream consumers such as BR-PLOC-002 detect this as invalid. - Primary tax ID failing the 9-digit numeric check breaks rule BR-PRV-001, setting
IsValidto false without preventing the object from being returned.
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¶
SAIF.Business.View.Provider/clsProvider.vb