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¶
- If the input list is empty, return an empty result immediately.
- Resolve the single governing rating rule master via
GetSingleRatingRuleMaster. If the input spans more than oneRatingRuleMasterId, this throwsApplicationException(BR-013). - Build the working list as
PremiumSummaryAdjustmentSubTotalList(list, ratingRuleMaster.PremiumAdjustmentTypeCodes). - Compute
AllPeriods= distinctEffectiveRangevalues, compared withDateRangeEqualityComparer. - Compute
Periods: when more than one distinct period exists, use all split periods excluding the overall minimum→maximum span; otherwise use the single period. - Select per-period sub-total types: those where
PremiumRatingRulePriority IsNot NothingAndAlso RatingRuleMasterID <> 0AndAlso AreAllGetAdjustmentSQLsNullAndAlsoRatingRuleFunctionis one ofAddition,IncreasedLimitsMinimumPremium,Multiplication,PremiumPeriodProcessing(BR-014). - Select overall sub-total types: the same first three conditions
AndAlso RatingRuleFunctionis one ofDCBSSplitProcessing,ProcessLater(BR-015). These span minimum effective date → maximum expiration date. - For each sub-total basis,
GetPSAsToSum(bases, psaList)returnsNothingwhen either input is empty; otherwise it selects the adjustments whoseAdjustmentTypeCodeequals the basis'sPremiumAdjustmentTypeCodeIncluded. - 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
SubTotalPremiumSummaryAdjustmentTypesenum (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.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Premium\SubTotalPremiumSummaryAdjustment.vbBusiness\SAIF.Business.Policy.Premium\iPremiumSummaryAdjustment.vb