pk73211_premium_audit.get_current_premium
Overview
Field
Value
Schema
WCIS_DBA
Type
Package function
Database
Oracle / WCIS
Calling libraries
SAIF.Business.Policy.Audit.Premium
Calling classes
clsAuditPolicyPeriod
Purpose
Nets NEAP base amounts against DCBS difference amounts over the newest premium-history set
Procedures / Methods
get_current_premium
Field
Value
Returns
See Oracle signature / caller behavior
Called by
GetCurrentPremium (SQL-039)
Description: Nets NEAP base amounts against DCBS difference amounts over the newest premium-history set
Business Rules
Rule ID
Rule
Condition
Action
PROC-RULE-028
Current premium is the net of new/estimated annual premium less DCBS adjustments
prem_adjustment_type_code IN ('NEAP','DCBS')
'NEAP' adds prem_summary_base_amount; anything else subtracts prem_summary_diff_amount
PROC-RULE-029
Only the newest premium-history set is used
phps.prem_hist_set_id = (SELECT MAX(phs.prem_hist_set_id) … for the policy and period)
Older sets are ignored
Operations
Operation
Description
Trigger
Get the current annual premium
Nets NEAP base amounts against DCBS difference amounts over the newest premium-history set
clsAuditPolicyPeriod.GetCurrentPremium (SQL-039); OP-009
Source Code
PL/SQL package or method excerpt
FUNCTION get_current_premium ( in_policynumber IN policy_period . policy_num % TYPE
, in_policyperiodeffectivedate IN policy_period . policy_period_eff_date % TYPE )
RETURN NUMBER
IS
v_premium NUMBER : = 0 ;
CURSOR prem_cur
IS
SELECT phps . prem_adjustment_type_code
, phps . prem_summary_base_amount
, phps . prem_summary_diff_amount
FROM prem_hist_prem_summary phps
WHERE phps . prem_adjustment_type_code IN ( 'NEAP'
, 'DCBS' )
AND phps . prem_hist_set_id =
( SELECT MAX ( phs . prem_hist_set_id )
FROM prem_hist_summary phs
WHERE phs . policy_num = in_policynumber
AND phs . policy_period_eff_date = in_policyperiodeffectivedate );
BEGIN
FOR prem_rec IN prem_cur
LOOP
IF prem_rec . prem_adjustment_type_code = 'NEAP' THEN
v_premium : = v_premium + prem_rec . prem_summary_base_amount ;
ELSE
v_premium : = v_premium - prem_rec . prem_summary_diff_amount ;
END IF ;
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.
Sources
Oracle DBA_SOURCE: pk73211_premium_audit.get_current_premium
Calling code: `analysis\oracle-source\pk73211_premium_audit.sql; clsAuditPolicyPeriod.vb