---
title: Check waiver existence
summary: Determines whether a policy has any third-party waiver of subrogation.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-31
library: SAIF.Business.View.Policy
reference_type: package
operation_id: OP-03
trigger: `clsPolicyData.HasWaiver` is read for the first time
---

# Check waiver existence

A waiver of subrogation changes how a claim on the policy may be pursued, so consuming views need a simple yes-or-no answer. The database supplies a count rather than a flag, and this operation reduces that count to a boolean.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-03 |
| **Trigger** | `clsPolicyData.HasWaiver` is read for the first time |
| **Inputs** | The policy number held by the loaded `clsPolicyData` |
| **Outputs** | A boolean waiver indicator cached on the instance |
| **Primary components** | `clsPolicyData.RetrieveHasWaiver` |
| **Entry point** | `Business/SAIF.Business.View.Policy/clsPolicyData.vb` |

## Steps

1. Check the waiver-read guard flag and set it, so the check runs at most once per instance.
2. Build a scalar stored procedure request against `Pk82033_ThirdParty.get_policy_waiver_count`, passing the policy number and declaring the count as a return-value parameter ([SQL-022](../sql/SQL-022-policy-waiver-count.md)).
3. Process the request and coerce the returned count to a boolean.
   - Any count greater than zero becomes true; there is no distinction between one waiver and many.
   - A null or absent count coerces to false, so the safe answer is the default.*

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([HasWaiver read]) --> G{Already checked?}
    G -->|Yes| Ret([Return cached value])
    G -->|No| Q[(Pk82033_ThirdParty.get_policy_waiver_count)]
    Q --> C{Count greater than zero?}
    C -->|Yes| TrueV[Waiver present]
    C -->|No| FalseV[No waiver]
    TrueV --> Ret
    FalseV --> Ret
```

## Failure and edge-case behavior

- The count carries no detail: callers cannot learn how many waivers exist or which claims they cover.
- A failure in the scalar request propagates to the caller; this operation adds no handling of its own.

> **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/clsPolicyData.vb`
