Functional Description
Purpose
The purpose of this Named ER is to determine the auto stop date and auto end status when ending a 
current enrollment.
Setup Notes and Prerequisites
Special Logic
Technical Specification
// In World, the auto stop date and status is the date prior to the video effective date and the 
status specified in the PO.  However in OW, we have enhanced the derivation of the auto stop date and 
status to first look at the enrollment parameters.
 The hierarchy logic for searching for an enrollment parameter record is the same as World.  If an 
enrollment parameter record is located, the Named ER will use the record only, if there is no 
eligibility code of 'I' or 'C' , but a termination date code and termination end status code defined for the 
enrollment parameter record.  The Named ER determines the end date from the termination date code, which 
will become  the end date of the enrollment.  The enrollment record will be ended with a status of the 
termination end status code.
If no enrollment parameter record is found, or the enrollment parameter record found has eligibility 
of 'C' or 'I', then the current enrollment will be ended in similar fashion as the World, i.e. The end 
date is day before the video effective date and the end status is the end status from the processing 
option//
Call Named ER "Retrieve Enrollment Parameters" (N0800036), passing input parameters:  Plan Id, 
Employee Benefit Status, Enrollment Status, Valid Plan Flag of 'Y'.  Returning parameters: Eligibility Check 
Code, Termination End Status Code, Termination Date Code and a flag to indicate whether an enrollment 
record is found.
If found enrollment parameter and Eligibility code = Blank and Termination Date Code <> Blank Call 
Named ER, "Determine Date by Date Code" (N0800039), passing in the termination Date code, the video 
effective date, address no, and returning back the derived end Date.  If the derived end date is zero, 
then default the derived end date to the day before the video effective date
Otherwise, Default the derived end date to the day before the video effective date.
If the enrollment date > derived end date SzErrorCode = '2337
If the enrollment date <= derived end date and If the 1st char of enrollment status is 'A' Call Named 
ER "Check for Enrollment History" (N0800035), passing in address no, plan Id, plan option, derived 
end date, and mode of '2', and returning a history flag and Last history date.
If history flag = 'Y' jdDateDbaEnds = last history date
If history flag is not equal to JdDateDbaEnds = derived end date
If history flag <> 'Y' JdDateDbaEnds = derived end date
If termination end status code <> Blank SzEnrollmentEndStatus =  termination end status code
If termination end status code = Blank SzEnrollmentEndStatus = szDefaultEndStatus
If szEnrollmentEndStatus <> Blank Call Named ER, "Get UDC Description"
If szEnrollmentEndStatus = Blank or the UDC error Flag = '1' then SzErrorCode = '2341' and 
SzEnrollmentEndStatus = ' '.  Otherwise, JdEnrollmentEndDate = derived end date
DN0800042 - Stop Enrollment
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| mnAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE | 
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
  | ||||
| jdDateEffectiveRates | EFT | JDEDATE | NONE | NONE | 
The date that identifies when a date is first valid. The effective date is used generically. It can be a lease effective date, a price or cost 
  | ||||
| szPlanId | PLAN | char | NONE | NONE | 
An abbreviation or number that identifies a specific employee benefit. Examples are:
  o  Employee Health Insurance
  o  Accidental Death 
  | ||||
| szPlanAdditionalOption | AOPT | char | NONE | NONE | 
A code that identifies any additional options available for a benefit plan that have been defined in the Plan Additional Options table 
  | ||||
| cEmployeeBenefitStatus | E010 | char | NONE | NONE | 
A code to specify an employee's eligibility for or participation in various user defined plans or programs. For example, these codes can be 
  | ||||
| szEnrollmentStatus | XDFS | char | NONE | NONE | 
A code that indicates the status of an employee's enrollment in a plan. It is a user defined code (08/ES), and you must use the following 
  | ||||
| szDefaultEnrollEndStatus | XEST | char | NONE | NONE | 
A code that indicates the ending status of an employee's enrollment in a plan. This status represents the reason for ending the old 
  | ||||
| jdEnrollmentEndDate | EFTE | JDEDATE | NONE | NONE | 
The date on which the item, transaction, or table becomes inactive, or through which you want transactions to appear. This field is used 
  | ||||
| szEnrollmentEndStatus | XEST | char | NONE | NONE | 
A code that indicates the ending status of an employee's enrollment in a plan. This status represents the reason for ending the old 
  | ||||
| jdDateDbaEnds | DTDE | JDEDATE | NONE | NONE | 
The ending date on the employee's DBA instruction record (F06106) for this enrollment. In most cases, this is the same as the ending 
  | ||||
| szErrorCode | VC04A | char | NONE | NONE | 
This is a generic field used as a work field in Everest.  | ||||
| jdEnrollmentDate | EFT | JDEDATE | NONE | NONE | 
The date that identifies when a date is first valid. The effective date is used generically. It can be a lease effective date, a price or cost 
  | ||||
| None | 
| None |