Skip to content

pk73211_premium_audit.get_ending_er_mod_for_pol_per

Overview

Field Value
Schema WCIS_DBA
Type Package function
Database Oracle / WCIS
Calling libraries SAIF.Business.Policy.Audit.Premium
Calling classes clsAuditPolicyPeriod

Purpose

Returns the ERP rating-plan factor in force on the last day of audited coverage, or the neutral 1.0

Procedures / Methods

get_ending_er_mod_for_pol_per

Field Value
Returns See Oracle signature / caller behavior
Called by GetEndingERModFactor (SQL-041)

Description: Returns the ERP rating-plan factor in force on the last day of audited coverage, or the neutral 1.0

Business Rules

Rule ID Rule Condition Action
PROC-RULE-025 Only an experience-rating plan contributes an ending mod factor CASE WHEN pprp.rating_plan_code = 'ERP' THEN pprp.rating_plan_factor ELSE 1.0 END A non-ERP plan yields the neutral factor 1.0
PROC-RULE-026 The factor in force on the last day of coverage is the one that applies pprp.rating_plan_eff_date < in_lastdateofcoverage AND pprp.rating_plan_exp_date >= in_lastdateofcoverage That plan row is selected
PROC-RULE-027 Absence of a rating plan is neutral, not an error WHEN NO_DATA_FOUND RETURN 1.0

Operations

Operation Description Trigger
Get the ending experience-modification factor Returns the ERP rating-plan factor in force on the last day of audited coverage, or the neutral 1.0 clsAuditPolicyPeriod.GetEndingERModFactor (SQL-041); OP-009

Source Code

PL/SQL package or method excerpt
   FUNCTION get_ending_er_mod_for_pol_per(
      in_policynumber                IN policy_period_rating_plan.policy_num%TYPE
    , in_policyperiodeffectivedate   IN policy_period_rating_plan.policy_period_eff_date%TYPE
    , in_lastdateofcoverage          IN policy_period_rating_plan.rating_plan_eff_date%TYPE)
      RETURN policy_period_rating_plan.rating_plan_factor%TYPE
   IS
      v_ending_er_mod_factor   policy_period_rating_plan.rating_plan_factor%TYPE;
   BEGIN
      SELECT CASE
                WHEN pprp.rating_plan_code = 'ERP' THEN pprp.rating_plan_factor
                ELSE 1.0
             END
        INTO v_ending_er_mod_factor
        FROM policy_period_rating_plan pprp
       WHERE     pprp.policy_num = in_policynumber
             AND pprp.policy_period_eff_date = in_policyperiodeffectivedate
             AND pprp.rating_plan_eff_date < in_lastdateofcoverage
             AND pprp.rating_plan_exp_date >= in_lastdateofcoverage;

      RETURN v_ending_er_mod_factor;
   EXCEPTION
      WHEN NO_DATA_FOUND THEN
         RETURN 1.0;
      WHEN OTHERS THEN
         pk73090_error_handler.raise_an_error(
           'get_ending_er_mod_for_pol_per: ' || in_policynumber || ',' ||
           in_policyperiodeffectivedate || ',' || in_lastdateofcoverage || ',' ||
           SQLERRM);
   END get_ending_er_mod_for_pol_per;

   /********************************************************************
   | Name             : is_reconciled
   | Prepared By      : carade
   | Created          : 09/18/2008
   | Description      : Determine if a policy period has all payroll reports processed.
   | Modification History
   | ------------------------------------------------------------------*/

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_ending_er_mod_for_pol_per
  • Calling code: `analysis\oracle-source\pk73211_premium_audit.sql; clsAuditPolicyPeriod.vb