Post Election Edit

This formula type can be used to enforce rules while making enrollments. Example: Enroll in basic life plan when you enroll in spousal or child life plans.

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
  • LER_ID
Note: OPT_ID is not available if the edit rule is attached at plan or plan type level, and no options exists for corresponding compensation object.

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 not available to formulas of this type.

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
SUCCESSFUL Char Y Y or N
ERROR_MESSAGE Char Y Error message to be displayed

Errors

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

Sample Formula 1:

FORMULA NAME: BEN_POST_ELEC_EDIT

FORMULA TYPE: Post Election

DESCRIPTION: When a person makes an election to Spousal supplemental, validate the person is also enrolled in plan Basic Life. This formula relies upon benefits seeded formula function - ben_fn_get_char_value.

default for l_enrld is 'Y'
default for l_dpnt_enrld1 is 'Y'
default for l_dpnt_enrld2 is 'Y'
SUCCESSFUL = 'Y'
ERROR_MESSAGE=' '
l_enrld = ben_fn_get_char_value(
'BEN_PRTT_ENRT_RSLT'
,'ENROLLED'
,'Spousal Supplemental'
,'NA'
)
l_dpnt_enrld1 = ben_fn_get_char_value(
'BEN_PRTT_ENRT_RSLT'
,'ENROLLED'
,'Basic_Life'
,'Lifex1'
)
l_dpnt_enrld2 = ben_fn_get_char_value(
'BEN_PRTT_ENRT_RSLT'
,'ENROLLED'
,'Basic_Life'
,'Lifex2'
)
If ( l_enrld = 'Y' and l_dpnt_enrld1='N' and l_dpnt_enrld2='N' ) then (SUCCESSFUL='N'
ERROR_MESSAGE = 'Election to any option within plan Spousal Supplemental, you should also enroll in plan Basic_Life.')
return SUCCESSFUL,ERROR_MESSAGE

Sample Formula 2:

FORMULA NAME: POSTELECTIONEDIT_GREEN_COMPANY

FORMULA TYPE: Postelection Edit using db array items

DESCRIPTION : When a person makes an election to plan name PPO (Out of Area), validate the person is also enrolled in plan Aetna PPO . If yes, return ‘Y’ to the post enrollment save edit. If not, return ‘N’ (error condition).

DEFAULT_DATA_VALUE for BEN_PEN_PL_NAME_TN is 'My-Default'
default for l_enrolled is 'N'
default for l_dpnt_enrolled is 'N'
default for i is 1
default for SUCCESSFUL is 'Y'
default for ERROR_MESSAGE is ' '
/*---------------------------------*/
SUCCESSFUL='Y'
ERROR_MESSAGE=' '
i=1
l_enrolled='N'
l_dpnt_enrolled='N'
while BEN_PEN_PL_NAME_TN.exists(i) loop
(
if BEN_PEN_PL_NAME_TN[i]='PPO (Out of Area)' then (l_enrolled='Y')
if BEN_PEN_PL_NAME_TN[i]='Aetna PPO' then
(l_dpnt_enrolled='Y')
i=i+1
)
if l_enrolled='Y' and l_dpnt_enrolled='N' then
(SUCCESSFUL='N'
ERROR_MESSAGE='Election to PPO (Out of Area) requires enrt in Aetna PPO.'
)
return SUCCESSFUL,ERROR_MESSAGE

Sample Formula 3:

FORMULA TYPE: Postelection Edit

Description: Ensure that a person gets enrolled either as participant or as a dependent when spouse/domestic partners work in the same organization.

