Default Enrollment

This formula type can be used to determine whether an option in plan should be assigned to a person as part of the default enrollment process.

Contexts

The following contexts are available to formulas of this type:

  • BUSINESS_GROUP_ID ( ENTERPRISE_ID)
  • EFFECTIVE_DATE
  • HR_ASSIGNMENT_ID
  • PERSON_ID
  • LER_ID
  • ORGANIZATION_ID
  • JURISDICTION_CODE
  • PGM_ID
  • PL_ID
  • PL_TYP_ID
  • OPT_ID

Database Items

Use only the following database items that are available to formulas of this type:

  • All columns except attribute columns from tables: ben_ler_f, ben_pgm_f, ben_pl_f, ben_opt_f, ben_pl_typ_f
  • Database items based on person’s assignment – HR_ASSIGNMENT_ID AND PERSON_ID

Input Variables

Input variables are available to formulas of this type.

Input variables table

Input Data Type Required Description
NUM_ELIG_DPNT Number Number of eligible dependents

Return Variables

Use predefined names for return variables. The following return variables are available to formulas of this type.

Return variables table

Return Value Data Type Required Description
AUTO_DFLT_VAL Char Y Y or N
CARRY_FORWARD_ELIG_DPNT Char Y

CFRRWP - Carry Forward or Reinstate Within Program

CFWP - Carry Forward Within Program

Errors

If any other output value is returned then the participation process errors with BEN_91329_FORMULA_RETURN.

Sample Formula 1:

FORMULA NAME: BEN_DFLT_ENRT

FORMULA TYPE: Default Enrollment

DESCRIPTION: Formula to determine whether a compensation object should be an defaulted for the person.

INPUTS are NUM_ELIG_DPNT
Default for BEN_OPT_NAME is 'aa'
Default for BEN_PLN_NAME is 'aa'
Default for NUM_ELIG_DPNT is 0
l_pln_name = BEN_PLN_NAME
l_opt_name = BEN_OPT_NAME
l_num_elig_dpnt = NUM_ELIG_DPNT
IF l_pln_name = 'Stay Healthy HMO' then
(
if l_opt_name = 'Employee Only' and l_num_elig_dpnt = 0 then
(
AUTO_DFLT_VAL = 'Y'
CARRY_FORWARD_ELIG_DPNT = 'CFWP'
)
else if l_opt_name = 'Employee Plus One' and l_num_elig_dpnt = 1 then
(
AUTO_DFLT_VAL = 'Y'
CARRY_FORWARD_ELIG_DPNT = 'CFWP'
)
else if l_opt_name = 'Employee Plus Family' and
l_num_elig_dpnt > 1 then
(
AUTO_DFLT_VAL = 'Y'
CARRY_FORWARD_ELIG_DPNT = 'CFWP'
)
else
(AUTO_DFLT_VAL = 'N')
)
else
(AUTO_DFLT_VAL = 'N')
return AUTO_DFLT_VAL, CARRY_FORWARD_ELIG_DPNT

Sample Formula 2:

FORMULA TYPE: Default Enrollment

Description: Derive the default plan/option based on the labour union membership.

