= date(NOW()-INTERVAL 730 DAY) and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' "; // error_log("row count:" . $twoyear); $result_twoyear = mysqli_query($conn, $twoyear); $row_twoyear = @mysqli_fetch_array($result_twoyear); ?>

OHC Software:Health Index

 Apply date's to Health Index's

Start date

End date

Health Index Formula

Risk Factor Hight Risk Score=4 Moderated Risk Score=2 Low Risk Score=0
BP >140/90 121-139/81-89 >120/80 or less
DIABETES RBS+200 Mg/Dl RBS140-199 Mg/Dl RBS+140-199 Mg/Dl
CHOLESTROL >240 Mg/Dl 200-239 Mg/Dl RBS+200 Mg/Dl
BMI >30 25-30 =25

Total EHC Done

Health Index :to EHC Report Reviwe For

0) { while ($row = @mysqli_fetch_array($result)) { if($row["health_index"]=='2') $index_mid_corp++; else if($row["health_index"]=='0' || $row["health_index"]=='1') $index_low_corp++; else $index_risk_corp++; array_push($date,date('d-m-Y',strtotime($row["checkup_date"]))); array_push($date,date('d-m-Y',strtotime($row["valid_upto"]))); $total_checkup++; } } $query1="SELECT checkup_id,checkup_date,c.valid_upto,c.health_index FROM checkup_form c left join patient_master p on c.emp_id=p.id WHERE DATE(checkup_date) between STR_TO_DATE('" . $start . "', '%d-%m-%Y') AND STR_TO_DATE('" . $end . "', '%d-%m-%Y') and p.bu_id='2' and c.checkup_type_id='25' and c.ohc_type_id='" . $_SESSION['current_ohcttype'] . "'"; error_log('mm'.$query1) ; if (!$result1 = @mysqli_query($conn,$query1)) { exit(mysqli_error($conn)); } if(mysqli_num_rows($result1) > 0) { while ($row1 = @mysqli_fetch_array($result1)) { if($row1["health_index"]=='2') $index_mid_pwt++; else if($row1["health_index"]=='0' || $row1["health_index"]=='1') $index_low_pwt++; else $index_risk_pwt++; array_push($date,date('d-m-Y',strtotime($row1["checkup_date"]))); array_push($date,date('d-m-Y',strtotime($row1["valid_upto"]))); $total_checkup++; } } $query2="SELECT checkup_id,checkup_date,c.valid_upto,c.health_index FROM checkup_form c left join patient_master p on c.emp_id=p.id WHERE DATE(checkup_date) between STR_TO_DATE('" . $start . "', '%d-%m-%Y') AND STR_TO_DATE('" . $end . "', '%d-%m-%Y') and p.bu_id='3' and c.checkup_type_id='25' and c.ohc_type_id='" . $_SESSION['current_ohcttype'] . "'"; error_log('ww'.$query2) ; if (!$result2 = @mysqli_query($conn,$query2)) { exit(mysqli_error($conn)); } if(mysqli_num_rows($result2) > 0) { while ($row2 = @mysqli_fetch_array($result2)) { if($row2["health_index"]=='2') $index_mid_car++; else if($row2["health_index"]=='0' || $row2["health_index"]=='1') $index_low_car++; else $index_risk_car++; array_push($date,date('d-m-Y',strtotime($row2["valid_upto"]))); array_push($date,date('d-m-Y',strtotime($row2["checkup_date"]))); $total_checkup++; } } usort($date, function($a, $b) { $dateTimestamp1 = strtotime($a); $dateTimestamp2 = strtotime($b); return $dateTimestamp1 < $dateTimestamp2 ? -1: 1; }); error_log("checkup date " . print_r(($date), true)); $max_date=$date[count($date) - 1]; $min_date=$date[0]; ?>
Risk Factor Hight Risk Score=4 Moderated Risk Score=2 Low Risk Score=0
Corporate
PWT
Car

Health Index Formula:to 2nd Follow up

0) { while ($row_opd = @mysqli_fetch_array($result_opd)) { if($row_opd["health_index"]=='2') $index_mid_corp1++; else if($row_opd["health_index"]=='0' || $row_opd["health_index"]=='1') $index_low_corp1++; else $index_risk_corp1++; $total_followup++; } } $query1_opd="SELECT appointment_id,appointment_date ,c.health_index FROM employee_appointment c left join patient_master p on c.emp_id=p.id WHERE DATE(appointment_date) between STR_TO_DATE('" . $start1 . "', '%d-%m-%Y') AND STR_TO_DATE('" . $end1 . "', '%d-%m-%Y') and p.bu_id='2' and c.case_type='EFUP' and c.ohc_type_id='" . $_SESSION['current_ohcttype'] . "'"; error_log('mm_opd'.$query1_opd) ; if (!$result1_opd = @mysqli_query($conn,$query1_opd)) { exit(mysqli_error($conn)); } if(mysqli_num_rows($result1_opd) > 0) { while ($row1_opd = @mysqli_fetch_array($result1_opd)) { if($row1_opd["health_index"]=='2') $index_mid_pwt1++; else if($row1_opd["health_index"]=='0' || $row1_opd["health_index"]=='1') $index_low_pwt1++; else $index_risk_pwt1++; $total_followup++; } } $query2_opd="SELECT appointment_id,appointment_date ,c.health_index FROM employee_appointment c left join patient_master p on c.emp_id=p.id WHERE DATE(appointment_date) between STR_TO_DATE('" . $start . "', '%d-%m-%Y') AND STR_TO_DATE('" . $end . "', '%d-%m-%Y') and p.bu_id='3' and c.case_type='EFUP' and c.ohc_type_id='" . $_SESSION['current_ohcttype'] . "'"; error_log('ww_opd'.$query2_opd) ; if (!$result2_opd = @mysqli_query($conn,$query2_opd)) { exit(mysqli_error($conn)); } if(mysqli_num_rows($result2_opd) > 0) { while ($row2_opd = @mysqli_fetch_array($result2_opd)) { if($row2_opd["health_index"]=='2') $index_mid_car1++; else if($row2_opd["health_index"]=='0' || $row2_opd["health_index"]=='1') $index_low_car1++; else $index_risk_car1++; $total_followup++; } } ?>
Risk Factor Hight Risk Score=4 Moderated Risk Score=2 Low Risk Score=0
Corporate
PWT
Car