DEFAULT_DATA_VALUE FOR PER_PER_CONT_REL_CONTACT_TYPE IS 'NA'
DEFAULT_DATA_VALUE FOR PER_PER_CONT_REL_CONTACT_PERSON_ID IS -99
DEFAULT_DATA_VALUE FOR BEN_EXT_RSLT_PL_NAME IS 'NA'
l_couple_flag = 'N'
l_sp_dp_id = 0
SUCCESSFUL = 'Y'
ERROR_MESSAGE = ' '
i =1
WHILE (PER_PER_CONT_REL_CONTACT_TYPE.EXISTS(i))
LOOP
(
IF ((PER_PER_CONT_REL_CONTACT_TYPE[i] = 'S') OR (PER_PER_CONT_REL_CONTACT_TYPE[i] = 'DP')) THEN
(
l_sp_dp_id = PER_PER_CONT_REL_CONTACT_PERSON_ID[i]
)
i = i + 1
)
i = 1
CHANGE_CONTEXTS(PERSON_ID = l_sp_dp_id)
(
WHILE(BEN_EXT_RSLT_PL_NAME.EXISTS(i))
LOOP
(
IF ( BEN_EXT_RSLT_PL_NAME[i] = 'Dependent Life Insurance - Spouse/DP' )
THEN
( l_couple_flag = 'Y'
)
/* the dependent has enrolled the participant */
i = i + 1
)
)
IF (l_couple_flag = 'Y')
THEN
(
SUCCESSFUL = 'N'
ERROR_MESSAGE = 'You cannot enroll in Life Insurance as you are already covered in Dependent Life Insurance - Spouse/DP under your spouse'
)
RETURN SUCCESSFUL, ERROR_MESSAGE

Sample Formula 4:

FORMULA TYPE: Postelection Edit

DEFAULT_DATA_VALUE for BEN_PEN_PL_NAME_TN is 'My-Default'
DEFAULT_DATA_VALUE for BEN_PEN_OPT_NAME_TN is 'My-Default'
DEFAULT FOR BEN_PIL_LF_EVT_OCRD_DT is '1950/01/01 00:00:00'(date)
DEFAULT FOR BEN_LER_NAME is 'abc'
SUCCESSFUL='N'
ERROR_MESSAGE=' '
i=1
l_plan1_enrld='N'
l_plan2_enrld='N'
l_new_effective_date = GET_CONTEXT(EFFECTIVE_DATE,to_date('1951/01/0100:00:00') )
l_person_id = GET_CONTEXT(PERSON_ID,0 )
l_last_day = '1950/01/01 00:00:00'(date)
l_ler_name = BEN_LER_NAME
l_lf_evt_ocrd_dt = BEN_PIL_LF_EVT_OCRD_DT
l_new_effective_date = l_lf_evt_ocrd_dt
l_log_data = ESS_LOG_WRITE( 'Effective Date = '||to_char(l_new_effective_date))
ERROR_MESSAGE = to_text(l_new_effective_date)||' : '
CHANGE_CONTEXTS(EFFECTIVE_DATE = l_new_effective_date)
(
while BEN_PEN_PL_NAME_TN.exists(i) loop
(
if (BEN_PEN_PL_NAME_TN[i] = 'Voluntary Child Life' ) then
(
l_plan1_enrld= 'Y'
ERROR_MESSAGE = 'Vol Life : '
l_log_data = ESS_LOG_WRITE('Employee has elected Voluntary Spouse Life')
)
if (BEN_PEN_PL_NAME_TN[i] = 'Supplemental Employee Life') then
(
l_plan2_enrld= 'Y'
ERROR_MESSAGE = ERROR_MESSAGE||'Supp Life : '
l_log_data = ESS_LOG_WRITE('Employee has elected Supplemental Employee Life')
)
i=i+1
)
)
IF (l_plan1_enrld = 'Y') THEN
(
l_log_data = ESS_LOG_WRITE('Employee has elected Voluntary Child Life')
IF (l_plan2_enrld= 'Y') THEN
(
l_log_data = ESS_LOG_WRITE('Employee has elected Supplemental Employee Life')
SUCCESSFUL='Y'
return SUCCESSFUL,ERROR_MESSAGE
)
ELSE
(
l_log_data = ESS_LOG_WRITE('Employee has NOT elected Supplemental Employee Life')
SUCCESSFUL='N'
ERROR_MESSAGE = ERROR_MESSAGE||'You cannot elected Voluntary Child Life without electing Supplemental Employee Life as well '
return SUCCESSFUL,ERROR_MESSAGE
)
)
ELSE
(
SUCCESSFUL='Y'
return SUCCESSFUL,ERROR_MESSAGE
)

