73 lines
2.8 KiB
PHP
73 lines
2.8 KiB
PHP
|
|
<?php //include('pdf_header.php');
|
||
|
|
include('includes/config/config.php');
|
||
|
|
include('includes/functions.php');
|
||
|
|
//include('pop_up_top.php');
|
||
|
|
header('Content-Type: application/force-download');
|
||
|
|
header('Content-disposition: attachment; filename=excel_sickness.xls');
|
||
|
|
?>
|
||
|
|
<table border="1">
|
||
|
|
<?php
|
||
|
|
// $sql="select from_date,to_date,date_absent,date_return,agency,sickness_name,des from sickness";
|
||
|
|
//echo $sql;
|
||
|
|
$sql = base64_decode($filterkey);
|
||
|
|
error_log("query:" . $sql);
|
||
|
|
$result = mysqli_query($conn, $sql);
|
||
|
|
//echo $result;
|
||
|
|
?><tr>
|
||
|
|
<th>Sr.No</th>
|
||
|
|
<th>Fit/Unfit No</th>
|
||
|
|
<th>Patient Name</th>
|
||
|
|
<th>Emp Code</th>
|
||
|
|
<th>Designation</th>
|
||
|
|
<th>Department</th>
|
||
|
|
<th>Business Unit</th>
|
||
|
|
<th>Diagnosis</th>
|
||
|
|
<th>Treatment Start Date</th>
|
||
|
|
<th>Treatment End Date</th>
|
||
|
|
<th>Rejoining Date</th>
|
||
|
|
<th>Fitness Status</th>
|
||
|
|
<th>Fit/Unfit Given By</th>
|
||
|
|
</tr><?php $count = 0;
|
||
|
|
while ($rowOfEmployee = mysqli_fetch_array($result)) {
|
||
|
|
$doc_id = $rowOfEmployee['doctor_last_attended'];
|
||
|
|
$mod_id = $rowOfEmployee['modified_by'];
|
||
|
|
|
||
|
|
if($doc_id!=0){
|
||
|
|
$doc_name = getFieldFromTable('patient_name', 'patient_master', 'id', $doc_id);
|
||
|
|
}else{
|
||
|
|
$doc_name = getFieldFromTable('patient_name', 'patient_master', 'id', $doc_id);
|
||
|
|
}
|
||
|
|
error_log("doc:" . $doc_name);
|
||
|
|
$status = $rowOfEmployee['fitness_status'];
|
||
|
|
|
||
|
|
$fit = "";
|
||
|
|
if ($status == 'FIT') {
|
||
|
|
$fit = "<span class='green'>FIT</i></span>";
|
||
|
|
} else if ($status == 'APPROVED') {
|
||
|
|
$fit = "<span class='green'>FIT</i></span>";
|
||
|
|
} else {
|
||
|
|
$fit = "<span class='lighter red'>UNFIT</i></span>";
|
||
|
|
}
|
||
|
|
$count++;
|
||
|
|
?><tr>
|
||
|
|
<td><?php echo $count ?></td>
|
||
|
|
<td><?php echo $rowOfEmployee['ticket_no'] ?></td>
|
||
|
|
<td><?php echo strtoupper($rowOfEmployee['patient_name']) ?></td>
|
||
|
|
<td><?php echo $rowOfEmployee['emp_code'] ?></td>
|
||
|
|
<td><?php echo getTableFieldValue('designation', 'designation_name', 'designation_id', $rowOfEmployee['designation_id']) ?></td>
|
||
|
|
<td><?php echo getTableFieldValue('department', 'dept_name', 'dept_id', $rowOfEmployee['dept_id']) ?></td>
|
||
|
|
<td><?php echo getTableFieldValue('bussiness_unit', 'bu_name', 'bu_id', $rowOfEmployee['bu_id']) ?></td>
|
||
|
|
<td><?php echo getTableFieldValue('ailment_system', 'ailment_sys_name', 'ailment_sys_id', $rowOfEmployee['sickness_name']); ?></td>
|
||
|
|
<td><?php echo $rowOfEmployee['from_date'] ?></td>
|
||
|
|
<td><?php echo $rowOfEmployee['to_date'] ?></td>
|
||
|
|
<td><?php echo $rowOfEmployee['date_return'] ?></td>
|
||
|
|
<td><?php echo $fit ?></td>
|
||
|
|
<td><?php echo $doc_name ?></td>
|
||
|
|
</tr><?php
|
||
|
|
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
</table>
|
||
|
|
<?php
|
||
|
|
//include('pdf_footer.php');
|
||
|
|
?>
|