2948 lines
45 KiB
PHP
2948 lines
45 KiB
PHP
<div class="row">
|
|
|
|
<?php
|
|
|
|
$id = ($_REQUEST['flex_opd_id']!=''?$_REQUEST['flex_opd_id']:$row['emp_id']);
|
|
|
|
|
|
|
|
$sql = "select * from visitor_patient_master where id = '" . $id . "' ";
|
|
|
|
//echo $sql;
|
|
error_log("sql: ".$sql);
|
|
|
|
$result = mysqli_query($conn,$sql);
|
|
|
|
$row = mysqli_fetch_array($result);
|
|
|
|
|
|
|
|
$sql2 = "select * from health_advice";
|
|
|
|
$result2 = mysqli_query($conn,$sql2);
|
|
|
|
$row2 = mysqli_fetch_array($result2);
|
|
|
|
$sql3 = "select * from health_risk";
|
|
|
|
$result3 = mysqli_query($conn,$sql3);
|
|
|
|
$row3 = mysqli_fetch_array($result3);
|
|
|
|
$sql4 = "select * from training";
|
|
|
|
$result4 = mysqli_query($conn,$sql4);
|
|
|
|
$row4 = mysqli_fetch_array($result4);
|
|
|
|
?>
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<div class="col-xs-12 col-sm-3 center">
|
|
|
|
<div>
|
|
|
|
<span class="profile-picture">
|
|
|
|
|
|
|
|
<?php if(isset($row['photo']) && $row['photo']!=null){?>
|
|
|
|
<img id="avatar" class="editable img-responsive"
|
|
|
|
alt="<?php echo $row['patient_name']?>"<img
|
|
|
|
src="data:<?php echo $row['image_type']?>;base64,<?php echo base64_encode( $row['photo'] )?>"
|
|
|
|
style="display: block; width: 150px; height: 150px;" />
|
|
|
|
|
|
|
|
<?php
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$gender = $row['gender'];
|
|
|
|
if ($gender == 'M') {
|
|
|
|
?>
|
|
|
|
<img id="avatar" class="editable img-responsive"
|
|
|
|
alt="<?php echo $row['fname']?>'s Avatar"<img src="images/male-profile.png"
|
|
|
|
style="display: block; width: 150px; height: 150px;" />
|
|
|
|
<?php } else {?>
|
|
|
|
|
|
|
|
<img id="avatar" class="editable img-responsive"
|
|
|
|
alt="<?php echo $row['fname']?>'s Avatar"<img
|
|
|
|
src="images/female-profile.png"
|
|
|
|
style="display: block; width: 150px; height: 150px;" />
|
|
|
|
<?php }}?>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="width-80 label label-warnining label-xlg">
|
|
|
|
<div class="inline position-relative">
|
|
|
|
<a href="#" class="user-title-label dropdown-toggle"
|
|
|
|
data-toggle="dropdown"> <i
|
|
|
|
class="glyphicon glyphicon-tint red"></i><span
|
|
|
|
class="red"><?php echo $row['blood_group']?> </span> <span
|
|
|
|
class="white"><?php echo $row['patient_name']?></span>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-xs-12 col-sm-9 center">
|
|
|
|
<div class="row">
|
|
|
|
<p class="alert" style="border-radius: 2%;background-color:#3C8DBC; color:#fff">Employee Health Dashboard</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="space space-4"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12" style="margin-top: 10px">
|
|
|
|
<div class="col-xs-12 col-sm-6 center">
|
|
|
|
<div class="profile-user-info profile-user-info-striped">
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Code</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo $row['emp_code']?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Employment Type</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo ($row['employment_type_id'])==1?"Permanent Employee":"Contract"?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Designation</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo getTableFieldValue('designation','designation_name','designation_id',"'".$row['designation_id']."'")?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Manager Name</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo getTableFieldValue('employee','patient_name','id',"'".$row['mgr_emp_id']."'")?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Father Name</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo $row['father_name']?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date of Joining</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo date_format(date_create($row['doj']),"d-M-Y ")?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date of Birth</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo date_format(date_create($row['dob']),"d-M-Y ")?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Age</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo isset($rows_emp_appoint['dob'])? date_diff(date_create($row['dob']), date_create('today'))->y:"Not Available";?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Primary Phone</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo $row['primary_phone']?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Email</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<span><?php echo $row['email_id']?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Address</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
|
|
|
|
<span><?php echo $row['address']?></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Unit</div>
|
|
|
|
|
|
|
|
<div class="profile-info-value">
|
|
|
|
<i class="fa fa-map-marker light-orange bigger-110"></i>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-sm-6 center">
|
|
|
|
|
|
|
|
<div id="accordion" class="accordion-style1 panel-group">
|
|
|
|
<div class="panel panel-default" style="text-align: left">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseOne"> <i
|
|
|
|
class="ace-icon fa fa-angle-down bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Previous
|
|
|
|
OPD Visit
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse in" id="collapseOne">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="profile-user-info profile-user-info-striped"
|
|
|
|
style="margin: 0px; padding: 0px; width: 100%">
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$sql_opd = "select * from employee_appointment where emp_id = '" . $id . "' and appointment_type='O' order by appointment_date desc limit 1";
|
|
error_log("sql opd: 407: ".$sql_opd);
|
|
if (! $result_opd = @mysqli_query($conn,$sql_opd)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
|
|
}
|
|
|
|
if (mysqli_num_rows($result_opd) > 0) {
|
|
|
|
if ($row_opd = mysqli_fetch_assoc($result_opd)) {
|
|
|
|
|
|
|
|
?>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date & Time:</div>
|
|
|
|
<div class="profile-info-value"><?php echo date_format(date_create($row_opd['appointment_date']),"d-M-Y H:i A")?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Diagnosis:</div>
|
|
|
|
<div class="profile-info-value"><?php echo getCommaSeperatedValuesForInClause("select ailment_name from ailment ", "ailment_id", $row_opd['ailment_ids'])?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Treatment:</div>
|
|
|
|
<div class="profile-info-value"><?php echo getTreatmentText($row_opd['appointment_id'])?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<div
|
|
|
|
class="profile-info-value">No Record found</div>
|
|
|
|
<?php }?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading" style="text-align: left">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseTwo"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Previous
|
|
|
|
Injury
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseTwo">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="profile-user-info profile-user-info-striped"
|
|
|
|
style="margin: 0px; padding: 0px; width: 100%">
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$sql_injury = "select * from employee_appointment where emp_id = '" . $id . "' and appointment_type='I' order by appointment_date desc limit 1";
|
|
error_log("sql injury: 525: ".$sql_injury);
|
|
if (! $result_injury = @mysqli_query($conn,$sql_injury)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
|
|
}
|
|
|
|
if (mysqli_num_rows($result_injury) > 0) {
|
|
|
|
if ($row_injury = mysqli_fetch_assoc($result_injury)) {
|
|
|
|
?>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date & Time:</div>
|
|
|
|
<div class="profile-info-value"><?php echo date_format(date_create($row_injury['appointment_date']),"d-M-Y H:i A")?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Diagnosis:</div>
|
|
|
|
<div class="profile-info-value"><?php echo getCommaSeperatedValuesForInClause("select injury_type_name from injury_type", "injury_type_id", $row_injury['injury_types'])?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Treatment:</div>
|
|
|
|
<div class="profile-info-value"><?php echo getTreatmentText($row_injury['appointment_id'])?></div>
|
|
|
|
</div>
|
|
|
|
<?php }else{?>
|
|
|
|
|
|
|
|
|
|
|
|
No Results found
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<div
|
|
|
|
class="profile-info-value">No Record found</div>
|
|
|
|
<?php }?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title" style="text-align: left">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseThree"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Previous
|
|
|
|
Emergency
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseThree">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="profile-user-info profile-user-info-striped"
|
|
|
|
style="margin: 0px; padding: 0px; width: 100%">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$sql_emergency = "select * from employee_appointment where emp_id = '" . $id . "' and isEmergency='1' order by appointment_date desc limit 1";
|
|
|
|
error_log("sql emergency: 643: ".$sql_emergency);
|
|
if (! $result_emergency = @mysqli_query($conn,$sql_emergency)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
|
|
}
|
|
|
|
if (mysqli_num_rows($result_emergency) > 0) {
|
|
|
|
if ($row_emergency = mysqli_fetch_assoc($result_emergency)) {
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date & Time:</div>
|
|
|
|
<div class="profile-info-value"><?php echo date_format(date_create($row_emergency['appointment_date']),"d-M-Y H:i A")?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
$appointment_type = $row_emergency['appointment_type'];
|
|
|
|
|
|
|
|
if ($appointment_type == 'O') {
|
|
|
|
$diagnosis = getCommaSeperatedValuesForInClause("select ailment_name from ailment ", "ailment_id", $row_emergency['ailment_ids']);
|
|
|
|
} else if ($appointment_type == 'I') {
|
|
|
|
$diagnosis = getCommaSeperatedValuesForInClause("select injury_type_name from injury_type", "injury_type_id", $row_emergency['injury_types']);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Diagnosis:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $diagnosis?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Treatment:</div>
|
|
|
|
<div class="profile-info-value"><?php echo getTreatmentText($row_emergency['appointment_id'])?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
|
|
|
|
|
|
|
No Results found
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<div
|
|
|
|
class="profile-info-value">No Record found</div>
|
|
|
|
<?php }?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading" style="text-align: left">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseFour"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Previous
|
|
|
|
Sickness Absenteeism
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseFour">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="profile-user-info profile-user-info-striped"
|
|
|
|
style="margin: 0px; padding: 0px; width: 100%">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$sql_sickness = "select * from sickness where emp_id = '" . $id . "' order by sickness_date desc limit 1";
|
|
|
|
error_log("sql sickness: 789: ".$sql_sickness);
|
|
if (! $result_sickness = @mysqli_query($conn,$sql_sickness)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
|
|
}
|
|
|
|
if (mysqli_num_rows($result_sickness) > 0) {
|
|
|
|
if ($row_sickness = mysqli_fetch_assoc($result_sickness)) {
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date & Time:</div>
|
|
|
|
<div class="profile-info-value"><?php echo date_format(date_create($row_sickness['sickness_date']),"d-M-Y")?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Diagnosis:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $row_sickness['sickness_name']?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Treatment:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $row_sickness['des']?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
|
|
|
|
|
|
|
No Results found
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<div
|
|
|
|
class="profile-info-value">No Record found</div>
|
|
|
|
<?php }?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading" style="text-align: left">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseFive"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Training
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseFive">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="profile-user-info profile-user-info-striped"
|
|
|
|
style="margin: 0px; padding: 0px; width: 100%">
|
|
|
|
<?php
|
|
|
|
$sql_training_complete = "select * from employee_assign_training where emp_id='" . $_SESSION['logged_user_empid'] . "' and status='Y' limit 1";
|
|
|
|
// echo $sql_training_complete;
|
|
error_log("sql training complete: 909: ".$sql_training_complete);
|
|
|
|
if (! $result_training_complete = @mysqli_query($conn,$sql_training_complete)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
|
|
}
|
|
|
|
if (mysqli_num_rows($result_training_complete) > 0) {
|
|
|
|
if ($row_training_complete = mysqli_fetch_assoc($result_training_complete)) {
|
|
|
|
|
|
|
|
$query_schedule = "select * from training_schedule where schedule_id='" . $row_training_complete['training_schedule_id'] . "' limit 1";
|
|
|
|
// echo $query_schedule;
|
|
error_log("query_schedule: ".$query_schedule);
|
|
|
|
$result_schedule = @mysqli_query($conn,$query_schedule);
|
|
|
|
while ($rows_schedule = mysqli_fetch_assoc($result_schedule)) {
|
|
|
|
$training_name = getTableFieldValue('training_master', 'training_name', 'training_master_id', $rows_schedule['training_id']);
|
|
|
|
$from_date = date_format(date_create($row_training['from_date']), "d-M-Y");
|
|
|
|
$to_date = date_format(date_create($row_training['to_date']), "d-M-Y");
|
|
|
|
$trainer_name = $rows_schedule['trainer_name'];
|
|
|
|
$training_location = $rows_schedule['location'];
|
|
|
|
// $training_schedule= $training_name.'('.$rows_schedule['trainer_name'].','.date_format(date_create($row_training['from_date']),"d-M-Y").' '.date_format(date_create($row_training['to_date']),"d-M-Y").')';
|
|
|
|
}
|
|
|
|
|
|
|
|
?> <div
|
|
|
|
class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Training Name:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $training_name?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">To Date:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $to_date?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">From Date:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $from_date?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Trainer Name:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $trainer_name?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Completion Date:</div>
|
|
|
|
<div class="profile-info-value"><?php echo $date_completion= date_format(date_create($row_training_complete['completion_date']),"d-M-Y")?></div>
|
|
|
|
</div>
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Status Name:</div>
|
|
|
|
<div class="profile-info-value"><?php echo 'complete'?></div>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
$date_completion = "";
|
|
|
|
// if($row_emp_assign_training['completion_date']!=null && $row_emp_assign_training['completion_date']!='0000-00-00' )
|
|
|
|
// $date_completion= date_format(date_create($row_emp_assign_training['completion_date']),"d-M-Y");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?> No Results found<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading" style="text-align: left">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseSix"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Previous
|
|
|
|
Medical Examination
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseSix">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="profile-user-info profile-user-info-striped"
|
|
|
|
style="margin: 0px; padding: 0px; width: 100%">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$sql_checkup = "select * from checkup_form where emp_id = '" . $id . "' order by checkup_date desc limit 1";
|
|
|
|
error_log("sql checkup: 1076: ".$sql_checkup);
|
|
if (! $result_checkup = @mysqli_query($conn,$sql_checkup)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
|
|
}
|
|
|
|
if (mysqli_num_rows($result_checkup) > 0) {
|
|
|
|
if ($row_checkup = mysqli_fetch_assoc($result_checkup)) {
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Date & Time:</div>
|
|
|
|
<div class="profile-info-value"><?php echo date_format(date_create($row_checkup['checkup_date']),"d-M-Y H:i A")?></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="profile-info-row">
|
|
|
|
<div class="profile-info-name">Abnormal Findings:</div>
|
|
|
|
<div class="profile-info-value">None</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
|
|
|
|
|
|
|
No Results found
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<div
|
|
|
|
class="profile-info-value">No Record found</div>
|
|
|
|
<?php }?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading" style="text-align: left">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseSeven"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i> Health
|
|
|
|
Advice
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseSeven">
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$advices = explode(",", trim($row['known_health_advices'], ','));
|
|
|
|
// echo $advices;
|
|
|
|
$str_advices = '<ul>';
|
|
|
|
for ($i = 0; $i < count($advices); $i ++) {
|
|
|
|
if ($i == 0){
|
|
|
|
$str_advices .="<li style='text-align:left'>". getTableFieldValue('health_advice', 'health_advice_name', 'health_advice_id', $advices[$i], '');
|
|
|
|
$str_advices .="</li>";
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$str_advices .= '<li style="text-align:left">' . getTableFieldValue('health_advice', 'health_advice_name', 'health_advice_id', $advices[$i], '');
|
|
|
|
$str_advices .="</li>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
$str_advices .= '</ul>';
|
|
|
|
echo $str_advices;
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading" style="text-align: left">
|
|
|
|
<h4 class="panel-title">
|
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse"
|
|
|
|
data-parent="#accordion"
|
|
|
|
href="#collapseEight"> <i
|
|
|
|
class="ace-icon fa fa-angle-right bigger-110"
|
|
|
|
data-icon-hide="ace-icon fa fa-angle-down"
|
|
|
|
data-icon-show="ace-icon fa fa-angle-right"></i>
|
|
|
|
Significant Health Risks
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-collapse collapse" id="collapseEight">
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$risks = explode(",", trim($row['known_health_risks'], ','));
|
|
|
|
// echo $advices;
|
|
|
|
$str_risks = '<ul>';
|
|
|
|
|
|
|
|
|
|
|
|
for ($i = 0; $i < count($risks); $i ++) {
|
|
|
|
if ($i == 0){
|
|
|
|
$str_risks .="<li style='text-align:left'>". getTableFieldValue('health_risk', 'health_risk_name', 'health_risk_id', $risks[$i], '');
|
|
|
|
$str_risks .="</li>";
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$str_risks .= '<li style="text-align:left">' . getTableFieldValue('health_risk', 'health_risk_name', 'health_risk_id', $risks[$i], '');
|
|
|
|
$str_risks .="</li>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
$str_risks .= '</ul>';
|
|
|
|
echo $str_risks;
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
|
|
<div class="widget-box transparent">
|
|
|
|
|
|
|
|
<h4 class="widget-title lighter">
|
|
|
|
<i class="ace-icon fa fa-star orange"></i> Blood Pressure Tracker
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="widget-body">
|
|
|
|
<div class="widget-main no-padding">
|
|
|
|
<div id="canvas-holder1" style="width: 100%;">
|
|
|
|
<div class="chartjs-size-monitor">
|
|
|
|
<div class="chartjs-size-monitor-expand">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
<div class="chartjs-size-monitor-shrink">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<canvas id="chart"
|
|
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
|
|
width="1013" height="506" class="chartjs-render-monitor"></canvas>
|
|
|
|
<div id="chartjs-tooltip" class="center"
|
|
|
|
style="opacity: 0; left: 527.674px; top: 88.722px; font-family: & amp; quot; Helvetica Neue&amp; quot; , Helvetica , Arial, sans-serif; font-size: 12px; font-style: normal; padding: 6px;">
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>April</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td><span class="chartjs-tooltip-key"
|
|
|
|
style="background: rgb(255, 61, 103); border-color: rgb(255, 61, 103); border-width: 2px"></span>My
|
|
|
|
First dataset: 93</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><span class="chartjs-tooltip-key"
|
|
|
|
style="background: rgb(5, 155, 255); border-color: rgb(5, 155, 255); border-width: 2px"></span>My
|
|
|
|
Second dataset: 2</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-main -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-box -->
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
|
|
<div class="widget-box transparent">
|
|
|
|
|
|
|
|
<h4 class="widget-title lighter">
|
|
|
|
<i class="ace-icon fa fa-star orange"></i> Patient Weight
|
|
|
|
Tracker
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="widget-body">
|
|
|
|
<div class="widget-main no-padding">
|
|
|
|
<div id="canvas-holder2" style="width: 100%;">
|
|
|
|
<div class="chartjs-size-monitor">
|
|
|
|
<div class="chartjs-size-monitor-expand">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
<div class="chartjs-size-monitor-shrink">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<canvas id="chart1"
|
|
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
|
|
width="1013" height="506" class="chartjs-render-monitor"></canvas>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-main -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-box -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- PAGE CONTENT ENDS -->
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
|
|
<div class="widget-box transparent">
|
|
|
|
|
|
|
|
<h4 class="widget-title lighter">
|
|
|
|
<i class="ace-icon fa fa-star orange"></i> Health Index Tracker
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="widget-body">
|
|
|
|
<div class="widget-main no-padding">
|
|
|
|
<div id="canvas-holder3" style="width: 100%;">
|
|
|
|
<div class="chartjs-size-monitor">
|
|
|
|
<div class="chartjs-size-monitor-expand">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
<div class="chartjs-size-monitor-shrink">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<canvas id="chart3"
|
|
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
|
|
width="1013" height="506" class="chartjs-render-monitor"></canvas>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-main -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-box -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- PAGE CONTENT ENDS -->
|
|
|
|
</div>
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
<div class="col-sm-6" style="padding-top: 30px">
|
|
|
|
<div class="widget-box transparent">
|
|
|
|
|
|
|
|
<h4 class="widget-title lighter">
|
|
|
|
<i class="ace-icon fa fa-star orange"></i> Patient Hygiene Parameter
|
|
|
|
Tracker
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="widget-body">
|
|
|
|
<div class="widget-main no-padding">
|
|
|
|
<div id="canvas-holder4" style="width: 100%;">
|
|
|
|
<div class="chartjs-size-monitor">
|
|
|
|
<div class="chartjs-size-monitor-expand">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
<div class="chartjs-size-monitor-shrink">
|
|
|
|
<div class=""></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<canvas id="chart4"
|
|
|
|
style="display: block; width: 1013px; height: 506px;"
|
|
|
|
width="1013" height="506" class="chartjs-render-monitor"></canvas>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-main -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-body -->
|
|
|
|
</div>
|
|
|
|
<!-- /.widget-box -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- PAGE CONTENT ENDS -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script async="" src="./js/analytics.js"></script>
|
|
|
|
<script src="./js/Chart.min.js"></script>
|
|
|
|
<script src="./js/utils.js"></script>
|
|
|
|
<script>
|
|
|
|
var emp_id="<?php echo $id?>"
|
|
|
|
|
|
|
|
//alert(emp_id);
|
|
|
|
var health_index_array=[];
|
|
|
|
var health_index_labels=[];
|
|
|
|
var hyg_param_values=[];
|
|
|
|
var hyg_param_labels=[];
|
|
|
|
|
|
|
|
var myData=[];
|
|
|
|
var mylabels=[];
|
|
|
|
var myDbp=[];
|
|
|
|
var heartRate=[];
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type:'get',
|
|
|
|
url:'select_employee_sbp.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
myData.push(data[i].checkup_form_value);
|
|
|
|
mylabels.push(data[i].checkup_date);
|
|
|
|
//myDbp.push(data[i].dbp);
|
|
|
|
//heartRate.push(data[i].heart_rate);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
type:'get',
|
|
|
|
url:'select_employee_dbp.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
myDbp.push(data[i].checkup_form_value);
|
|
|
|
|
|
|
|
//myDbp.push(data[i].dbp);
|
|
|
|
//heartRate.push(data[i].heart_rate);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
type:'get',
|
|
|
|
url:'select_employee_pulse.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
|
|
|
|
|
|
|
|
//myDbp.push(data[i].dbp);
|
|
|
|
heartRate.push(data[i].checkup_form_value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type:'POST',
|
|
|
|
url:'select_employee_health_index.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
if(data!=null){
|
|
|
|
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
health_index_array[i]=data[i].health_score;
|
|
|
|
health_index_labels[i]=data[i].checkup_date;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
var barChartData = {
|
|
|
|
labels: health_index_labels,
|
|
|
|
datasets: [{
|
|
|
|
label: 'Health Index',
|
|
|
|
backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
|
|
|
|
borderColor: window.chartColors.red,
|
|
|
|
borderWidth: 1,
|
|
|
|
data: health_index_array
|
|
|
|
}]
|
|
|
|
|
|
|
|
};
|
|
|
|
var ctx1 = document.getElementById('chart3');
|
|
|
|
var chart = new Chart(ctx1, {
|
|
|
|
type: 'bar',
|
|
|
|
data: barChartData,
|
|
|
|
options: {
|
|
|
|
responsive: true,
|
|
|
|
legend: {
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Health Index History'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
var color = Chart.helpers.color;
|
|
|
|
//var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type:'get',
|
|
|
|
url:'select_employee_hygiene_parameter.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
|
|
|
|
|
|
|
|
//myDbp.push(data[i].dbp);
|
|
|
|
hyg_param_values.push(data[i].hyg_parameter_val);
|
|
|
|
hyg_param_labels.push(data[i].checkup_date);
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
labels: hyg_param_labels,
|
|
|
|
datasets: [
|
|
|
|
{
|
|
|
|
label: "Indium",
|
|
|
|
data:hyg_param_values ,
|
|
|
|
backgroundColor: "blue",
|
|
|
|
borderColor: "lightblue",
|
|
|
|
fill: false,
|
|
|
|
lineTension: 0,
|
|
|
|
radius: 5
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
};
|
|
|
|
var ctx = $("#chart4");
|
|
|
|
|
|
|
|
var chart = new Chart(ctx, {
|
|
|
|
type: "line",
|
|
|
|
data: data,
|
|
|
|
options: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Indium (Hygiene Parameter) In Employee'
|
|
|
|
},
|
|
|
|
tooltips: {
|
|
|
|
callbacks: {
|
|
|
|
label: function(tooltipItems, data) {
|
|
|
|
return data.datasets[tooltipItems.datasetIndex].label +':' + tooltipItems.yLabel + ' mg/m3';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
enabled: true,
|
|
|
|
mode: 'index',
|
|
|
|
position: 'nearest',
|
|
|
|
custom: customTooltips
|
|
|
|
},
|
|
|
|
legend:{
|
|
|
|
display:true,
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
scales: {
|
|
|
|
yAxes: [{
|
|
|
|
ticks: {
|
|
|
|
// Include a dollar sign in the ticks
|
|
|
|
callback: function(value, index, values) {
|
|
|
|
return value +' mg/m3';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var emp_weight_array=[];
|
|
|
|
var emp_weight_labels=[];
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type:'POST',
|
|
|
|
url:'select_employee_weight.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
emp_weight_array[i]=data[i].checkup_form_value;
|
|
|
|
emp_weight_labels[i]=data[i].checkup_date ;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
labels: emp_weight_labels,
|
|
|
|
datasets: [
|
|
|
|
{
|
|
|
|
label: "Weight",
|
|
|
|
data:emp_weight_array ,
|
|
|
|
backgroundColor: "blue",
|
|
|
|
borderColor: "lightblue",
|
|
|
|
fill: false,
|
|
|
|
lineTension: 0,
|
|
|
|
radius: 5
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
};
|
|
|
|
var ctx = $("#chart1");
|
|
|
|
|
|
|
|
var chart = new Chart(ctx, {
|
|
|
|
type: "line",
|
|
|
|
data: data,
|
|
|
|
options: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Weight History'
|
|
|
|
},
|
|
|
|
tooltips: {
|
|
|
|
callbacks: {
|
|
|
|
label: function(tooltipItems, data) {
|
|
|
|
return data.datasets[tooltipItems.datasetIndex].label +':' + tooltipItems.yLabel + ' Kgs';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
enabled: true,
|
|
|
|
mode: 'index',
|
|
|
|
position: 'nearest',
|
|
|
|
custom: customTooltips
|
|
|
|
},
|
|
|
|
legend:{
|
|
|
|
display:true,
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
scales: {
|
|
|
|
yAxes: [{
|
|
|
|
ticks: {
|
|
|
|
// Include a dollar sign in the ticks
|
|
|
|
callback: function(value, index, values) {
|
|
|
|
return value +' Kgs';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var ctx = $("#chartWeight");
|
|
|
|
|
|
|
|
var chart = new Chart(ctx, {
|
|
|
|
type: "line",
|
|
|
|
data: data,
|
|
|
|
options: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Weight History'
|
|
|
|
},
|
|
|
|
tooltips: {
|
|
|
|
callbacks: {
|
|
|
|
label: function(tooltipItems, data) {
|
|
|
|
return data.datasets[tooltipItems.datasetIndex].label +':' + tooltipItems.yLabel + ' Kgs';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
enabled: true,
|
|
|
|
mode: 'index',
|
|
|
|
position: 'nearest',
|
|
|
|
custom: customTooltips
|
|
|
|
},
|
|
|
|
legend:{
|
|
|
|
display:true,
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
scales: {
|
|
|
|
yAxes: [{
|
|
|
|
ticks: {
|
|
|
|
// Include a dollar sign in the ticks
|
|
|
|
callback: function(value, index, values) {
|
|
|
|
return value +' Kgs';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var rightVision=[];
|
|
|
|
var empRightVisionLabels=[];
|
|
|
|
$.ajax({
|
|
|
|
type:'POST',
|
|
|
|
url:'select_employee_vision.php',
|
|
|
|
data:{'emp_id':emp_id},
|
|
|
|
dataType:'json',
|
|
|
|
async:false,
|
|
|
|
success:function(data){
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
rightVision[i]=data[i].checkup_form_value;
|
|
|
|
empRightVisionLabels[i]=data[i].checkup_date ;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataVision = {
|
|
|
|
labels: empRightVisionLabels,
|
|
|
|
datasets: [
|
|
|
|
{
|
|
|
|
label: "Right Vision",
|
|
|
|
data:rightVision ,
|
|
|
|
backgroundColor: "blue",
|
|
|
|
borderColor: "lightblue",
|
|
|
|
fill: false,
|
|
|
|
lineTension: 0,
|
|
|
|
radius: 5
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
var ctxVision = document.getElementById('chartVision');
|
|
|
|
var chart = new Chart(ctxVision, {
|
|
|
|
type: 'line',
|
|
|
|
data: dataVision,
|
|
|
|
options: {
|
|
|
|
responsive: true,
|
|
|
|
legend: {
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Right Vision History'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
Chart.defaults.global.pointHitDetectionRadius = 1;
|
|
|
|
|
|
|
|
var customTooltips = function(tooltip) {
|
|
|
|
// Tooltip Element
|
|
|
|
var tooltipEl = document.getElementById('chartjs-tooltip');
|
|
|
|
|
|
|
|
if (!tooltipEl) {
|
|
|
|
tooltipEl = document.createElement('div');
|
|
|
|
tooltipEl.id = 'chartjs-tooltip';
|
|
|
|
tooltipEl.innerHTML = '<table></table>';
|
|
|
|
this._chart.canvas.parentNode.appendChild(tooltipEl);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Hide if no tooltip
|
|
|
|
if (tooltip.opacity === 0) {
|
|
|
|
tooltipEl.style.opacity = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set caret Position
|
|
|
|
tooltipEl.classList.remove('above', 'below', 'no-transform');
|
|
|
|
if (tooltip.yAlign) {
|
|
|
|
tooltipEl.classList.add(tooltip.yAlign);
|
|
|
|
} else {
|
|
|
|
tooltipEl.classList.add('no-transform');
|
|
|
|
}
|
|
|
|
|
|
|
|
function getBody(bodyItem) {
|
|
|
|
return bodyItem.lines;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set Text
|
|
|
|
if (tooltip.body) {
|
|
|
|
var titleLines = tooltip.title || [];
|
|
|
|
var bodyLines = tooltip.body.map(getBody);
|
|
|
|
|
|
|
|
var innerHtml = '<thead>';
|
|
|
|
|
|
|
|
titleLines.forEach(function(title) {
|
|
|
|
innerHtml += '<tr><th>' + title + '</th></tr>';
|
|
|
|
});
|
|
|
|
innerHtml += '</thead><tbody>';
|
|
|
|
|
|
|
|
bodyLines.forEach(function(body, i) {
|
|
|
|
var colors = tooltip.labelColors[i];
|
|
|
|
var style = 'background:' + colors.backgroundColor;
|
|
|
|
style += '; border-color:' + colors.borderColor;
|
|
|
|
style += '; border-width: 2px';
|
|
|
|
var span = '<span class="chartjs-tooltip-key" style="' + style + '"></span>';
|
|
|
|
innerHtml += '<tr><td>' + span + body + '</td></tr>';
|
|
|
|
});
|
|
|
|
innerHtml += '</tbody>';
|
|
|
|
|
|
|
|
var tableRoot = tooltipEl.querySelector('table');
|
|
|
|
tableRoot.innerHTML = innerHtml;
|
|
|
|
}
|
|
|
|
|
|
|
|
var positionY = this._chart.canvas.offsetTop;
|
|
|
|
var positionX = this._chart.canvas.offsetLeft;
|
|
|
|
|
|
|
|
// Display, position, and set styles for font
|
|
|
|
tooltipEl.style.opacity = 1;
|
|
|
|
tooltipEl.style.left = positionX + tooltip.caretX + 'px';
|
|
|
|
tooltipEl.style.top = positionY + tooltip.caretY + 'px';
|
|
|
|
tooltipEl.style.fontFamily = tooltip._bodyFontFamily;
|
|
|
|
tooltipEl.style.fontSize = tooltip.bodyFontSize + 'px';
|
|
|
|
tooltipEl.style.fontStyle = tooltip._bodyFontStyle;
|
|
|
|
tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding + 'px';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var lineChartData = {
|
|
|
|
labels: mylabels,
|
|
|
|
datasets: [{
|
|
|
|
label: 'Blood Pressure(SBP)',
|
|
|
|
data:myData,
|
|
|
|
borderColor: window.chartColors.blue,
|
|
|
|
pointBackgroundColor: window.chartColors.blue,
|
|
|
|
fill: false,
|
|
|
|
|
|
|
|
},{
|
|
|
|
label: 'Blood Pressure(DBP)',
|
|
|
|
data:myDbp,
|
|
|
|
borderColor: window.chartColors.green,
|
|
|
|
pointBackgroundColor: window.chartColors.green,
|
|
|
|
fill: false,
|
|
|
|
|
|
|
|
},{
|
|
|
|
label: 'Heart Rate',
|
|
|
|
data:heartRate,
|
|
|
|
borderColor: window.chartColors.red,
|
|
|
|
pointBackgroundColor: window.chartColors.red,
|
|
|
|
fill: false,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
//window.onload = function() {
|
|
|
|
var chartEl = document.getElementById('chart');
|
|
|
|
window.myLine = new Chart(chartEl, {
|
|
|
|
type: 'line',
|
|
|
|
data: lineChartData,
|
|
|
|
options: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Blood Pressure History'
|
|
|
|
},
|
|
|
|
tooltips: {
|
|
|
|
enabled: false,
|
|
|
|
mode: 'index',
|
|
|
|
position: 'nearest',
|
|
|
|
custom: customTooltips
|
|
|
|
},
|
|
|
|
legend:{
|
|
|
|
display:true,
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
var chartEl = document.getElementById('chartBP');
|
|
|
|
window.myLine = new Chart(chartEl, {
|
|
|
|
type: 'line',
|
|
|
|
data: lineChartData,
|
|
|
|
options: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: 'Blood Pressure History'
|
|
|
|
},
|
|
|
|
tooltips: {
|
|
|
|
enabled: false,
|
|
|
|
mode: 'index',
|
|
|
|
position: 'nearest',
|
|
|
|
custom: customTooltips
|
|
|
|
},
|
|
|
|
legend:{
|
|
|
|
display:true,
|
|
|
|
position: 'bottom',
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#opd_visit").click(function(){
|
|
|
|
$("#opd_visit_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#injury").click(function(){
|
|
|
|
$("#injury_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#emergency").click(function(){
|
|
|
|
$("#emergency_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#examination").click(function(){
|
|
|
|
$("#examination_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#health_risk").click(function(){
|
|
|
|
$("#health_risk_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#sickness").click(function(){
|
|
|
|
$("#sickness_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#health_advice").click(function(){
|
|
|
|
$("#health_advice_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#training").click(function(){
|
|
|
|
$("#training_list").toggle();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.btn.btn-app.btn-sm {
|
|
|
|
width: 110px
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-xl {
|
|
|
|
width: 120px !important;
|
|
|
|
height: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-xxl {
|
|
|
|
width: 170px !important;
|
|
|
|
height: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.label-xs {
|
|
|
|
font-size: 10px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.label-xs-header {
|
|
|
|
font-size: 10px !important;
|
|
|
|
text-align: left;
|
|
|
|
margin-left: 0px;
|
|
|
|
padding-left: 0px;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.profile-info-name {
|
|
|
|
font-size: 10px !important;
|
|
|
|
text-align: left;
|
|
|
|
width: 35%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.profile-info-value {
|
|
|
|
font-size: 10px !important;
|
|
|
|
text-align: left;
|
|
|
|
width: 65%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.widget-title {
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
</style>
|