// 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_deptwise_emp_audiometry_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] . "'";
?>
DEPARTMENT WISE EMPLOYEE AUDIOMETRY REPORT For = $year1[$j] ?>
|
Run Date : User : |
Filters Applied-
Range: to ,
EMPLOYER/CONTRACTOR:,
Gender:,
OHC Location:,
Patient Category:,
Department:,
Designation:,
Employee Cadre:,
Month:,
Year:
|
Department Names |
error_reporting(E_ERROR | E_PARSE);
$dept_query = "select dept_id, dept_name from department $qry_filter1";
$result_dept = mysqli_query($conn, $dept_query);
while ($dept_row = mysqli_fetch_assoc($result_dept)) {
?>
= $dept_row['dept_name'] ?> |
Patient Name |
$id_query = "select max(m.medical_exam_id),m.hbd,p.patient_name from medical_examination m left join patient_master p on p.id = m.patient_id where m.patient_id in (SELECT id FROM `patient_master` where status='Active' and dept_id ='" . $dept_row['dept_id'] . "' $qry_filter $qry_doj ORDER by id asc) $qry_date1 $qry_date and m.audio_findings NOT LIKE 'WNL%' GROUP BY m.patient_id ORDER BY m.patient_id asc";
$id_result = mysqli_query($conn, $id_query);
error_log("query:".$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 . "'";
}
?>
DEPARTMENT WISE EMPLOYEE AUDIOMETRY REPORT |
Run Date : User : |
Filters Applied-
Range: to ,
EMPLOYER/CONTRACTOR:,
Gender:,
OHC Location:,
Patient Category:,
Department:,
Designation:,
Employee Cadre:,
Month:,
Year:
|
Department Names |
error_reporting(E_ERROR | E_PARSE);
$dept_query = "select dept_id, dept_name from department $qry_filter1";
$result_dept = mysqli_query($conn, $dept_query);
while ($dept_row = mysqli_fetch_assoc($result_dept)) {
?>
= $dept_row['dept_name'] ?> |
Patient Name |
$id_query = "select max(m.medical_exam_id),m.hbd,patient_id,p.patient_name from medical_examination m left join patient_master p on p.id = m.patient_id where m.patient_id in (SELECT id FROM `patient_master` where status='Active' and dept_id ='" . $dept_row['dept_id'] . "' $qry_filter ORDER by id asc) $qry_date1 $qry_date and m.audio_findings NOT LIKE 'WNL%' GROUP BY patient_id ORDER BY patient_id asc";
$id_result = mysqli_query($conn, $id_query);
error_log("query:".$id_query);
if (mysqli_num_rows($id_result)) {
while ($row_id = mysqli_fetch_assoc($id_result)) {
?>
= $row_id['patient_name'] ?> |
}
} else {
?>
No Result |
}
}
}
?>