Default for BEN_OPT_NAME is 'NA'
Default for BEN_PLN_NAME is 'NA'
Default for PER_ASG_LABOUR_UNION_MEMBER_FLAG is 'XXX'
DEFAULT_DATA_VALUE for BEN_EPE_PL_NAME_TN is 'NA'
DEFAULT_DATA_VALUE for BEN_EPE_OPT_NAME_TN is 'NA'
DEFAULT FOR PER_ASG_ORG_LEGAL_EMPLOYER_NAME is 'XXX'
l_pln_name = BEN_PLN_NAME
l_opt_name = BEN_OPT_NAME
l_flag = PER_ASG_LABOUR_UNION_MEMBER_FLAG
AUTO_DFLT_VAL = 'N'
l_le_name = 'Vision Corporation'
l_asg_leg_name = PER_ASG_ORG_LEGAL_EMPLOYER_NAME
l_member_plan = 'Healthy HMO'
l_non_plan = 'Healthy HMO (NM)'
l_default_plan = 'NA'
l_default_option = 'Employee Only'
l_epe_created = 'N'
i=1
WHILE BEN_EPE_PL_NAME_TN.exists(i) LOOP
(
IF ( l_asg_leg_name = l_le_name
AND l_flag = 'Y'
AND BEN_EPE_PL_NAME_TN[i] = l_member_plan
AND BEN_EPE_OPT_NAME_TN[i] = l_default_option) THEN
(
l_epe_created = 'Y'
l_default_plan = l_member_plan
EXIT
)
ELSE IF ( l_asg_leg_name <> l_le_name
AND l_flag = 'N'
AND BEN_EPE_PL_NAME_TN[i] = l_non_plan
AND BEN_EPE_OPT_NAME_TN[i] = l_default_option) THEN
(
l_epe_created = 'Y'
l_default_plan = l_non_plan
EXIT
)
i = i+1
)
IF ( l_epe_created = 'Y' AND l_pln_name = l_default_plan AND l_opt_name = l_default_option) THEN
(
AUTO_DFLT_VAL = 'Y'
CARRY_FORWARD_ELIG_DPNT = 'CFWP'
)
return AUTO_DFLT_VAL, CARRY_FORWARD_ELIG_DPNT

Sample Formula 3:

Formula Type : Default Enrollment

Description: Derive the default option when a dependent is aging out.

