=str_to_date('" . $start_date . "','%d-%m-%Y') "; } if (isset($end_date) && $end_date != '') { $qry_filter .= " and date(medical_entry_date) <=str_to_date('" . $end_date . "','%d-%m-%Y') "; } if (isset($month) && $month != '') { $qry_filter .= " and month(medical_entry_date) in (" . $month . ")"; } ?> 1) { for ($j = 0; $j < sizeof($year1); $j++) { error_log("year:" . $year1[$j] . " size:" . sizeof($year1)); $qry_date = ""; $qry_doj = ""; $qry_date .= "and year(medical_entry_date) ='" . $year1[$j] . "'"; $qry_doj .= "and year(doj) <='" . $year1[$j] . "'"; $query = "select max(medical_exam_id),medical_examination.health_index,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' $qry_filter $qry_doj ORDER by id asc) and medical_examination.health_index<10 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =10 and medical_examination.health_index<15 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =15 and medical_examination.health_index<20 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =20 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =10 and medical_examination.health_index<15 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =15 and medical_examination.health_index<20 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =20 $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?>
EMPLOYEE HEALTH INDEX REPORT
Run Date :      User :
Filters Applied- Range: to , EMPLOYER/CONTRACTOR:, Gender:, OHC Location:, Patient Category:, Department:, Designation:, Employee Cadre:, Month:, Year:
For year:
health_index Less Than 10
Patient Name
NO RECORDS
health_index Between 10 to 15
Patient Name
NO RECORDS
health_index between 15 to 20
Patient Name
NO RECORDS
health_index greater than 20
Patient Name
NO RECORDS
health_index Less Than 10
Patient Name
NO RECORDS
health_index Between 10 to 15
Patient Name
NO RECORDS
health_index between 15 to 20
Patient Name
NO RECORDS
health_index greater than 20
Patient Name
NO RECORDS