105 lines
4.4 KiB
PHP
105 lines
4.4 KiB
PHP
|
<?php
|
||
|
include('pdf_header.php');
|
||
|
include_once("pdf_ohc_header.php");
|
||
|
|
||
|
?>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<div style="font-size:12px">
|
||
|
<td width="25%" align="left"> Run Date : <?php echo date("d-M-Y"); ?></td>
|
||
|
<td width="50%" align="center" style="font-size:20px"><strong>Sickness List</strong></td>
|
||
|
<td width="25%" align="left"> User : <?php echo $username ?></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table class="col-sm-offset-5" border="1">
|
||
|
<?php
|
||
|
|
||
|
$sql = base64_decode($filterkey);
|
||
|
|
||
|
error_log("pdf fitness:" . $sql);
|
||
|
$result = mysqli_query($conn, $sql);
|
||
|
|
||
|
//$sql="select from_date,to_date,date_absent,date_return,agency,sickness_name,des from sickness";
|
||
|
//echo $sql;
|
||
|
// $result = mysqli_query($conn,$sql);
|
||
|
//echo $result;
|
||
|
?><tr bgcolor='#eeeeee'>
|
||
|
<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>Body System </th>
|
||
|
<th>Diagnosis </th>
|
||
|
<th>Treatment Start Date</th>
|
||
|
<th>Treatment End Date</th>
|
||
|
<th>Absent Date</th>
|
||
|
<th>Rejoining Date</th>
|
||
|
<th>Days of Leaves</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', $mod_id);
|
||
|
}
|
||
|
$date_difference=$rowOfEmployee['date_difference'];
|
||
|
$half_day=$rowOfEmployee['half_day'];
|
||
|
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 getCommaSeperatedValuesForInClause("select ailment_name from ailment ", "ailment_id", $rowOfEmployee['ailment_name']); ?>
|
||
|
</td>
|
||
|
<td><?php echo $rowOfEmployee['from_date'] ?></td>
|
||
|
<td><?php echo $rowOfEmployee['to_date'] ?></td>
|
||
|
<td><?php echo date_format(date_create($rowOfEmployee['date_absent']), "d-M-Y "); ?></td>
|
||
|
<td><?php echo date_format(date_create($rowOfEmployee['date_absent_to']), "d-M-Y "); ?></td>
|
||
|
<td> <?php if($date_difference=='' || $date_difference== null|| $date_difference== 0){ if($half_day==1){echo ' ';} else{echo '1';}} else { if($half_day==1){echo $date_difference;} else{echo $date_difference+1;}}
|
||
|
if($half_day==1){
|
||
|
if($date_difference=='' || $date_difference== null|| $date_difference== 0){
|
||
|
echo 'Half ';
|
||
|
}else{
|
||
|
echo ' And Half ';
|
||
|
}
|
||
|
|
||
|
}?>
|
||
|
Days</td>
|
||
|
<td><?php echo $fit ?></td>
|
||
|
<td><?php echo $doc_name ?></td>
|
||
|
</tr><?php
|
||
|
|
||
|
}
|
||
|
?>
|
||
|
</table>
|
||
|
<?php
|
||
|
include('pdf_footer.php');
|
||
|
?>
|