---
title: Resolve policy associations
summary: Resolves the policies associated with a policy across manual, relationship, discount, and experience-rating families.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-31
library: SAIF.Business.View.Policy
reference_type: package
operation_id: OP-04
trigger: `clsPolicyData.Associations` is first accessed, a preferred association type is assigned, or a caller invokes the list directly
---

# Resolve policy associations

Oregon workers' compensation policies are frequently connected to one another — manually recorded affiliations, wrap-up and leasing relationships, premium-discount combinations, and experience-rating combinations. This operation gathers all four families in a single round trip and presents them in one uniform shape so that callers do not need to know which mechanism produced a given link.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-04 |
| **Trigger** | `clsPolicyData.Associations` is first accessed, a preferred association type is assigned, or a caller invokes the list directly |
| **Inputs** | `IDataPortalInfo`, policy number, an include-source-policy flag, and an optional as-of date |
| **Outputs** | A sequence of `PolicyAssociation` values |
| **Primary components** | `PolicyAssociationList.GetPolicyAssociationList` |
| **Entry point** | `Business/SAIF.Business.View.Policy/PolicyAssociations.vb` |

## Steps

1. Create a portal request whose statement is the four-part `UNION` that covers manual affiliations, system-derived policy relationships, premium-discount combinations, and experience-rating combinations ([SQL-026](../sql/SQL-026-policy-association-union.md)).
   - The statement reads [POLICY_RELATIONSHIP](../database-tables.md#policy-relationship), [POLICY](../database-tables.md#policy), [COMBO_POLICY_PERIOD](../database-tables.md#combo-policy-period), [POLICY_PERIOD](../database-tables.md#policy-period), and [ER_COMBINATION_POLICY](../database-tables.md#er-combination-policy).
2. Decide the two as-of dates that scope the combination branches ([BR-014](../business-rules.md#br-014-association-date-defaults-differ-per-association-family-and-detail-load-failures-are-non-fatal)).
   - If the caller supplied an as-of date, bind it to both the experience-rating and discount-combination date parameters.
   - If the caller supplied none, bind the experience-rating date to the data source date and query the policy's latest policy-period effective date for the discount-combination date ([SQL-027](../sql/SQL-027-max-policy-period-eff-date.md), [POLICY_PERIOD](../database-tables.md#policy-period)).
   - The default path therefore costs one extra round trip.
3. Bind the policy number and execute the request through the data access layer.
4. Project each returned row into a `PolicyAssociation`, translating the relationship code into a typed association type ([BR-015](../business-rules.md#br-015-unrecognized-relationship-codes-are-classified-as-not-specified), [BR-016](../business-rules.md#br-016-manually-maintained-affiliations-are-distinguished-by-an-m-prefixed-code)).
   - Codes sourced from the manual affiliation table carry an `M.` prefix and resolve to the manual association types.
   - A code that matches none of the known values is retained as not specified rather than discarded, and maps to a non-affiliated affiliate type.
5. Unless the caller asked for the source policy to be included, drop the row whose policy number equals the requested policy.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([Associations requested]) --> D{As-of date supplied?}
    D -->|Yes| Bind[Bind the supplied date<br>to both date parameters]
    D -->|No| Def[Bind data source date<br>and query the latest period date]
    Bind --> Ex[(Four-part UNION query)]
    Def --> Ex
    Ex --> Proj[Project rows and translate<br>relationship codes]
    Proj --> U{Code recognised?}
    U -->|Yes| Typed[Typed association]
    U -->|No| NotSpec[Not specified association]
    Typed --> Filt[Drop the source policy<br>unless requested]
    NotSpec --> Filt
    Filt --> Ok([Association list])
```

## Failure and edge-case behavior

- An unrecognised relationship code is retained with no meaningful type rather than raising ([BR-015](../business-rules.md#br-015-unrecognized-relationship-codes-are-classified-as-not-specified)).
- A policy with no associations returns an empty sequence.
- The default date path issues an extra scalar query before the main statement ([SQL-027](../sql/SQL-027-max-policy-period-eff-date.md)).

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence. Statements marked with `**` could
> not be confirmed; treat as unknown until verified.

## Related documentation

- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)
- [Procedures](../procedures/index.md)
- [Security and authorization](../security-authorization.md)
- [API reference](../api/index.md)

## Sources

- `Business/SAIF.Business.View.Policy/PolicyAssociations.vb`
