---
title: "Pk82033_ThirdParty stored procedure documentation"
summary: "Analysis of the Oracle package called by SAIF.Business.View.Policy, including business rules and operations."
status: draft
owner: "SAIF Doc Gen"
last_reviewed: "2026-07-31"
source_schema: "WCIS_DBA"
source_name: "Pk82033_ThirdParty"
source_type: "PACKAGE"
oracle_status: "found"
library: SAIF.Business.View.Policy
reference_type: package
---

# Pk82033_ThirdParty

## Overview

| Field | Value |
| --- | --- |
| **Schema** | `WCIS_DBA` |
| **Type** | Package |
| **Database** | Oracle (TNS alias not declared in this library's source)** |
| **Calling libraries** | `SAIF.Business.View.Policy` |
| **Calling classes** | `clsPolicyData` |

## Purpose

Third-party subrogation package; this library uses only its waiver-count function to answer whether a policy carries a waiver.

## Procedures / Methods

### get_policy_waiver_count

| Field | Value |
| --- | --- |
| **Returns** | NUMBER — count of waiver rows |
| **Called by** | `clsPolicyData.RetrieveHasWaiver` |
| **SQL document** | [SQL-022](../sql/SQL-022-policy-waiver-count.md) |

**Description:** Returns the number of waiver-detail rows recorded for a policy.

#### Parameters

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `PolicyNum` | IN | `POLICY.POLICY_NUM%TYPE` | — | Policy number being read. |

## Business Rules

Rules extracted from this package's logic:

| Rule ID | Rule | Condition | Action |
| --- | --- | --- | --- |
| [PROC-RULE-016](../business-rules.md#stored-procedure-business-rules) | A policy "has a waiver" is defined purely as having at least one waiver-detail row | n/a | Returns `COUNT(*) FROM WAIVER_DETAIL WHERE POLICY_NUM = PolicyNum`; the caller treats any non-zero count as `True` |

> These rules are also listed under `## Stored procedure business rules` in [business-rules.md](../business-rules.md).

## Operations

Operations implemented in this package:

| Operation | Description | Trigger |
| --- | --- | --- |
| Check waiver existence | Returns the count of waiver records for a policy | `clsPolicyData.RetrieveHasWaiver` |

> These operations are also listed under `## Stored procedure operations` in [operations-processes.md](../operations-processes.md).

## Source Code

> **Note:** The full `WCIS_DBA.Pk82033_ThirdParty` package body (165,707 characters of PL/SQL) is too large to reproduce in this document. Only the declarations of the methods this library actually calls are shown below. The complete package body is available from the Oracle data dictionary (`DBA_SOURCE`/`ALL_SOURCE`) for `WCIS_DBA.Pk82033_ThirdParty`.

<details>
<summary>PL/SQL declarations of the called methods</summary>

```sql
-- Retrieved from the Oracle data dictionary for WCIS_DBA.Pk82033_ThirdParty

FUNCTION get_policy_waiver_count
(
  PolicyNum IN POLICY.POLICY_NUM%TYPE
)
  RETURN NUMBER
```

</details>

> **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.

## Related documentation

- [Procedure catalog](index.md)
- [Business rules](../business-rules.md)
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources

- `Business/SAIF.Business.View.Policy/clsPolicyData.vb`
- Oracle data dictionary source for `WCIS_DBA.Pk82033_ThirdParty`
