Rate Value Calculation
This formula type can be used to calculate the rate for a benefits object.
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
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 Value | Data Type | Required | Description |
---|---|---|---|
L_RATE | Number | Y | Return rate value |
Errors
If any other output value is returned then the participation process errors with BEN_91329_FORMULA_RETURN.
Sample Formula 1:
FORMULA NAME: BEN_RT_CALC
FORMULA TYPE: Rate Value Calculation
DESCRIPTION: Rate amount is determined based on number of sons & daughters, and spouse.
default for l_sons is 0
default for l_spouse is 0
default for l_daughters is 0
l_rate = 0
l_sons = ben_fn_get_char_value(
' PER_CONTACT_RELSHIPS_F'
, 'SON_COUNT'
,NULL
,NULL
, 'LEGISLATION_CODE' ,'US'
)
l_daughters = ben_fn_get_char_value(
' PER_CONTACT_RELSHIPS_F'
, 'DAUGHTER_COUNT'
,NULL
,NULL
, 'LEGISLATION_CODE' ,'US'
)
l_spouse = ben_fn_get_char_value(
' PER_CONTACT_RELSHIPS_F'
, 'SPOUSE_COUNT'
,NULL
,NULL
, 'LEGISLATION_CODE' ,'US'
)
if ( l_spouse = 0 and l_sons= 0 and l_daughters = 0 ) then l_rate = 80 )
if (l_spouse = 1 and l_sons= 0 and l_daughters = 0) then (l_rate = 100 )
if (l_spouse = 1 and (l_sons> 0 or l_daughters > 0)) then ( l_rate = 150 )
return l_rate
Sample Formula 2:
FORMULA NAME: BEN_RT_CALC2
FORMULA TYPE: Rate Value Calculation
DESCRIPTION: Formula derives rate based on plan design.
Default for BEN_PLN_NAME is 'ABC'
Default for BEN_OPT_NAME is 'ABC'
l_pl_name = BEN_PLN_NAME
l_opt_name = BEN_OPT_NAME
l_rate = 0
if ( l_pl_name = 'Aetna PPO' and l_opt_name = 'Employee Only' ) then ( l_rate = 50 )
if ( l_pl_name = 'Aetna PPO' and l_opt_name = 'Employee + Family' ) then ( l_rate = 100 )
if ( l_pl_name = 'Be Healthy HMO' and l_opt_name = 'Employee + Family' ) then ( l_rate = 110 )
if ( l_pl_name = 'Be Healthy HMO' and l_opt_name = 'Employee Only' ) then
( l_rate = 60 )
Else
( l_rate = 90 )
return l_rate
Sample Formula 3:
FORMULA Type: Rate Value Calculation
Description: Calculate the rate based on the benefits balance.
DEFAULT_DATA_VALUE FOR BEN_PBB_BNFTS_BAL_NAME_TN IS 'XXX'
DEFAULT_DATA_VALUE FOR BEN_PBB_VAL_NN IS 0
Default for BEN_PBB_VAL is 0
l_BEN_PBB_VAL = 0
j=1
l_rate= 1062.32
WHILE (BEN_PBB_BNFTS_BAL_NAME_TN.EXISTS(j)) LOOP
(
IF (BEN_PBB_BNFTS_BAL_NAME_TN[j] = 'HEALTH_BAL') then
( l_BEN_PBB_VAL = BEN_PBB_VAL_NN[j] )
j=j+1
)
if (l_BEN_PBB_VAL = 2)
THEN
(
l_rate = l_rate + 25
)
return l_rate