CheckForEnrollmentHistory

Check For Enrollment History

Minor Business Rule

Object Name: N0800035

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

Purpose

The purpose of this NER is to determine if an employee has history for a given DBA within a given 

Plan Id. 


Setup Notes and Prerequisites

Mode should be set equal to '1' to get history only, and '2' to get history and Date DBA Worked.


Special Logic


Technical Specifications


//Initialize Work Fields 

cHistoryFlag = "N"

HistoryFound = "0"

ErrorFlag = "0"

ValidOptions = "0"

ZeroDate = "00/00/0000"

-------------------------------------------------------------

Get Plan DBAs from F08320

If File IO Status is equal to ERROR

Set error flag = '1'

End If

-------------------------------------------------------------

//Determine if Plan Options Exist 

If Plan Additional Option is not equal to  

Get option rules and DBAs from F083202

If File_IO_Status is equal to ERROR                          

Set error flag = '1'

Else

Set ValidOptions flag = "1"

End If

End If

-------------------------------------------------------------

//Initialize DBA End Date - If no DBA End Date is sent then use Enrollment End Date


//(Note) If History exists beyond this date then the End Date will be advanced and returned to the 

calling application.


If BF jdDateDbaEnds is not equal to ZeroDate

DBAWorkedDate = BF jdDateDbaEnds

Else

DBAWorkedDate = BF jdDateEndingEffective

End If

-------------------------------------------------------------

//Employee Share: Test Plan DBA or Option DBA


//If no errors have been detected then check if payroll history exists  

If ErrorFlag is equal to "0"

If ValidOptions flag is equal to  Or ValidOptions is equal to "1" And EmployeeDbaIdOption from 

F083202 is less than or equal to  


//Call using EmployeeDbaId from F08320

Call 'Read DBA HIstory' 

Pass in AN8, EmployeeDbaId from F08320, BF DBA Begin Date, BF DBA Ends, and BF Mode. Get Back BF 

History Flag, and Date DBA Worked.


End If


//If only history check requested, exit

  

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

  

If HistoryFound is not equal to "1"

If ValidOptions flag is equal to "1" And EmployeeDbaIdOption from f083202 is greater than  



//Call using EmployeeDbaIdOption from F083202

Call 'Read DBA HIstory' Pass in AN8, EmployeeDbaIdOption from F083202, BF DBA Begin Date, BF DBA 

Ends, and BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If


// If only history check requested, exit

  

If BF HistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

End If

------------------------------------------------------------------------------

// Employer Share:

  

If HistoryFound is not equal to "1"

If ValidOptions flag is equal to  Or ValidOptions flag is equal to "1" And 

DbaEmployerIdOption from F083202 is less than or equal to  


//Call using EmployerDbaId from F08320

Call 'Read DBA HIstory' Pass in AN8, EmployerDbaId from F08320, BF DBA Begin Date, BF DBA Ends, and 

BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If


// If only history check requested, exit

  

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If


If HistoryFound is not equal to "1"

If ValidOptions is equal to "1" And DbaEmployerIdOption is greater than  


//Call using EmployerDbaIdOption from F083202

Call 'Read DBA HIstory' Pass in AN8, DbaEmployerIdOption from F083202, BF DBA Begin Date, BF DBA 

Ends, and BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If

 

// If only history check requested, exit

 

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

End If

End If

------------------------------------------------------------------------------

  

// Employee Points: 

  

If HistoryFound is not equal to "1"

If ValidOptions is equal to  Or ValidOptions is equal to "1" And PayrollDedPointsOption is less 

than or equal to  


//Call using PayrollDedPoints from F08320

Call 'Read DBA HIstory' Pass in AN8, PayrollDedPoints from F08320, BF DBA Begin Date, BF DBA Ends, 

and BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If

  

// If only history check requested, exit

  

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

  

If HistoryFound is not equal to "1"

If ValidOptions is equal to "1" And PayrollDedPointsOption is greater than  


//Call using PayrollDedPointsOption from F083202

Call 'Read DBA HIstory' Pass in AN8, PayrollDedPointsOption from F083202, BF DBA Begin Date, BF DBA 

Ends, and BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If


// If only history check requested, exit

 

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

End If

End If

------------------------------------------------------------------------------

  

// Employer Points: 

  

If HistoryFound is not equal to "1"

If ValidOptions is equal to  Or ValidOptions is equal to "1" And PayrollCreditPointsOption is 

less than or equal to  


//Call using PayrollCreditPoints from F08320

