/* Check to make sure we are connected to the database before allowing access to the home page. If not connected, go connect and initialize; otherwise, welcome the user.\ */ if(!database.connected()) redirect("init.htm"); Other Coverages
namecursor = database.cursor("select name from employee where ssn = " + client.ssn + "", true); namecursor.next();
Current Enrollee:write(namecursor.name);


Additional employee information is requested in this form, such as primary coverage information. Furthermore, secondary coverage and previous coverage sections are available for completion - in the event that either one of them applies to you. primary_cursor = database.cursor("select * from primary_coverage where employee_ssn = " + client.ssn + "", true); secondary_cursor = database.cursor("select * from secondary_coverage where employee_ssn = " + client.ssn + "", true); previous_cursor = database.cursor("select * from previous_coverage where employee_ssn = " + client.ssn + "", true); primary_cursor.next(); secondary_cursor.next(); previous_cursor.next(); if (primary_cursor.employee_ssn != 0 && primary_cursor.medicare_elig != null) { client.primary_action = "update"; } else { client.primary_action = "insert"; } if (secondary_cursor.employee_ssn != 0) { client.secondary_action = "update"; } else { client.secondary_action = "insert"; } if (previous_cursor.employee_ssn != 0) { client.previous_action = "update"; } else { client.previous_action = "insert"; }
} else { No } } else { } } else { } } else { } } else { } } else { } } else { } } else { } } else { No } } else { } } else { Retired } } else { } } else { No } } else { } } else { }
PRIMARY COVERAGE INFORMATION
Are you eligible for Medicare? if (primary_cursor.medicare_elig == "yes") { Yes } else { Yes }
if (primary_cursor.medicare_elig == "no") { No
Medicare Number: if (primary_cursor.medicare_no == null) {
Medicaid Number: if (primary_cursor.medicaid_no == null) {
SECONDARY COVERAGE INFORMATION
Name of Other Carrier or Plan, if Applicable: if (secondary_cursor.plan_name == null) {
Effective Date: if (secondary_cursor.effective_date == null) {
Participant Name(s): if (secondary_cursor.participant_name == null) {
Policy Number: if (secondary_cursor.policy_no == null) {
Group Number: if (secondary_cursor.group_no == null) {
PREVIOUS COVERAGE
Have you or a family member previously been covered by the plan you selected? if (previous_cursor.prev_cov_thisplan == "yes") { Yes } else { Yes }
if (previous_cursor.prev_cov_thisplan == "no") { No
If Yes, Name of Family Member(s): if (previous_cursor.names == null) {
Employment Status: if (previous_cursor.employment_status == "act") { Active } else { Active }
if (previous_cursor.employment_status == "ret") { Retired
Full Time Employment or Return to Work Date: if (previous_cursor.effective_date1 == null) {
Were you covered under your employer's prior group insurance plan? if (previous_cursor.prev_cov_withco == "yes") { Yes } else { Yes }
if (previous_cursor.prev_cov_withco == "no") { No
If Yes, Name of Carrier or Plan: if (previous_cursor.prior_carrier == null) {
Effective Date: if (previous_cursor.effective_date2 == null) {

Return to Main Menu