Provider type reference data¶
Provider type reference data reads PROVIDER_TYPE_CODE, either a single code record or the full ordered catalog. Both criteria classes explicitly throw on every SQL accessor except RetrieveSQL (BR-001), making this operation a read-only reference-data lookup rather than a maintainable business object, despite inheriting the standard clsBusinessBase/IBusinessCriteria pattern used by mutable entities elsewhere in this library.
| Field | Value |
|---|---|
| Operation ID | OP-VP-07 |
| Trigger | clsProviderType.GetProviderType(inDataportal, inCode) — invoked directly or via clsProviderLocation.ProviderType; clsProviderTypeCollection.GetProviderTypeCollection(inDataportal) |
| Inputs | Provider type code (String, 5 characters); or none, for the full collection |
| Outputs | A populated clsProviderType (claim-profile, diagnosis-required, mandatory-MCO, medical-audit, self-registration, and service-provider-restricted flags, plus DCBS type code and description); or a full clsProviderTypeCollection ordered by description |
| Primary components | clsProviderType.GetProviderType, clsProviderType.Criteria, clsProviderTypeCollection.GetProviderTypeCollection, clsProviderTypeCollection.Criteria |
| Entry point | Business\SAIF.Business.View.Provider\clsProviderType.vb |
Steps¶
- Request a single type by code.
GetProviderTypebuilds a criteria carrying the code and retrieves through the standard data-portal path. - Bind the code parameter.
BeforeRetrievebinds:Code(max length 5) and executes the retrieve SQL againstPROVIDER_TYPE_CODE(SQL-019, PROVIDER_TYPE_CODE) (BR-001). - Read the single row.
AfterRetrievereads at most one row, fills all flag and descriptive fields plus update info, and marks the object old only when a row was found. - Request the full catalog.
GetProviderTypeCollectionbuilds a criteria with no filter parameter. - Execute the unfiltered, ordered query. The collection criteria's
RetrieveSQLselects everyPROVIDER_TYPE_CODErow with noWHEREclause, ordered byCODE_DESCR(SQL-020, PROVIDER_TYPE_CODE) (BR-001). - Populate the collection.
AfterRetrieveiterates the result set, constructs aclsProviderTypeper row, callsLoad, and adds each to the collection. - Reject any attempted mutation. Both criteria classes'
CreateSQL,DeleteSQL,InsertSQL, andUpdateSQLproperties throwApplicationException(clsConstants.Messages.InvalidSQLProperty)unconditionally when read, so any code path that tries to save aclsProviderTypeorclsProviderTypeCollectionfails immediately at the criteria level before any database call is attempted (BR-001).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Provider type requested]) --> Which{Single or collection?}
Which -->|Single, by code| Single[Bind Code parameter]
Which -->|Full collection| Coll[No filter parameter]
Single --> Exec1[Execute retrieve query]
Exec1 --> Row{Row found?}
Row -->|Yes| Fill1[Fill type; MarkOld]
Row -->|No| Empty1([Object left in default state])
Coll --> Exec2[Execute unfiltered ordered query]
Exec2 --> Loop[For each row: create clsProviderType,<br>Load, add to collection]
Loop --> Done([Populated collection returned])
Fill1 --> Save{Save attempted?}
Done --> Save
Save -->|Yes| Throw([ApplicationException thrown<br>before any database call])
Failure and edge-case behavior¶
- A single-code lookup that matches no row leaves the object in its default (empty) state with no exception raised — only an attempted save throws, not a missed retrieve.
- A save attempt on either the single object or the collection throws immediately from the criteria property getter, before any SQL is built or executed, so the failure is deterministic and occurs entirely in-process (BR-001).
- The full-collection query has no filter and no pagination, so the entire
PROVIDER_TYPE_CODEtable is returned on every call; this is acceptable for small, largely static reference-data tables but would not scale to a large code table.*
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.
Sources¶
Business\SAIF.Business.View.Provider\clsProviderType.vbBusiness\SAIF.Business.View.Provider\clsProviderTypeCollection.vb