Age Calculation

This formula type can be used to determine age to be used for eligibility, coverage or benefit, and rate calculations.

Contexts

The following contexts are available to formulas of this type:

  • BUSINESS_GROUP_ID ( ENTERPRISE_ID)
  • EFFECTIVE_DATE
  • HR_ASSIGNMENT_ID
  • ORGANIZATION_ID
  • JURISDICTION_CODE
  • PGM_ID
  • PL_ID
  • PL_TYP_ID
  • OPT_ID
  • LER_ID
  • PERSON_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_pl_typ_f, ben_opt_f
  • Database items based on person’s assignment – HR_ASSIGNMENT_ID

Input Variables

Input Data Type Required Description
PERSON_ID NUMBER Person id is passed as input value

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_OUTPUT NUMBER Y Returns Age

Errors

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

The formula BEN_AGE_CALC returned an invalid value.

Sample Formula 1:

FORMULA NAME: BEN_AGE_CALC

FORMULA TYPE: Age Calculation

DESCRIPTION: The formula returns the age of the person as of END OF YEAR.

DEFAULT for PER_PER_DATE_OF_BIRTH is '2013/01/01 12:00:00' (date)
l_output = 0
l_date = '2011/01/01 12:00:00'
l_start_date = PER_PER_DATE_OF_BIRTH
l_effective_date = to_date('2013/01/01 12:00:00')
l_age = months_between(l_effective_date, l_start_date)
l_output = l_age/12
l_output = floor(l_output)
if l_output < 30 then
l_date = '2012/01/01 12:00:00'
else
l_date = '2013/01/01 12:00:00'
return l_date