INPUTS ARE NUM_ELIG_DPNT
DEFAULT FOR BEN_OPT_NAME IS 'x'
DEFAULT FOR BEN_PLN_NAME IS 'x'
/* Initialization section */
AUTO_DFLT_VAL = 'N'
CARRY_FORWARD_ELIG_DPNT = 'CWFP'
PREV_PRTT_ENRT_RSLT_ID='0'
l_actual_eff_date='1951/01/01 00:00:00' (date)
l_new_effective_date='1951/01/01 00:00:00' (date)
l_ee_opt_past='N'
l_sp_opt_past='N'
l_waive_opt_past='N'
l_fam_opt_past='N'
l_plan_name=BEN_PLN_NAME
l_opt_name=BEN_OPT_NAME
l_num_elig_dpnt=NUM_ELIG_DPNT
l_dflt_val='N'
l_cfwp='NA'
l_status=123
l_prev_prtt_enrt_rslt_id='123'
l_log='X'
l_log=ess_log_write('Entering R_DFLT_ENRT_DEV_RL')
l_actual_eff_date=GET_CONTEXT(EFFECTIVE_DATE,to_date('1951/01/01 00:00:00'))
l_new_effective_date=ADD_DAYS(l_actual_eff_date,-1)
CHANGE_CONTEXTS(EFFECTIVE_DATE=l_new_effective_date)
(
l_prev_prtt_enrt_rslt_id=ben_fn_get_char_value('BEN_PRTT_ENRT_RSLT','PRTT_ENRT_RSLT_ID',l_plan_name, 'NA')
l_ee_opt_past=ben_fn_get_char_value('BEN_PRTT_ENRT_RSLT','ENROLLED',l_plan_name, 'KA_MED_HDHP_EMP')
l_sp_opt_past=ben_fn_get_char_value('BEN_PRTT_ENRT_RSLT','ENROLLED',l_plan_name, 'KA_MED_HDHP_SP')
l_fam_opt_past=ben_fn_get_char_value('BEN_PRTT_ENRT_RSLT','ENROLLED',l_plan_name, 'KA_MED_HDHP_FAM')
l_waive_opt_past=ben_fn_get_char_value('BEN_PRTT_ENRT_RSLT','ENROLLED',l_plan_name, 'KA_MED_HCHP_WAIVE')
)/* end change contexts */
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL l_plan_name='||l_plan_name)
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL l_opt_name='||l_opt_name)
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL l_num_elig_dpnt='||to_char(l_num_elig_dpnt))
l_log=ess_log_write(' l_plan_name='||l_plan_name)
l_log=ess_log_write(' l_opt_name='||l_opt_name)
l_log=ess_log_write(' l_num_elig_dpnt='||to_char(l_num_elig_dpnt))
/* process further only if there is an enrollment in the plan in the previous life event */
if ( l_ee_opt_past = 'Y'
OR l_sp_opt_past = 'Y'
OR l_fam_opt_past = 'Y'
OR l_waive_opt_past = 'Y' ) then
(
if ( l_opt_name = 'KA_MED_HDHP_FAM') then
(
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL KA_MED_HDHP_FAM')
l_log=ess_log_write(' KA_MED_HDHP_FAM ')
/* family will be the default option if
1) the employee is enrolled in the family option in the previous life event and the num_elig_dpnt is greater than 2
*/
if ( l_fam_opt_past='Y' and l_num_elig_dpnt>=2 ) then
(
l_dflt_val = 'Y'
l_cfwp = 'CFWP'
)
)
else if (l_opt_name = 'KA_MED_HDHP_SP') then
(
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL KA_MED_HDHP_SP')
l_log=ess_log_write(' KA_MED_HDHP_SP ')
/* spouse will become the default option if
1) the employee is enrolled in spouse in the previous life event
2) the employee is enrolled into family in the previous life event but has only one num_elig_dpnt indicating a
depedent has aged out
*/
if ( (l_sp_opt_past = 'Y' and l_num_elig_dpnt=1)
OR ( l_fam_opt_past='Y' and l_num_elig_dpnt=1) ) then
(
l_dflt_val = 'Y'
l_cfwp = 'CFWP'
)
)
else if (l_opt_name = 'KA_MED_HDHP_EMP') then
(
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL KA_MED_HDHP_EMP')
l_log=ess_log_write(' KA_MED_HDHP_EMP ')
/* employee will become the default option if
1) the employee is enrolled in employee-option in the previous life event
2) the employee is enrolled in the spouse option in the previous life event and there is divorce event */
if (l_ee_opt_past='Y') then
(
l_dflt_val = 'Y'
l_cfwp = 'CFWP'
)
else if (l_sp_opt_past = 'Y' and l_num_elig_dpnt=0) then
(
/* the spouse looses eligbility for some reason then emp will be the default*/
l_dflt_val = 'Y'
l_cfwp = 'CFWP'
)
)
else if (l_opt_name = 'KA_MED_HCHP_WAIVE') then
(
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL KA_MED_HCHP_WAIVE')
l_log=ess_log_write(' KA_MED_HCHP_WAIVE ')
/* waive will become the default option if
1) the employee is enrolled in the waive option in the previous life event */
if ( l_waive_opt_past = 'Y') then
(
l_dflt_val = 'Y'
l_cfwp = 'CFWP'
)
)
) /* end if lee or l_sp or l_fam or l_waive*/
PREV_PRTT_ENRT_RSLT_ID=l_prev_prtt_enrt_rslt_id
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL AUTO_DFLT_VAL='||l_dflt_val)
l_status = add_rlog (-1 , -1 , 'R_DFLT_ENRT_DEV_RL CARRY_FORWARD_ELIG_DPNT='||l_cfwp)
l_log=ess_log_write(' AUTO_DFLT_VAL '||l_dflt_val)
l_log=ess_log_write(' CARRY_FORWARD_ELIG_DPNT '||l_cfwp)
l_log=ess_log_write(' PREV_PRTT_ENRT_RSLT_ID '||l_prev_prtt_enrt_rslt_id)
l_log=ess_log_write('Leaving R_DFLT_ENRT_DEV_RL ')
AUTO_DFLT_VAL=l_dflt_val
CARRY_FORWARD_ELIG_DPNT=l_cfwp
return AUTO_DFLT_VAL, CARRY_FORWARD_ELIG_DPNT, PREV_PRTT_ENRT_RSLT_ID