Determine maximum premium-history set ID¶
Determines the maximum premium-history set ID for a policy period, restricted to premium-history type codes 1 and 3, with a DBNull guard defaulting to 0.
| Field | Value |
|---|---|
| Operation ID | OP-POL-006 |
| Trigger | Caller reads PolicyInformation.MaxPremiumHistorySetId(inDPI, inPolicyNumber, inPolicyPeriodEffectiveDate) |
| Inputs | Data portal info, policy number, policy-period effective date |
| Outputs | Decimal (0 if no matching row) |
| Primary components | PolicyInformation.MaxPremiumHistorySetId |
| Entry point | SAIF.Business.Policy\PolicyInformation.vb |
Steps¶
- Caller reads
PolicyInformation.MaxPremiumHistorySetId(inDPI, inPolicyNumber, inPolicyPeriodEffectiveDate). - Inline scalar SQL (SQL-009) is executed against PREM_HIST_SUMMARY, filtered by policy number, period effective date, and
PREM_HIST_TYPE_CODE IN ('1','3'). DPI.ProcessPortalRequestexecutes.- If the result is
DBNull: returns0. - Otherwise: returns the decimal value.
Process flow¶
flowchart TD
Start([MaxPremiumHistorySetId read]) --> S1[Build scalar request with SQL-009]
S1 --> S2[Bind PolicyNumber and PolicyPeriodEffectiveDate]
S2 --> S3[DPI.ProcessPortalRequest executes]
S3 --> D{Result is DBNull?}
D -->|Yes| EndZero([Return 0])
D -->|No| EndVal([Return decimal value])
Failure and edge-case behavior¶
- Unlike several sibling
PolicyInformationproperties, this operation correctly guards againstDBNull, returning0instead of raising a cast exception.
Related documentation¶
Sources¶
SAIF.Business.Policy\PolicyInformation.vb