= '" . $start_date_excel . "' and date(checkup_date) <= '" . $end_date_excel . "'"; $sql210 = "select * from checkup_type where checkup_type_id='" . $checkup_type_id . "'"; error_log("getting checkup type details : ̥" . $sql210); $result210 = @mysqli_query($conn, $sql210); while ($row210 = mysqli_fetch_array($result210)) { $checkup = $row210['checkup_form_section_ids']; } $sql = 'select distinct section_id,section_name,count(*) as count from (select* from checkup_form_section where Status="Active"and section_id in (' . $checkup . ') ) as c left JOIN checkup_parameter on checkup_parameter.checkup_form_section_id=c.section_id and enabled="Y" group by section_id '; error_log("sql 1st" . $sql); $result = mysqli_query($conn, $sql); $sql1 = 'select parameter_value,input_type,section_id,column_order,checkup_parameter_id,parameter_name,column_name from (select checkup_form_section_id,column_order,checkup_parameter_id ,parameter_name,input_type,column_name,parameter_value from checkup_parameter WHERE enabled="Y" and checkup_form_section_id in (' . $checkup . ')) as c inner JOIN checkup_form_section on checkup_form_section.section_id=c.checkup_form_section_id and Status="Active" order by checkup_form_section_id,column_order'; $result1 = mysqli_query($conn, $sql1); error_log("heading query " . $sql1); $sql2 = "select c.*,p.* from checkup_form c left join patient_master p on c.emp_id = p.id where c.checkup_type_id='" . $checkup_type_id . "' and (c.current_status='MDP' or c.current_status='MDA') $dates"; $result2 = mysqli_query($conn, $result2); error_log("Fetched result Value " . $sql2); ?>
Examination date Examination Type Patient details
Employee Code Patient name Father name DOB Ticket No Gender Blood Group Designation Department Adhaar Number Phone