ESH/excel_pending_patient_list.php

91 lines
4.0 KiB
PHP
Raw Permalink Normal View History

2024-10-23 18:28:06 +05:30
<?php
header("Content-type:application/octet-stream");
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=excel_pending_medical_examination.xls");
header("Pragma: no-cache");
header("Expires: 0");
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
?>
<?php
include('includes/config/config.php');
include('includes/functions.php')
//include('pop_up_top.php');
?>
<body>
<table border="1" width="100%">
<?php
$sql_employee_appointment=base64_decode($filterkey);
//echo $sql_medical_examination;
$results_employee_appointment = mysqli_query($conn,$sql_employee_appointment);
?>
<strong><tr bgcolor="#eeeeee"><td align="left" width="2%" >Sr.</td><td align="center" width="10%">Date</td><td align="center" width="10%">Ticket No</td><td align="center" width="10%">Token No</td><td valign="top" align="center" width="10%">ECode/G.Pass</td><td valign="top" align="center" width="16%">Patient Name</td><td valign="top" align="center" width="15%">Complaints</td><td valign="top" align="center" width="5%">Emergency?</td><td valign="top" align="center" width="5%">Injury?</td><td valign="top" align="center" width="10%">Vitals</td><td valign="top" align="center" width="10%">Reception Remarks</td>
</strong></tr>
<?php
$count=0;
while ($row_employee_appointment= mysqli_fetch_assoc($results_employee_appointment)){
extract($row_employee_appointment);
?>
<?php
$diagnosis =$row_employee_appointment['appointment_type'];
$appointment_type =$row_employee_appointment['appointment_type'];
$employee_appointment=$row_employee_appointment['appointment_id'];
$emp_id=$row_employee_appointment['id'];
$isEmergency ="";
$isInjury="";
if ($appointment_type == 'I') {
$isInjury = "<span class='red'>Yes</i></span>";
$edit_link="<a href=\"edit_injury.php?appointmentId=".$appointment_id."&flex_opd_id=".$emp_id."&returnPage=pending_patient_list.php?view=edit\" class=\"blue\" ><i class=\"menu-icon fa fa-pencil-square-o\"></i></a>";
$view_link="<a href=\"view_injury.php?appointmentId=".$appointment_id."&flex_opd_id=".$emp_id."&returnPage=pending_patient_list.php?view=view\" class=\"green\" ><i class=\"ace-icon fa fa-search-plus bigger-130\"></i></a>";
}else{
$isInjury = "<span class='green'>No</i></span>";
$edit_link="<a href=\"edit_opd.php?appointmentId=".$appointment_id."&flex_opd_id=".$emp_id."&returnPage=pending_patient_list.php?view=edit\" class=\"blue\" ><i class=\"menu-icon fa fa-pencil-square-o\"></i></a>";
$view_link="<a href=\"view_opd.php?appointmentId=".$appointment_id."&flex_opd_id=".$emp_id."&returnPage=pending_patient_list.php?view=view\" class=\"green\" ><i class=\"ace-icon fa fa-search-plus bigger-130\"></i></a>";
}
if ($row_employee_appointment['IsEmergency'] == 1) {
$isEmergency = "<span class=' lighter red'>Yes</i></span>";
}else{
$isEmergency = "<span class='green'>No</i></span>";
}
if(!isAccessible($_SESSION['RoleId'],$menu_key,'R')){
$view_link="";
}
if(!isAccessible($_SESSION['RoleId'],$menu_key,'W')){
$edit_link="";
}
$check_results = "SBP:".$row_employee_appointment['bp_sbp'].", DBP:".$row_employee_appointment['bp_dbp'].", FBS:".$row_employee_appointment['blood_sugar_fbs'].", RBS:".$row_employee_appointment['blood_sugar_rbs'];
$count=$count+1;
?>
<tr><td><?php echo $count?></td><td><?php echo date_format(date_create($row_employee_appointment['appointment_date']),"d-M-Y H:i A")?></td><td><?php echo $row_employee_appointment['ticket_no']?></td><td><?php echo $row_employee_appointment['token_no']?></td><td align="left"><?php echo $row_employee_appointment['emp_code']?></td><td><?php echo $row_employee_appointment['patient_name']?></td><td><?php echo $row_employee_appointment['complaints']?></td><td align="center"><?php echo $isEmergency?></td><td align="center"><?php echo $isInjury?></td><td><?php echo $check_results?></td><td><?php echo $row_employee_appointment['remarks_rece']?></td></tr>
<?php
}
?>
</table>
</body>