ESH/excel_agewise_hypertention_emp_report.php
2024-10-23 18:28:06 +05:30

54 lines
1.7 KiB
PHP

<?php
// 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_emp_report_list.xls');
?>
<body>
<table border="1" width="100%">
<?php
$ohc_location = $_REQUEST['ohc_location'];
$patient_category = $_REQUEST['patient_category'];
$dept = $_REQUEST['dept'];
$emp_designation = $_REQUEST['emp_designation'];
$emp_cadre = $_REQUEST['emp_cadre'];
$employer_contractor = $_REQUEST['employer_contractor'];
$gender = $_REQUEST['gender'];
// $sql="select id,emp_code,fname,lname,designation_id,father_name,gender,blood_group,primary_phone from employee";
// echo $sql;
$query1="select id FROM patient_master where YEAR(CURDATE())-year(dob)>=18 and YEAR(CURDATE())-year(dob)<=25";
$query="SELECT count(DISTINCT(patient_id)) as total from medical_examination where bp is not null and bp!='' and patient_id in ($query1)";
$query="SELECT patient_master.patient_name from medical_examination INNER JOIN patient_master ON medical_examination.patient_id = patient_master.id where bp>130 and patient_id in ($query1)";
$result = mysqli_query($conn,$query);
// echo $result;
?>
<tr align="center">AGEWISE HYPERTENSION DISTRIBUTION</tr>
<strong><tr bgcolor="#eeeeee">
<td align="center" width="10%">Age in years (18-25)</td>
<td align="center" width="15%" >Patient Name</td>
</strong></tr>
<?php
error_reporting(E_ERROR | E_PARSE);
while ($rowOfEmployee = mysqli_fetch_array($result)) {
?>
<tr>
<td></td>
<td align="left" width="15%"><?php echo $rowOfEmployee['patient_name']?></td>
</tr><?php
}
?>
</table>
</body>
<?php
//include('pdf_footer.php');
?>