Skip to content

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

  1. Construct Criteria with the supplied key; the constructor sets CriteriaRetrieveType to GetByProviderID or GetByPrimaryTaxID.
  2. Call inDataportal.DataAccessLayer.RetrieveObject(criteria) — the portal invokes BeforeRetrieve.
  3. BeforeRetrieve creates clsUpdateInfo from DataPortalInfo.UserID, creates a new IDataRequest with SQLStatement = 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).
  4. Portal executes; AfterRetrieve casts Result to clsSAIFDataReader, calls Fill() on the first row (FormattedPrimaryTaxID, ProviderID, PrimaryTaxID, RegisteredName, update info), then MarkOld().
  5. On failure: if the reader returns no rows, Fill is skipped and the object is returned with default values (ProviderID = 0).
  6. Caller sets ReadOnly = True on the returned object (BR-PRV-004). Rule BR-PRV-001 is registered at construction and evaluated by the framework rule engine on PrimaryTaxID.

Origin: Step 2's portal dispatch (IDataPortalInfo.DataAccessLayer.RetrieveObject) and the clsSAIFDataReader accessors 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 clsProvider keeps 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 IsValid to false without preventing the object from being returned.

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