---
title: Retrieve maximum premium history set id
summary: Retrieve maximum premium history set id.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy
reference_type: package
operation_id: OP-005
trigger: A caller needs the current premium-history set identifier.
---

# Retrieve maximum premium history set id

Retrieve maximum premium history set id.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-005 |
| **Trigger** | A caller needs the current premium-history set identifier. |
| **Inputs** | `IDataPortalInfo`, policy number, policy period effective date |
| **Outputs** | Premium history set id or `0` |
| **Primary components** | `PolicyInformation` |
| **Entry point** | `Business\SAIF.Business.Policy\PolicyInformation.vb` |

## Steps

1. Issue [SQL-009](../sql/SQL-009-saif-business-policy.md) against [PREM_HIST_SUMMARY](../database-tables.md#prem_hist_summary).
2. Filter to the eligible premium-history type codes for the supplied policy period.
3. Return the maximum set id, or `0` when Oracle returns `DBNull`.
4. Apply related business rules: [BR-POL-005](../business-rules.md#br-pol-005-only-eligible-premium-history-types-contribute-to-the-max-set-id), [BR-POL-006](../business-rules.md#br-pol-006-missing-premium-history-rows-return-zero)

## Process flow

The following diagram visualizes the main control flow for this operation.

```mermaid

flowchart TD

  Start([Trigger]) --> Work[Execute operation steps]

  Work --> Done([Return result])

```

## Failure and edge-case behavior

- Business rules are cross-referenced from the catalog page and the SQL or procedure logic cited in these steps.
- Database and procedure failures surface according to the underlying implementation path.

## Related documentation

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

## Sources

- `Business\SAIF.Business.Policy\PolicyInformation.vb`
