Skip to content

Compute premium summary adjustment sub-totals

Premium display / document generation needs grouped premium sub-totals

Field Value
Operation ID OP-004
Trigger Premium display / document generation needs grouped premium sub-totals
Inputs A collection of iPremiumSummaryAdjustment lines
Outputs PremiumSummaryAdjustmentSubTotalList of SubTotalPremiumSummaryAdjustment entries
Primary components PremiumSummaryAdjustmentSubTotalList.GetSubTotalPremiumSummaryAdjustments(list) (SubTotalPremiumSummaryAdjustment.vb)
Entry point Business\SAIF.Business.Policy.Premium\SubTotalPremiumSummaryAdjustment.vb

Steps

  1. If the input list is empty, return an empty result immediately.
  2. Resolve the single governing rating rule master via GetSingleRatingRuleMaster. If the input spans more than one RatingRuleMasterId, this throws ApplicationException (BR-013).
  3. Build the working list as PremiumSummaryAdjustmentSubTotalList(list, ratingRuleMaster.PremiumAdjustmentTypeCodes).
  4. Compute AllPeriods = distinct EffectiveRange values, compared with DateRangeEqualityComparer.
  5. Compute Periods: when more than one distinct period exists, use all split periods excluding the overall minimum→maximum span; otherwise use the single period.
  6. Select per-period sub-total types: those where PremiumRatingRulePriority IsNot Nothing AndAlso RatingRuleMasterID <> 0 AndAlso AreAllGetAdjustmentSQLsNull AndAlso RatingRuleFunction is one of Addition, IncreasedLimitsMinimumPremium, Multiplication, PremiumPeriodProcessing (BR-014).
  7. Select overall sub-total types: the same first three conditions AndAlso RatingRuleFunction is one of DCBSSplitProcessing, ProcessLater (BR-015). These span minimum effective date → maximum expiration date.
  8. For each sub-total basis, GetPSAsToSum(bases, psaList) returns Nothing when either input is empty; otherwise it selects the adjustments whose AdjustmentTypeCode equals the basis's PremiumAdjustmentTypeCodeIncluded.
  9. The result is the union of per-period sub-totals and overall sub-totals, tagged with one of the 24 sub-total codes (ZMAN, ZWAV, ZSUBP, ZMOD, ZRATE, ZGRP, ZOCC, ZEST, ZTEST, ZSPC, ZPREP, ZSTD, ZDISC, ZREM, ZDP, ZNEAP, ZLCF, ZUSLH, ZTERR, ZCAT, ZDCBS, ZRXT, ZDCBR, ZDCBT) mapped by the SubTotalPremiumSummaryAdjustmentTypes enum (25 members).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Trigger]) --> S1[Step 1]
    S1 --> S2[Step 2]
    S2 --> EndOk([Outputs returned])

Failure and edge-case behavior

  • See the linked rules and SQL references above for validation failures, null-handling, and persistence contention behavior.

Sources

  • Business\SAIF.Business.Policy.Premium\SubTotalPremiumSummaryAdjustment.vb
  • Business\SAIF.Business.Policy.Premium\iPremiumSummaryAdjustment.vb