Call 'Read DBA HIstory' Pass in AN8, PayrollCreditPoints from F08320, BF DBA Begin Date, BF DBA Ends, 

and BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If

  

// If only history check requested, exit

  

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

 

If HistoryFound is not equal to "1"

If ValidOptions is equal to "1" And PayrollCreditPointsOption is greater than  

//Call using PayrollCreditPointsOption from F083202

Call 'Read DBA HIstory' Pass in AN8, PayrollCreditPointsOption from F083202, BF DBA Begin Date, BF 

DBA Ends, and BF Mode. Get Back BF History Flag, and Date DBA Worked.


End If


// If only history check requested, exit

 

If BF cHistoryFlag is equal to "Y"And BF cMode is equal to "1"

HistoryFound = "1"

End If

End If

End If

------------------------------------------------------------------------------

 

// Determine if spending history exists

  

If DeductPointsDolsYN from F08320 is equal to 1,2,4, or 5And BF cHistoryFlag is not equal to "Y"


// Get Flexible Spending Account Information

 

RsaYear = date_year([BF jdDateDbaBegins])

Fetch from F08370 using RsaYear, AN8, and Plan ID

If File_IO_Status is equal to CO SUCCESS                        


If F08370 ClaimsToPay is not equal to   Or F08370 FSACorbraAdditions is not equal to  Or 

F08370 ClaimsPaid is not equal to  Or F08370 PendingAmount is not equal to  Or F08370 

ClaimsRejected is not  or F08370 Amountrequested is not equal to  Or F08370 FlexAcctAdditions 

is not  or F08370 PayrollDeductions is not equal to 

 

BF cHistoryFlag = "Y"


End If

End If

  

// Determine if detail record exists

  

If BF cHistoryFlag is not equal to "Y"

Select from F08371 using RsaYear, AN8, and Plan ID

If File_IO_Status is equal to CO SUCCESS                        

F08371.Fetch Next

If File_IO_Status is equal to CO SUCCESS                        

BF cHistoryFlag = "Y"

End If

End If

End If

End If

------------------------------------------------------------------------------

  

// Return End Effective Date: 

  

If BF cMode is equal to "2"

BF jdDateDbaEnds = Date DBA Worked from 'Read DBA History'

End If

End If


Data Structure

D0800035 - Check For Enrollment History

Parameter NameData ItemData TypeReq/OptI/O/Both
mnEmployeeAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szPlanIdPLANcharNONENONE

An abbreviation or number that identifies a specific employee benefit. Examples are:   o  Employee Health Insurance   o  Accidental Death 
and Dismemberment   o  Health Club Expense Reimbursement   o  Employee Stock Appreciation Rights  A benefit plan typically is associated 
with a deduction, benefit, or accrual. For example, a medical plan is a benefit that might also require a deduction to withhold premiums from 
an employee's pay.

szPlanAdditionalOptionAOPTcharNONENONE

A code that identifies any additional options available for a benefit plan that have been defined in the Plan Additional Options table 
(F083202). Note: Additional options must have the same provider, policy number, and enrollment and eligibility rules as the benefit plan to which they 
are associated.

jdDateEndingEffectiveEFTEJDEDATENONENONE

The date on which the item, transaction, or table becomes inactive, or through which you want transactions to appear. This field is used 
generically throughout the system. It could be a lease effective date, a price or cost effective date, a currency effective date, a tax rate effective 
date, or whatever is appropriate.

jdDateDbaBeginsDTDBJDEDATENONENONE

The beginning date on the employee's DBA instruction record (F06106) for this enrollment. In most cases, this is the same as the beginning 
effective date of the enrollment. However, it can be later than the beginning effective date if the enrollment is changed retroactively. Only 
active enrollment records have a value in this field since they are the only enrollment records that result in payroll deductions, benefits, or 
accruals. Active records have a beginning status that starts with A.

cModeEV01charNONENONE

Special Input Expected
1 = Get History Only

2 = Get History and Date DBA Worked


^

cHistoryFlagEV01charNONENONE

Special Output Returned
N = History Not Found

Y = History Found


^

jdDateDbaEndsDTDEJDEDATENONENONE

The ending date on the employee's DBA instruction record (F06106) for this enrollment. In most cases, this is the same as the ending 
effective date of the enrollment. However, it can be later than the ending effective date if the enrollment is changed retroactively. Only active 
enrollment records have a value in this field since they are the only enrollment records that result in payroll deductions, benefits, or accruals. Active 
records have a beginning status that starts with A.