Sample Formula 5:

Problem statement: Customer is loading participant enrollments using HDL. They have a post-election edit formula which forces workers to enroll dependents in order to submit elections. When loading participant enrollments using HDL, this formula is getting triggered and the enrollments are not getting loaded.

While conversion load is being performed, you can remove the formula from plan design, perform the load for participant and dependents and then add it back.

Other option is to use below formula functions -

  • BEN_GET_PROCESS_NAME_SS() is provided for Spreadsheet loader
  • BEN_GET_PROCESS_NAME() is provided for HDL Enrollment

When using participant HDL, you can use code like below to skip these validations while loading enrollments -

optext= BEN_GET_PROCESS_NAME() if ( optext != ‘PARTICIPANT_ENROLLMENT’) then ( 'your checks go here' )

For other 2 HDL loaders, the values you can use are -

  • Dependent Enrollment using HDL - 'DEPENDENT_DESIGNATION'
  • Beneficiary Enrollment using HDL - 'BENEFICIARY_DESIGNATION'

FORMULA TYPE: Postelection Edit

Description: Private Health plan requires designation of at least one dependent.

DEFAULT_DATA_VALUE for BEN_PEN_PL_NAME_TN is 'My-Default'
DEFAULT_DATA_VALUE for BEN_PEN_OPT_NAME_TN is 'My-Default'
DEFAULT_DATA_VALUE for BEN_EXT_DPNT_PL_NAME IS 'XYZ'
DEFAULT_DATA_VALUE for BEN_EXT_BNF_OPT_NAME IS 'ABC'
DEFAULT FOR BEN_PIL_LF_EVT_OCRD_DT IS '1950/01/01 12:00:00' (date)
SUCCESSFUL='Y'
ERROR_MESSAGE=' '
i=1
j=1
l_family = 'N'
l_count = 1
l_lf_evt_ocrd_dt = BEN_PIL_LF_EVT_OCRD_DT
l_phase = BEN_GET_PROCESS_NAME()
/* skip the rule when loading participant enrollments through HDL */
if (l_phase != 'PARTICIPANT_ENROLLMENT')
then
(
CHANGE_CONTEXTS(EFFECTIVE_DATE = l_lf_evt_ocrd_dt)
(
while BEN_PEN_PL_NAME_TN.exists(i) loop
(
if BEN_PEN_PL_NAME_TN[i] like 'Private Health%' then
(
if BEN_PEN_OPT_NAME_TN[i] like 'Couple%' then
(
l_family = 'Y'
EXIT
)
)
i=i+1
) /* end while */
IF l_family = 'Y' THEN
(
j=1
while BEN_EXT_DPNT_PL_NAME.exists(j)
loop
(
if ( BEN_EXT_DPNT_PL_NAME[i] like 'Private Health%' and BEN_EXT_BNF_OPT_NAME[i] like 'Couple%' )
then
(
l_plan =BEN_EXT_DPNT_PL_NAME[i]
l_option=BEN_EXT_BNF_OPT_NAME[i]
l_count = l_count + 1
exit
)
j=j+1
) /* end loop for checking for dependents */
) /* if l_famlily */
) /* end change contexts */
IF l_family = 'Y' and l_count=1 THEN
(
SUCCESSFUL = 'N'
ERROR_MESSAGE='Designate at least one dependent in your Healthcare plans' ||to_char(i)
)
) /* end l_phase */
RETURN SUCCESSFUL, ERROR_MESSAGE