// include('pdf_header.php');
include('includes/config/config.php');
include('includes/functions.php');
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=excel_designationwise_emp_overweight_report.xls');
?>
=str_to_date('" . $start_date . "','%d-%m-%Y') ";
}
if (isset($start_date) && $start_date != '') {
$qry_date1 .= " and date(medical_entry_date) >=str_to_date('" . $start_date . "','%d-%m-%Y') ";
}
if (isset($end_date) && $end_date != '') {
$qry_date1 .= " and date(medical_entry_date) <=str_to_date('" . $end_date . "','%d-%m-%Y') ";
}
if (isset($month) && $month != '') {
$qry_date1 .= " and month(medical_entry_date) in (" . $month . ")";
}
?>
if (isset($year) && $year != '' && count($year1) > 1) {
for ($j = 0; $j < count($year1); $j++) {
$qry_date = "";
$qry_doj = "";
$qry_date .= " and year(medical_entry_date) ='" . $year1[$j] . "'";
$qry_doj .= " and year(doj) <= '".$year1[$j]."'";
?>
DESIGNATION WISE EMPLOYEE OVERWEIGHT REPORT For = $year1[$j] ?>
|
Run Date : User : |
Filters Applied-
Range: to ,
EMPLOYER/CONTRACTOR:,
Gender:,
OHC Location:,
Patient Category:,
designation:,
Designation:,
Employee Cadre:,
Month:,
Year:
|
Designation Names |
error_reporting(E_ERROR | E_PARSE);
$designation_query = "select designation_id, designation_name from designation $qry_filter1";
$result_designation = mysqli_query($conn, $designation_query);
while ($designation_row = mysqli_fetch_assoc($result_designation)) {
?>
= $designation_row['designation_name'] ?> |
Patient Name |
$id_query = "select max(medical_exam_id),bmi,patient_id,patient_name from medical_examination left join patient_master on patient_master.id = medical_examination.patient_id where patient_id in (SELECT id FROM `patient_master` where status='Active' and designation_id ='" . $designation_row['designation_id'] . "' $qry_filter $qry_doj ORDER by id asc) $qry_date1 $qry_date and bmi>=25 and bmi<30 GROUP BY patient_id ORDER BY patient_id asc";
$id_result = mysqli_query($conn, $id_query);
if (mysqli_num_rows($id_result)) {
while ($row_id = mysqli_fetch_assoc($id_result)) {
?>
= $row_id['patient_name'] ?> |
}
} else {
?>
No Result |
}
}
}
} else {
if (isset($year2) && $year2 != '') {
$qry_date1 .= " and year(medical_entry_date) ='" . $year2 . "'";
$qry_filter.= " and year(doj) <= '".$year2."'";
}
?>
DESIGNATION WISE EMPLOYEE OVERWEIGHT REPORT |
Run Date : User : |
Filters Applied-
Range: to ,
EMPLOYER/CONTRACTOR:,
Gender:,
OHC Location:,
Patient Category:,
designation:,
Designation:,
Employee Cadre:,
Month:,
Year:
|
DESIGNATION Names |
error_reporting(E_ERROR | E_PARSE);
$designation_query = "select designation_id, designation_name from designation $qry_filter1";
$result_designation = mysqli_query($conn, $designation_query);
while ($designation_row = mysqli_fetch_assoc($result_designation)) {
?>
= $designation_row['designation_name'] ?> |
Patient Name |
$id_query = "select max(medical_exam_id),bmi,patient_id,patient_name from medical_examination left join patient_master on patient_master.id = medical_examination.patient_id where patient_id in (SELECT id FROM `patient_master` where status='Active' and designation_id ='" . $designation_row['designation_id'] . "' $qry_filter ORDER by id asc) $qry_date1 $qry_date and bmi>=25 and bmi<30 GROUP BY patient_id ORDER BY patient_id asc";
$id_result = mysqli_query($conn, $id_query);
if (mysqli_num_rows($id_result)) {
while ($row_id = mysqli_fetch_assoc($id_result)) {
?>
= $row_id['patient_name'] ?> |
}
} else {
?>
No Result |
}
}
}
?>