Related Functions

None

Related Tables

None
ReadDBAHistory

ReadDBAHistory

Check For Enrollment History

Minor Business Rule

Object Name: N0800035

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

Purpose
The purpose of this NER is to get Employee history information from F0719 for the OneWorld history 
file or F0619 for the world history file.


Setup Notes and Prerequisites


Special Logic

Technical Specifications

//Initialize Variables
FetchSuccess = "1"

ZeroDate = "00/00/0000"


// Retrieve Benifit/Accrual History 

  

Get Environment Value

//If cModuleExistsFlag_MEOW is equal to "1" Use One World //History File F0719 otherwise use world 

file F0619

If cModuleExistsFlag_MEOW is equal to "1" 

Select from F0719 Using BF AN8 and BF PDBA

While FetchSuccess = '1'

Get Date Worked from F0719

If File_IO_Status is equal to CO SUCCESS                        

// Save last worked date  


If Date Worked from F0719 is greater than BF jdDateDbaWorked

BF jdDateDbaWorked = Date Worked from F0719

End If


// Set History Flag if date worked is within DBA Dates 

 

If Date Worked from F0719 is greater than or equal to BF jdDateDbaBegins And Date Worked from F0719 

is less than or equal to BF jdDateDbaEnds Or DateWorked from F0719 is greater than or equal to BF 

jdDateDbaBegins And BF jdDateDbaEnds is equal to ZeroDate

Set BF cHistory = "Y"


If BF cMode is equal to "1"

//Get out of while loop

FetchSuccess = "0"

End If


End If

Else

//Get out of while loop

FetchSuccess = "0"

End If

End While

Else


// Use World History file

Select from F0619 using AN8 and PDBA

While FetchSuccess is equal to "1"

Get Date Worked from F0619

If File_IO_Status is equal to CO SUCCESS                         

// Save last worked date  


If Date Worked from F0619 is greater than BF jdDateDbaWorked

BF jdDateDbaWorked = Date Worked from F0619 

End If


// Set History Flag if date worked is within DBA Dates 

 

If  Date Worked  from F0619 is greater than or equal to BF jdDateDbaBeginsAnd Date Worked from 

F0619 is less than or equal to BF jdDateDbaEnds Or Date Worked from F0619 is greater than or equal to BF 

jdDateDbaBegins And BF jdDateDbaEnds is equal to VA evt_ZeroDate

BF cHistory = "Y"


If BF cMode is equal to "1"

//Get out of while loop

VA evt_FetchSuccess = "0"

End If


End If

Else

//Get out of while loop

VA evt_FetchSuccess = "0"

End If

End While

End If


^

Data Structure

D0800035A - Read DBA History

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnPayDeductBenAccTypePDBAMATH_NUMERICNONENONE

A code that defines the type of pay, deduction, benefit, or accrual. Pay types are numbered from 1 to 999. Deductions and benefits are 
numbered from 1000 to 9999.

jdDateDbaBeginsDTDBJDEDATENONENONE

The beginning date on the employee's DBA instruction record (F06106) for this enrollment. In most cases, this is the same as the beginning 
effective date of the enrollment. However, it can be later than the beginning effective date if the enrollment is changed retroactively. Only 
active enrollment records have a value in this field since they are the only enrollment records that result in payroll deductions, benefits, or 
accruals. Active records have a beginning status that starts with A.

jdDateDbaWorkedDTDBJDEDATENONENONE

The beginning date on the employee's DBA instruction record (F06106) for this enrollment. In most cases, this is the same as the beginning 
effective date of the enrollment. However, it can be later than the beginning effective date if the enrollment is changed retroactively. Only 
active enrollment records have a value in this field since they are the only enrollment records that result in payroll deductions, benefits, or 
accruals. Active records have a beginning status that starts with A.

jdDateDbaEndsDTDEJDEDATENONENONE

The ending date on the employee's DBA instruction record (F06106) for this enrollment. In most cases, this is the same as the ending 
effective date of the enrollment. However, it can be later than the ending effective date if the enrollment is changed retroactively. Only active 
enrollment records have a value in this field since they are the only enrollment records that result in payroll deductions, benefits, or accruals. Active 
records have a beginning status that starts with A.

cModeEV01charNONENONE

Special Input Expected
1 = Get History Only

2 = Get History and Date DBA Worked


^

cHistoryEV01charNONENONE

Special Output Returned
N = History Not Found

Y = History Found


^

Related Functions

None

Related Tables

None