=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.bmi,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.bmi<18.5 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =18.5 and medical_examination.bmi<25 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =25 and medical_examination.bmi<30 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =30 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =18.5 and medical_examination.bmi<25 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =25 and medical_examination.bmi<30 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?> =30 and medical_examination.diabetes='1' $qry_date GROUP BY patient_id ORDER BY patient_id asc"; $result = mysqli_query($conn, $query); ?>
EMPLOYEE BMI DIABETES REPORT
Run Date :      User :
Filters Applied- Range: to , EMPLOYER/CONTRACTOR:, Gender:, OHC Location:, Patient Category:, Department:, Designation:, Employee Cadre:, Month:, Year:
For year:
Bmi Less Than 18.5
Patients With Hypertension
No Records
Bmi Between 18.5 to 25
Patients With Hypertension
No Records
Bmi between 25 to 30
Patients With Hypertension
No Records
Bmi greater than 30
Patients With Hypertension
No Records
Bmi Less Than 18.5
Patients With Hypertension
No Records
Bmi Between 18.5 to 25
Patients With Hypertension
No Records
Bmi between 25 to 30
Patients With Hypertension
No Records
Bmi greater than 30
Patients With Hypertension
No Records