";
$delete_link="";
}*/
//$view_link="";
//}
//if($access_level=='W' || $access_level=='E' )
//{
//}
// if($access_level=='E' )
// {
// }
$edit_link ="";
$generate_barcode ="";
//
// $edit_link="";
// $edit_link="";
// $edit_link="";
// if($row_medical_examination['task']=='pme'){
// $form_name="PME Form";
// }else if($row_medical_examination['task']=='annual'){
// $form_name="Annual Medical Examination";
// }else if($row_medical_examination['task']=='pre_employment'){
// $form_name="PRE Employment Examination";
// }else if($row_medical_examination['task']=='semi_annual'){
// $form_name="Semi-Annual Examination";
// }
$recommended_tests = getFieldFromTable('recommended_tests_new', 'employee_appointment', 'appointment_id', $row_medical_examination['appointment_id']);
$medical_entry_date = date_format(date_create($row_medical_examination['checkup_date']), "d-M-Y h:i A");
$space = " ";
$links = $assign_link . $space . $view_link . $space . $edit_link . $space . $delete_link . $generate_barcode;
$past_present_illnes = getCommaSeperatedValuesForInClause('select param_name from history_parameter ', 'param_id', $row_medical_examination['past_present_illness']);
$checkupSections = getCommaSeperatedValuesForInClause("select section_name from checkup_form_section", "section_id", $row_medical_examination['checkup_section_ids']);
$data['rows'][] = array(
'id' => $row_medical_examination['checkup_id'],
'cell' => array(
$count++,
$links,
$medical_entry_date,
$row_medical_examination['ticket_no'],
$row_medical_examination['patient_name'],
$row_medical_examination['emp_code'],
$checkup_name,
$row_medical_examination['remarks'],
$checkupSections,
$recommended_tests,
$row_medical_examination['current_status'] == 'LAB' ? 'Yes' : 'no'
)
);
}
$data['rows'][] = array(
'id' => $row_medical_examination['filterkey'],
'cell' => array('', "", "", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
);
error_log("data: " . print_r($data, true));
echo json_encode($data);
?>