Load provider relationships (parents or children)¶
Loads either the child or parent set of provider-location relationships for a location, materializing the destination clsProviderLocation for each relationship, and applies "works for" filtering by relationship code and active-date window.
| Field | Value |
|---|---|
| Operation ID | OP-05 |
| Trigger | clsProviderLocation.ChildRelationships / ParentRelationships; clsCaseCost.WorksFor; clsRequestManager attorney lookup |
| Inputs | IDataPortalInfo, provider-location ID |
| Outputs | clsProviderRelationshipCollection |
| Primary components | clsProviderRelationshipCollection.GetChildProviderRelationshipCollection, GetParentProviderRelationshipCollection |
| Entry point | SAIF.Business.View.Provider/clsProviderRelationshipCollection.vb:236, 244 |
Steps¶
- Criteria stores
SourceRelationshipType(Parentby default). RetrieveSQLselectsRetrieveChildRelationshipsSQL(SQL-PREL-01) when the source is the parent, otherwiseRetrieveParentRelationshipsSQL(SQL-PREL-02). Both join PROVIDER_LOCATION to PROVIDER_RELATIONSHIP and left-join back toPROVIDER_LOCATIONfor the other end, ordered by business name.BeforeRetrievebinds:ProviderLocationID.AfterRetrievebuilds aclsProviderLocationCollectionalongside the relationship collection; each row produces aclsProviderRelationshipwhoseLoad()also materialises the destinationclsProviderLocation.WorksForfiltersProviderRelationshipCode = "WRK"and (whenActiveOnly, the default)IsActive(BR-PREL-001, BR-PREL-002).- If
activeDateis supplied:WorksFor(activeDate)substitutesDate.MaxValuefor a missing termination date (BR-PREL-003). - Destination navigation always resolves to the opposite end via
DestinationRelationshipType(BR-PREL-004). - Note:
clsProviderRelationship.Criteriathrows on all five SQL properties — individual relationships are never retrieved directly.**
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller request]) --> S1{"Child or parent<br>relationships?"}
S1 -->|Child| S2[RetrieveChildRelationshipsSQL]
S1 -->|Parent| S3[RetrieveParentRelationshipsSQL]
S2 --> S4["BeforeRetrieve binds<br>ProviderLocationID"]
S3 --> S4
S4 --> S5["AfterRetrieve: build<br>relationship + location<br>collections"]
S5 --> S6{WorksFor filter requested?}
S6 -->|Yes| S7[Filter code = WRK<br>and ActiveOnly date test]
S6 -->|No| EndOk(["clsProviderRelationshipCollection<br>returned"])
S7 --> EndOk
Failure and edge-case behavior¶
- No matching relationships: an empty
clsProviderRelationshipCollectionis returned. clsProviderRelationship.CriteriathrowsInvalidSQLPropertyfor all five SQL properties, so a single relationship can never be retrieved directly through the portal.**- A missing termination date is treated as
Date.MaxValue, keeping open-ended relationships active (BR-PREL-003).
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/clsProviderRelationship.vbSAIF.Business.View.Provider/clsProviderRelationshipCollection.vb