Retrieve a policy preferred worker¶
This operation documents how clsPolicyPreferredWorker.GetPolicyPreferredWorker fulfills the policy-affiliate behavior described for SAIF.Business.Policy.Affiliate.
| Field | Value |
|---|---|
| Operation ID | OP-006 |
| Trigger | A caller needs one preferred-worker association identified by policy, affiliate, and effective date. |
| Inputs | IDataPortalInfo, affiliate SSN, policy number, effective date |
| Outputs | clsPolicyPreferredWorker |
| Primary components | clsPolicyPreferredWorker.GetPolicyPreferredWorker |
| Entry point | Business\SAIF.Business.Policy.Affiliate\clsPolicyPreferredWorker.vb |
Steps¶
- Create the preferred-worker criteria from the composite key and delegate retrieval to the BOF retrieve lifecycle.
- In
BeforeRetrieve, assign SQL-006 and bind the key parameters for BUSINESS_AFFILIATE and AFFILIATE. - The SQL filters to affiliate type
2and joins the association row to the affiliate person row by SSN (BR-AFF-004, BR-AFF-009). - If a row is returned, load the shared association and nested affiliate fields; otherwise leave the object at its default state (BR-AFF-001).
- Return the preferred-worker object; eligibility details remain unloaded until a lazy property requires them.
Process flow¶
The following diagram shows the type-2 filtered, SSN-joined retrieval; eligibility fields remain unloaded until requested separately.
flowchart TD
Start(["Caller supplies policy, affiliate, effective date"]) --> Criteria["Build composite-key Criteria"]
Criteria --> Before["BeforeRetrieve: assign SQL-006<br>bind key against BUSINESS_AFFILIATE + AFFILIATE"]
Before --> Filter["SQL filters AFFILIATE_TYPE_CODE = 2<br>joins association to person by SSN"]
Filter --> Query{"Row returned?"}
Query -->|Yes| Load["Load shared association<br>and nested affiliate fields"]
Query -->|No| Default["Leave object at default state"]
Load --> Result(["Return clsPolicyPreferredWorker;<br>eligibility fields unloaded"])
Default --> Result
Failure and edge-case behavior¶
- Eligibility fields are loaded separately and only on demand.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Affiliate\clsPolicyPreferredWorker.vb