ESH/view_employee_details.php

1776 lines
81 KiB
PHP
Raw Permalink Normal View History

2024-10-23 18:28:06 +05:30
<?php include('techsyn_header.php');
error_reporting(E_ERROR | E_PARSE);
?>
<style>
<!--
#panel-title1>a,
#panel-title1>a:active {
display: block;
font-size: 12px;
font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #337ab7;
height: 20px;
text-decoration: none;
}
#panel-heading1 a:before {
font-family: 'Glyphicons Halflings';
content: "\e114";
float: right;
transition: all 0.5s;
}
#panel-heading1.active a:before {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
}
-->
</style>
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
<!-- page specific plugin styles -->
<link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
<link rel="stylesheet" href="assets/css/jquery.gritter.min.css" />
<link rel="stylesheet" href="assets/css/select2.min.css" />
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet" href="assets/css/bootstrap-editable.min.css" />
<!-- text fonts -->
<link rel="stylesheet" href="assets/css/fonts.googleapis.com.css" />
<!-- ace styles -->
<link rel="stylesheet" href="assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
<!--[if lte IE 9]>
<link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
<![endif]-->
<link rel="stylesheet" href="assets/css/ace-skins.min.css" />
<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />
<!--[if lte IE 9]>
<link rel="stylesheet" href="assets/css/ace-ie.min.css" />
<![endif]-->
<!-- inline styles related to this page -->
<!-- ace settings handler -->
<script src="assets/js/ace-extra.min.js"></script>
<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
<!--[if lte IE 8]>
<script src="assets/js/html5shiv.min.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
<!-- Main Content Container for side bar and body-->
<div class="main-container ace-save-state" id="main-container">
<script type="text/javascript">
try {
ace.settings.loadState('main-container')
} catch (e) {}
</script>
<?php include('techsyn_sidebar.php'); ?>
<?php
$emp_id = $_REQUEST['emp_id'];
// echo $id;
$query = "select * from patient_master where id = " . $emp_id . " ";
// echo $query;
if (!$result = @mysqli_query($conn, $query)) {
exit(mysqli_error($conn));
} else {
$row = @mysqli_fetch_array($result);
/*$client_id = $row['client_id'];
$client_query = "select * from client_master where client_id='$client_id'";
$result_client = @mysqli_query($conn,$client_query);
$row_client = @mysqli_fetch_array($result_client);*/
@extract($row);
}
$accessOption = $_REQUEST['accessOption'];
?>
<!--breadcrumb-->
<div class="main-content">
<div class="main-content-inner">
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
<li class="active">Employee</li>
<li class="active"> Employee Info</li>
</ul>
</div>
<!-- End of breadcrumb -->
<?php
$emp_id = $_REQUEST['emp_id'];
// echo $id;
$query = "select * from patient_master where id = " . $emp_id . " ";
// echo $query;
if (!$result = @mysqli_query($conn, $query)) {
exit(mysqli_error($conn));
} else {
$row = @mysqli_fetch_array($result);
@extract($row);
} ?>
<div class="page-content">
<div class="box box-primary" style="padding: 10px; margin: 2px 0px 50px 5px; width: 99.5%;">
<form class="form-horizontal" id="employee_form" name="employee_form" enctype="multipart/form-data"
action="#" method="post">
<div class="tabbable">
<ul class="nav nav-tabs padding-18">
<li id="basic" class="active"><a data-toggle="tab" href="#edit-basic"> <i
class="green ace-icon fa fa-user bigger-120"></i> Basic Info </a>
</li>
<li id="contactTab"><a data-toggle="tab" href="#contacts"> <i
class="blue ace-icon fa fa-phone bigger-120"></i>Contacts </a>
</li>
<li id="familyTab"><a data-toggle="tab" href="#edit-settings"> <i
class="blue ace-icon fa fa-users bigger-120"></i> Family
Members </a>
</li>
<li id="adviceTab"><a data-toggle="tab" href="#edit-password"> <i
class="pink ace-icon fa fa-picture-o bigger-120"></i> Advices &
Risks </a>
</li>
<li id="docsTab"><a data-toggle="tab" href="#uploadDocs"> <i
class="red ace-icon fa fa-upload bigger-120"></i> Documents </a>
</li>
<li id="medicalExaminationHistroyTab"><a data-toggle="tab"
href="#medicalExaminationHistroy"> <i
class="red ace-icon fa fa-upload bigger-120"></i> Medical
Exam History </a>
</li>
<li id="pastAndPresentIllnessTab"><a data-toggle="tab" href="#pastAndPresentIllness"> <i
class="red ace-icon fa fa-upload bigger-120"></i>Past &
Present Illness History </a>
</li>
<li id="questionnaireTab"><a data-toggle="tab" href="#questionnaire"> <i
class="red ace-icon fa fa-question-circle bigger-120"></i>Employee
Questionnaire </a>
</li>
<li id="vacTab"><a data-toggle="tab" href="#vac"> <i
class="blue ace-icon fa fa-eyedropper bigger-120"></i>Vaccination </a>
</li>
<li id="opdandinjuryTab"><a data-toggle="tab" href="#opdandinjury"> <i
class="red ace-icon fa fa-upload bigger-120"></i>OPD & Injury
</a>
</li>
<li id="sicknessTab"><a data-toggle="tab" href="#sickness"> <i
class="red ace-icon fa fa-bed bigger-130"></i>Sickness
</a>
</li>
</ul>
</div>
<div class="box-header with-border"></div>
<div class="tab-content profile-edit-tab-content">
<div id="edit-basic" class="tab-pane in active">
<button align="center" type="button" id="printPageButton" class="btn btn-success"
onClick="printDiv('edit-basic')">Print</button>
<div class="row">
<div class="col-xs-12 col-sm-3 center">
<div class="space-20"></div>
<span class="profile-picture">
<?php if (isset($row['photo']) && $row['photo'] != null) { ?>
<img class="editable img-responsive" id="avatar"
src="data:<?php echo $row['image_type'] ?>;base64,<?php echo base64_encode($row['photo']) ?>"
style="display: block; width: 180px; height: 200px;" />
<?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: 180px; height: 200px;" />
<?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: 180px; height: 200px;" />
<?php }
} ?>
</span>
<div
class="width-80 label <?php echo ($gender == 'M') ? "label-info" : "label-warning" ?> label-xlg arrowed-in arrowed-in-right">
<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>&nbsp;
</a>
</div>
</div>
<div class="space space-4"></div>
</div>
<div class="col-xs-12 col-sm-9">
<div class="space-20"></div>
<div class="profile-user-info profile-user-info-striped">
<div class="profile-info-row">
<div class="profile-info-name">PATIENT NAME</div>
<div class="profile-info-value">
<span><?php echo $patient_name; ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">FATHER'S NAME</div>
<div class="profile-info-value">
<span><?php echo $father_name; ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Gender</div>
<div class="profile-info-value">
<span><?php if ($gender == 'M') {
echo "Male";
} else if ($gender == 'F') {
echo "Female";
} else echo "Other"; ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">CODE/G.PASS NO</div>
<div class="profile-info-value">
<span><?php echo $emp_code; ?></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 floor((time() - strtotime($row['dob'])) / 31556926) ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">PATIENT CATEGORY</div>
<div class="profile-info-value">
<span><?php if ($patient_cat_id == "0") { ?>
Non-Employee
<?php } ?>
<?php if ($patient_cat_id == "1") { ?>
Employee
<?php } ?></span>
</div>
</div>
<?php if ($patient_cat_id == "1") { ?>
<div class="profile-info-row">
<div class="profile-info-name">Department</div>
<div class="profile-info-value">
<span><?php echo getTableFieldValue('department', 'dept_name', 'dept_id', $dept_id); ?></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', $designation_id); ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">EMPLOYEE CADRE</div>
<div class="profile-info-value">
<span><?php echo getTableFieldValue('emp_cadre', 'emp_cadre', 'emp_cadre_id', $emp_cadre); ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">EMPLOYER/CONTRACTOR</div>
<div class="profile-info-value">
<span><?php echo getTableFieldValue('employer_contractor', 'employer_contractor_name', 'id', $employer_contractor_id); ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Is First Aider </div>
<div class="profile-info-value">
<span><?php echo ($is_first_aid == 1) ? "Yes" : "No" ?></span>
</div>
</div>
<?php } ?>
<div class="profile-info-row">
<div class="profile-info-name">PHONE NUMBER</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">Aadhar No</div>
<div class="profile-info-value">
<span><?php echo $aadhar_no; ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">RESIDING VILLAGE</div>
<div class="profile-info-value">
<span><?php echo $row['village'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">POST</div>
<div class="profile-info-value">
<span><?php echo $row['post'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">PS</div>
<div class="profile-info-value">
<span><?php echo $row['ps'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Tehsil</div>
<div class="profile-info-value">
<span><?php echo $row['tehsil'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">District</div>
<div class="profile-info-value">
<span><?php echo $row['district'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">State</div>
<div class="profile-info-value">
<span><?php echo $row['state'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Pin Code</div>
<div class="profile-info-value">
<span><?php echo $row['pin_code'] ?></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 $row['doj'] ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">OHC Location</div>
<div class="profile-info-value">
<span><?php echo getTableFieldValue('ohc_type', 'ohc_type_name', 'ohc_type_id', $row['ohc_type_id']); ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Status</div>
<div class="profile-info-value">
<span><?php echo $row['status'] == 'Active' ? 'Active' : 'Inactive' ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Of Basic Info -->
<!-- Start Of Family Members -->
<div id="edit-settings" class="tab-pane">
<div class="space-10"></div>
<div class="panel panel-default">
<div class="panel-heading">
Family Members
</div>
<div class="panel-body">
<table class="table table-bordered table-hover" id="familyMembersTable">
<tbody>
<tr>
<th style="text-align:center">Sr</th>
<th style="text-align:center">Name</th>
<th style="text-align:center">Age</th>
<th style="text-align:center">Gender</th>
<th style="text-align:center">Relation Type</th>
</tr>
<?php
$count = 0;
$sql_family_members = "select * from emp_family_members where emp_id=$emp_id ";
$result_family_members = @mysqli_query($conn, $sql_family_members);
$no_of_rows = mysqli_num_rows($result_family_members);
if ($no_of_rows > 0) {
?>
<input type="hidden" name="rowCount" id="rowCount"
value="<?php echo $no_of_rows; ?>" />
<?php } else { ?>
<input type="hidden" name="rowCount" id="rowCount" value="1" />
<?php
}
?>
<?php
if ($no_of_rows > 0) {
while ($row_family_members = @mysqli_fetch_array($result_family_members)) {
?>
<tr id="familyMembersTableRow<?php echo $count; ?>">
<td align="center"> <?php echo $count + 1; ?></td>
<td align="center"><?php echo $row_family_members['name'] ?></td>
<td align="center"><?php
$from = new DateTime($row_family_members['dob']);
$to = new DateTime('today');
echo $from->diff($to)->y; ?></td>
<td align="center">
<?php echo ($row_family_members['gender'] == "M") ? " Male" : (($row_family_members['gender'] == "F") ? "Female" : "Others") ?>
</td>
<td align="center">
<?php echo $row_family_members['relation_type'] ?></td>
</tr>
<?php
++$count;
}
}
?>
</tbody>
</table>
</div>
</div>
<div class="space-10"></div>
<div class="panel panel-default">
<div class="panel-heading">
Family Members
</div>
<div class="panel-body">
<table class="table table-bordered table-hover" id="mediclaim">
<tbody>
<tr>
<th style="text-align:center">financial year</th>
<th style="text-align:center"> MEDICLAIM LIMIT</th>
<th style="text-align:center">APPROVED BUFFER LIMIT</th>
<th style="text-align:center">TOTAL LIMIT</th>
<th style="text-align:center">UTILIZED AMOUNT</th>
<th style="text-align:center">BALANCE</th>
<th style="text-align:center">REMARKS</th>
</tr>
<?php
$count = 0;
$sql_mc = "select * from mediclaim where emp_id=$emp_id ";
$result_mc = @mysqli_query($conn, $sql_mc);
$no_of_rows = mysqli_num_rows($result_mc);
if ($no_of_rows > 0) {
?>
<input type="hidden" name="rowCount" id="rowCount"
value="<?php echo $no_of_rows; ?>" />
<?php } else { ?>
<input type="hidden" name="rowCount" id="rowCount" value="1" />
<?php
}
?>
<?php
if ($no_of_rows > 0) {
while ($row_mc = @mysqli_fetch_array($result_mc)) {
?>
<tr id="mediclaim<?php echo $count; ?>">
<td align="center"><?php echo $row_mc['financial_year'] ?></td>
<td align="center"><?php echo $row_mc['mediclaim_limit'] ?></td>
<td align="center"><?php echo $row_mc['approved_buffer_limit'] ?>
</td>
<td align="center"><?php echo $row_mc['total_limit'] ?>
</td>
<td align="center"><?php echo $row_mc['utilized_amount'] ?></td>
<td align="center"><?php echo $row_mc['balance'] ?></td>
<td align="center"><?php echo $row_mc['remarks'] ?></td>
</tr>
<?php
++$count;
}
}
?>
</tbody>
</table>
</div>
</div>
<div class="space-10"></div>
<div class="panel panel-default">
<div class="panel-heading">
NON-PAYABLE MEDICLAIM
</div>
<div class="panel-body">
<table class="table table-bordered table-hover" id="non_payable_mediclaim">
<tbody>
<tr>
<th style="text-align:center">financial year</th>
<th style="text-align:center">NON-PAYABLE MEDICLAIM LIMIT</th>
<th style="text-align:center">UTILIZED AMOUNT</th>
<th style="text-align:center">BALANCE</th>
<th style="text-align:center">REMARKS</th>
</tr>
<?php
$count = 0;
$sql_np = "select * from non_payable_mediclaim where emp_id=$emp_id ";
$result_np = @mysqli_query($conn, $sql_np);
$no_of_rows = mysqli_num_rows($result_np);
if ($no_of_rows > 0) {
?>
<input type="hidden" name="rowCount" id="rowCount"
value="<?php echo $no_of_rows; ?>" />
<?php } else { ?>
<input type="hidden" name="rowCount" id="rowCount" value="1" />
<?php
}
?>
<?php
if ($no_of_rows > 0) {
while ($row_np = @mysqli_fetch_array($result_np)) {
?>
<tr id="non_payable_mediclaim<?php echo $count; ?>">
<td align="center"><?php echo $row_np['financial_year'] ?></td>
<td align="center"><?php echo $row_np['nonpay_med_limit'] ?></td>
<td align="center"><?php echo $row_np['utilized_amount'] ?></td>
<td align="center">
<?php echo $row_np['balance'] ?>
</td>
<td align="center"><?php echo $row_np['remarks'] ?></td>
</tr>
<?php
++$count;
}
}
?>
</tbody>
</table>
</div>
</div>
<div class="space-10"></div>
<div class="panel panel-default">
<div class="panel-heading">
MEDICLAIM FOR DISEASES NOT COVERED
</div>
<div class="panel-body">
<table class="table table-bordered table-hover"
id="mediclaim_diseases_not_covered">
<tbody>
<tr>
<th style="text-align:center">financial year</th>
<th style="text-align:center">NON-PAYABLE MEDICLAIM LIMIT</th>
<th style="text-align:center">UTILIZED AMOUNT</th>
<th style="text-align:center">BALANCE</th>
<th style="text-align:center">REMARKS</th>
</tr>
<?php
$count = 0;
$sql_md = "select * from mediclaim_disease_not_covered where emp_id=$emp_id ";
$result_md = @mysqli_query($conn, $sql_md);
$no_of_rows = mysqli_num_rows($result_md);
if ($no_of_rows > 0) {
?>
<input type="hidden" name="rowCount" id="rowCount"
value="<?php echo $no_of_rows; ?>" />
<?php } else { ?>
<input type="hidden" name="rowCount" id="rowCount" value="1" />
<?php
}
?>
<?php
if ($no_of_rows > 0) {
while ($row_md = @mysqli_fetch_array($result_md)) {
?>
<tr id="mediclaim_diseases_not_covered<?php echo $count; ?>">
<td align="center"><?php echo $row_md['financial_year'] ?></td>
<td align="center"><?php echo $row_md['nonpay_medclaim_limit'] ?>
</td>
<td align="center">
<?php echo $row_md['utilized_amount'] ?>
</td>
<td align="center"><?php echo $row_md['balance'] ?></td>
<td align="center"><?php echo $row_md['remarks'] ?></td>
</tr>
<?php
++$count;
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- End Of Family Members -->
<!-- vaccination tab start -->
<div id="vac" class="tab-pane">
<div class="row">
<div class="space"></div>
<h4 class="header blue bolder smaller">Vaccination Details</h4>
<div class="space"></div>
<!-- <div class="box box-primary"
style="padding: 10px; margin: 2px 0px 50px 5px; width: 99.5%; "> -->
<form id="ambulance_form" method="post">
<!-- box-body-->
<div class="box-body">
<div class="row">
<div class="col-sm-12">
<table id="myTable" class="table table-bordered order-list">
<thead>
<tr>
<th>S.No.</th>
<th>Vaccine Name</th>
<th>1st Dose</th>
<th>2nd Dose</th>
<th>3rd Dose</th>
<th>Remarks</th>
</tr>
</thead>
<?php $i = 0;
$s_no = 1;
$row = null;
$sql = "select * from vaccination_details where emp_id=" . $_REQUEST['emp_id'] . "";
//echo $sql;
error_log("query vaccination_details: " . $sql);
$result = @mysqli_query($conn, $sql);
$num_rows = @mysqli_num_rows($result);
$row = @mysqli_fetch_array($result);
do {
?>
<tbody>
<tr>
<td style="width:2%">
<input type="hidden" name="vac_id<?php echo $i ?>"
id="vac_id<?php echo $i ?>"
value="<?php echo $row['id'] ?>" />
<div class="input-group">
<label><?php echo $s_no; ?></label>
</div>
</td>
<td style="width:8%">
<?php echo getFieldFromTable('vaccine_name', 'vaccine_master', 'id', $row['vac_id']) ?>
</td>
<td style="width:8%">
<?php echo $row['vac_d1'] ?>
</td>
<td style="width:8%">
<?php echo $row['vac_d2'] ?>
</td>
<td style="width:8%">
<?php echo $row['vac_d3'] ?>
</td>
<td style="width:14%"><?php echo $row['remarks'] ?></td>
<?php
if ($i == 0) {
?>
<?php
} else {
?>
<td align="center"><a href="#" class="btn-lg"
data-toggle="tooltip" id="deletebtn"
title="Delete"><span
class="glyphicon glyphicon-trash"></span></a>
</td>
<?php
}
// $j =$j+1 ;
?>
</tr>
<?php
$i++;
$s_no++;
} while ($row = @mysqli_fetch_array($result)) //end of while
?>
<input type="hidden" name="count_items" id="count_items"
value="<?php echo $i ?>" />
<input type="hidden" name="s_no" id="s_no"
value="<?php echo $s_no ?>" />
</tbody>
<tfoot>
<tr>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- End box-body-->
<!--box-footer-->
<!--End box-footer-->
</form>
</div>
</div>
<!-- vaccination tab end -->
<!-- Start of contact -->
<div id="contacts" class="tab-pane">
<div class="row">
<div class="space"></div>
<h4 class="header blue bolder smaller">Contact</h4>
<div class="profile-user-info profile-user-info-striped">
<div class="profile-info-row">
<div class="profile-info-name" style="width:20%;text-align: center">Email
</div>
<div class="profile-info-value" style="text-align: center">
<span><?php echo $email_id ?></span>
</div>
<div class="profile-info-name" style="width:20%;text-align: center">Personal
Phone </div>
<div class="profile-info-value" style="text-align: center">
<span><?php echo $personal_phone ?></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="space"></div>
<h4 class="header blue bolder smaller">Emergency Contact</h4>
<div class="profile-user-info profile-user-info-striped">
<div class="profile-info-row">
<div class="profile-info-name" style="width:20%;text-align: center">Primary
Contact Person </div>
<div class="profile-info-value" style="text-align: center">
<span><?php echo $primary_contact_person ?></span>
</div>
<div class="profile-info-name" style="width:20%;text-align: center">Primary
Contact No </div>
<div class="profile-info-value" style="text-align: center">
<span><?php echo $primary_contact_no ?></span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name" style="width:20%;text-align: center">Primary
Contact Person </div>
<div class="profile-info-value" style="text-align: center">
<span><?php echo $secondary_contact_person ?></span>
</div>
<div class="profile-info-name" style="width:20%;text-align: center">Primary
Contact No </div>
<div class="profile-info-value" style="text-align: center">
<span><?php echo $secondary_contact_no ?></span>
</div>
</div>
</div>
</div>
</div>
<!-- End of contact -->
<!--Start OF Health Risk -->
<div id="edit-password" class="tab-pane">
<div class="space-12"></div>
<div class="panel panel-default">
<div class="panel-heading">
Known Health Advices And Health Risks
</div>
<div class="panel-body">
<table class="table table-bordered table-hover" id="health_advices_and_risks">
<tbody>
<tr>
<th style="text-align:center" width="50%">Known Health Advices</th>
<th style="text-align:center" width="50%">Known Health Risks</th>
</tr>
<tr>
<td align="center"><?php
$advices = explode(",", trim($row['known_health_advices'], ','));
// echo $advices;
$str_advices = '';
for ($i = 0; $i < count($advices); $i++) {
if ($i == 0)
$str_advices .= getTableFieldValue('health_advice', 'health_advice_name', 'health_advice_id', $advices[$i], '');
else
$str_advices .= ',' . getTableFieldValue('health_advice', 'health_advice_name', 'health_advice_id', $advices[$i], '');
}
echo $str_advices;
?></td>
<td align="center">
<?php
$risks = explode(",", trim($row['known_health_risks'], ','));
// echo $advices;
$str_risks = '';
for ($i = 0; $i < count($risks); $i++) {
if ($i == 0)
$str_risks .= getTableFieldValue('health_risk', 'health_risk_name', 'health_risk_id', $risks[$i], '');
else
$str_risks .= ',' . getTableFieldValue('health_risk', 'health_risk_name', 'health_risk_id', $risks[$i], '');
}
echo $str_risks;
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- End OF Health Risk -->
<!-- Start OF Medical Examination -->
<div id="medicalExaminationHistroy" class=" tab-pane">
<div class="table-responsive" align='center' style=" text-align: center; width: 90%;">
<h4 style="font-size: 15px; text-align: center; font-weight: bold">Medical
Examination History</h4>
<table class="table table-bordered" style="width: 100%">
<thead>
<tr align="center">
<th style="text-align:center">S.No.</th>
<th style="text-align:center">Medical Examination Type</th>
<th style="text-align:center">Medical Examination Date</th>
<th style="text-align:center">Review By Doctor</th>
<th style="text-align:center"></th>
</tr>
</thead>
<tbody>
<?php
$count = 1;
$emp_id = "";
$sql_for_medical_examination = "select * from medical_examination where patient_id=" . $_REQUEST['emp_id'] . " ";
//echo $sql_for_medical_examination;
$result_for_medical_examination = mysqli_query($conn, $sql_for_medical_examination);
while ($row_for_medical_examination = mysqli_fetch_assoc($result_for_medical_examination)) { ?>
<tr>
<td align="center"><?php echo $count; ?>
</td>
<td align="center"><?php
if ($row_for_medical_examination['task'] == 'pme')
echo "Periodic Medical Examination";
else if ($row_for_medical_examination['task'] == 'ame_below_40')
echo "BELOW 40 YEARS";
else if ($row_for_medical_examination['task'] == 'ame_greater_40')
echo "ABOVE 40 YEARS";
else if ($row_for_medical_examination['task'] == 'ime_long')
echo "Long Term";
else if ($row_for_medical_examination['task'] == 'ime_short')
echo "Short Term";
?>
</td>
<td align="center">
<?php echo strtoupper(date_format(date_create($row_for_medical_examination['approval_date']), "d-M-Y ")); ?>
</td>
<td align="center"><?php
$emp_id = getTableFieldValue('tbl_users', 'emp_id', 'user_id', $row_for_medical_examination['modified_by']);
echo getTableFieldValue('patient_master', 'patient_name', 'id', $emp_id); ?>
</td>
<td align="center"><?php
if ($row_for_medical_examination['task'] == 'pme')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_medical_pdf('open_pme_pdf.php','" . $row_for_medical_examination['medical_exam_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
else if ($row_for_medical_examination['task'] == 'ame_below_40')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_medical_pdf('ame_below_40_years.php','" . $row_for_medical_examination['medical_exam_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
else if ($row_for_medical_examination['task'] == 'ame_greater_40')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_medical_pdf('open_patient_physical_parameters_pdf.php','" . $row_for_medical_examination['medical_exam_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
else if ($row_for_medical_examination['task'] == 'ime_long')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_medical_pdf('open_ime_long_term_pdf.php','" . $row_for_medical_examination['medical_exam_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
else if ($row_for_medical_examination['task'] == 'ime_short')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_medical_pdf('initial_medical_examination_short_term_pdf.php','" . $row_for_medical_examination['medical_exam_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
?>
</td>
<tr>
<?php $count++;
}
?>
</tbody>
</table>
</div>
</div>
<!-- End OF Medical Examination -->
<!-- Start of Past Illnes -->
<div id="pastAndPresentIllness" class=" tab-pane">
<div class="table-responsive" align='center' text-align: center; width: 90%;">
<h4 style="font-size: 15px; text-align: center; font-weight: bold">Past And Present
Illness History
</h4>
<table class="table table-bordered" style="width: 100%">
<thead>
<tr align="center">
<th style="text-align:center">Past And Present Illness</th>
<th style="text-align:center">Regular Medication</th>
<th style="text-align:center">Present Complain</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<?php
$array_past_illnes = array();
$sql_for_medical_examination = "select * from medical_examination where patient_id=" . $_REQUEST['emp_id'] . "";
$result_for_medical_examination1 = mysqli_query($conn, $sql_for_medical_examination);
while ($row_for_medical_examination1 = mysqli_fetch_assoc($result_for_medical_examination1)) {
//echo $row_for_medical_examination1[past_present_illness];
$past_present_illness = explode(",", $row_for_medical_examination1['past_present_illness']);
// print_r(array_merge($array_past_illnes,$past_present_illness));
$regular_medication = $row_for_medical_examination1['regular_medication'];
$present_complaint = $row_for_medical_examination1['present_complaint'];
$array_past_illnes = array_merge(array_values($array_past_illnes), array_values($past_present_illness));
}
foreach ($array_past_illnes as $value) {
echo getTableFieldValue('history_parameter', 'param_name', 'param_id', $value) . ',';
}
?>
</td>
<td>
<?php echo $regular_medication; ?>
</td>
<td>
<?php echo $present_complaint; ?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!--End Past Illnes -->
<!--Start Questionnaire -->
<div id="questionnaire" class=" tab-pane">
<?php include('questionnaire_include.php'); ?>
</div>
<!--End Questionnaire -->
<div id="opdandinjury" class=" tab-pane">
<div class="table-responsive" align='center' text-align: center; width: 90%;">
<h4 style="font-size: 15px; text-align: center; font-weight: bold">OPD AND INJURY
</h4>
<table class="table table-bordered" style="width: 100%">
<thead>
<tr>
<th style="text-align:center">Sr No</th>
<th style="text-align:center">OPD/Injury</th>
<th style="text-align:center">Appointment Date</th>
<th style="text-align:center">Attended Doctor</th>
<th style="text-align:center"></th>
</tr>
</thead>
<?php $count = 1;
$sql_for_employee_appointment = "select * from employee_appointment where emp_id=" . $_REQUEST['emp_id'] . " ";
//$sql_for_employee_appointment=" SELECT * FROM employee_appointment WHERE EMP_ID='337' ";
//echo $sql_for_employee_appointment;
$result_for_employee_appointment = mysqli_query($conn, $sql_for_employee_appointment);
while ($row_for_employee_appointment = mysqli_fetch_assoc($result_for_employee_appointment)) { ?>
<tr>
<td align="center"><?php echo $count; ?>
</td>
<td align="center"><?php
if ($row_for_employee_appointment['appointment_type'] == 'O')
echo "OPD";
else if ($row_for_employee_appointment['appointment_type'] == 'I')
echo "INJURY";
?>
</td>
<td align="center">
<?php echo strtoupper(date_format(date_create($row_for_employee_appointment['appointment_date']), "d-M-Y ")); ?>
</td>
<td align="center"><?php
$emp_id = getTableFieldValue('tbl_users', 'emp_id', 'user_id', $row_for_employee_appointment['doctor_last_attended']);
echo getTableFieldValue('patient_master', 'patient_name', 'id', $emp_id); ?>
</td>
<td align="center"><?php
if ($row_for_employee_appointment['appointment_type'] == 'O')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_appointment_pdf('opd_form_pdf.php','" . $row_for_employee_appointment['appointment_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
else if ($row_for_employee_appointment['appointment_type'] == 'I')
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_appointment_pdf('injury_form_pdf.php','" . $row_for_employee_appointment['appointment_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
?>
</td>
<tr>
<?php $count++;
}
?>
</tbody>
</table>
</div>
</div>
<!-- End of Past Illnes -->
<div id="sickness" class=" tab-pane">
<div class="table-responsive" align='center' text-align: center; width: 90%;">
<h4 style="font-size: 15px; text-align: center; font-weight: bold">Sickness
</h4>
<table class="table table-bordered" style="width: 100%">
<thead>
<tr>
<th style="text-align:center">Sr No</th>
<th style="text-align:center">sicknes Date</th>
<th style="text-align:center">Ailment Name</th>
<th style="text-align:center">Attended Doctor</th>
<th style="text-align:center"></th>
</tr>
</thead>
<?php $count = 1;
$sql_for_sickness = "select * from sickness where emp_id=" . $_REQUEST['emp_id'] . " ";
//echo $sql_for_sickness;
$result_for_sickness = mysqli_query($conn, $sql_for_sickness);
while ($row_for_sickness = mysqli_fetch_assoc($result_for_sickness)) { ?>
<tr>
<td align="center"><?php echo $count; ?>
</td>
<td align="center">
<?php echo strtoupper(date_format(date_create($row_for_sickness['sickness_date']), "d-M-Y ")); ?>
</td>
<td align="center">
<?php echo getTableFieldValue('ailment', 'ailment_name', 'ailment_id', $row_for_sickness['ailment_name']); ?>
</td>
<td align="center">
<?php
//$emp_sickness_id=getTableFieldValue('tbl_users','emp_id','user_id',$row_for_sickness['doctor_last_attended']);
echo getTableFieldValue('patient_master', 'patient_name', 'id', $row_for_sickness['doctor_last_attended']); ?>
</td>
<td align="center">
<?php
echo "<a href=\"#\"><i class=\"fa fa-file-pdf-o\" onclick=\"open_pdf_fitness('fitness_certificate_pdf.php','" . $row_for_sickness['sickness_id'] . "')\" style=\"font-size: 20px;\"></i></a>";
?>
</td>
<tr>
<?php $count++;
}
?>
</tbody>
</table>
</div>
</div>
<div id="uploadDocs" class=" tab-pane">
<?php
$docs_select_query = "select * from employee_docs where emp_id=" . $_REQUEST['emp_id'] . " ";
//echo $docs_select_query;
$docs_result = @mysqli_query($conn, $docs_select_query);
$no_of_docs = @mysqli_num_rows($docs_result);
?>
<div class="table-responsive" align='center' text-align: center; width: 90%;">
<h4 style="font-size: 15px; text-align: center; font-weight: bold">Uploaded
Documents</h4>
<table class="table table-bordered" style="width: 100%">
<thead>
<tr>
<th style="text-align:center">S.No.</th>
<th style="text-align:center">Document Name</th>
<th style="text-align:center">Uploaded Date</th>
<th style="text-align:center">Download link</th>
<th style="text-align:center">Edit/Delete</th>
</tr>
</thead>
<?php if ($no_of_docs == 0) { ?>
<tr>
<td align='center' colspan='5'>No Files Found</td>
</tr>
<?php } ?>
<?php
$count = 0;
while ($row_docs = mysqli_fetch_array($docs_result)) {
?>
<tr>
<td align="center"><?php echo $count + 1 ?>
</td>
<td align="center"><?php echo $row_docs['doc_name'] ?>
</td>
<td align="center">
<?php echo date("d-F-Y", filemtime('files/' . $thelist[$count])) ?>
</td>
<?php
echo '<td align="center"><a href="data:image/jpeg;base64,' . base64_encode($row_docs['document']) . '" download><span
class="glyphicon glyphicon-download-alt"></span></a></td>';
?>
<!-- <td align="center" >&nbsp;<a
href="" download><span
class="glyphicon glyphicon-download-alt"></span></a></td> -->
<td align="center">&nbsp;<a href="#"
onclick="deletedocs(<?php echo $row_docs['doc_id'] ?>);"><span
class="glyphicon glyphicon-trash"></span> </a>
</td>
</tr>
<?php $count++;
} ?>
<tr>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
<!-- /.page-content -->
</div>
<!-- /.main-content -->
</div>
<!-- page specific plugin scripts -->
<!--[if lte IE 8]>
<script src="assets/js/excanvas.min.js"></script>
<![endif]-->
<script src="assets/js/jquery-ui.custom.min.js"></script>
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
<script src="assets/js/jquery.gritter.min.js"></script>
<script src="assets/js/bootbox.js"></script>
<script src="assets/js/jquery.easypiechart.min.js"></script>
<script src="assets/js/bootstrap-datepicker.min.js"></script>
<script src="assets/js/jquery.hotkeys.index.min.js"></script>
<script src="assets/js/bootstrap-wysiwyg.min.js"></script>
<script src="assets/js/select2.min.js"></script>
<script src="assets/js/spinbox.min.js"></script>
<script src="assets/js/bootstrap-editable.min.js"></script>
<script src="assets/js/ace-editable.min.js"></script>
<script src="assets/js/jquery.maskedinput.min.js"></script>
<!-- ace scripts -->
<script src="assets/js/ace-elements.min.js"></script>
<script src="assets/js/ace.min.js"></script>
<?php include('techsyn_footer.php'); ?>
<?php include('common_ace.php'); ?>
<script>
function addHealthAdvicesAndRisksRow() {
var table = document.getElementById("health_advices_and_risks");
var rowCount = table.rows.length;
var newRow = table.insertRow(rowCount);
var health_advices =
"<?php echo generateOption('health_advice', 'health_advice_name', 'health_advice_id', '', ''); ?>"
var health_risks = "<?php echo generateOption(' health_risk', 'health_risk_name', 'health_risk_id', '', ''); ?>"
var content = ""
content +=
"<td><select multiple=\"\" name=\"known_health_advices[]\" id=\"known_health_advices\" class=\"chosen-select form-control\">"
//content+="<option value=\"\"> </option>";
content += health_advices;
content += "</select></td>"
content +=
"<td><select multiple=\"\" id=\"known_health_risks\" name=\"known_health_risks[]\" class=\"chosen-select form-control\">"
// content+="<option value=\"\"> </option>";
content += health_risks;
content += "</select></td>"
$(newRow).append(content);
$('#known_health_advices').chosen({
allow_single_deselect: true
});
$('#known_health_advices').next().css({
'width': '100%'
});
$('#known_health_risks').chosen({
allow_single_deselect: true
});
$('#known_health_risks').next().css({
'width': '100%'
});
var heath_advice_array = <?php echo json_encode($advices) ?>;
var element = document.getElementById('known_health_advices');
for (var i = 0; i < element.options.length; i++) {
element.options[i].selected = heath_advice_array.indexOf(element.options[i].value) >= 0;
}
$('#known_health_advices').trigger('chosen:updated');
var heath_risk_array = <?php echo json_encode($risks) ?>;
var element1 = document.getElementById('known_health_risks');
for (var i = 0; i < element1.options.length; i++) {
element1.options[i].selected = heath_risk_array.indexOf(element1.options[i].value) >= 0;
}
$('#known_health_risks').trigger('chosen:updated');
}
function addFamilyMembersRow() {
var count = parseInt($("#rowCount").val());
var table = document.getElementById("familyMembersTable");
var rowCount = table.rows.length;
var newRow = table.insertRow(rowCount);
var content = "";
content += "<td>" + (count + 1) + "</td>" +
"<td><input type=\"text\" name=\"name" + count + "\" id=\"name" + count +
"\" class=\"form-control\"/></td>" +
"<td><input type=\"number\" id=\"age" + count + "\" name=\"age" + count +
"\" class=\"form-control\"/></td>" +
"<td><select class=\"form-control\" name=\"gender" + count + "\" id=\"gender" + count + "\">" +
"<option selected disabled>--Select Gender</option>" +
" <option value=\"M\">Male</option>" +
" <option value=\"F\">Female</option>" +
" <option value=\"O\">Others</option>"
+
"</select></td><td><input type=\"text\" class=\"form-control\" name=\"relation_type" + count +
"\" id=\"relation_type" + count + "\" /></td>" +
"<td><a href=\"#\" onclick=\"deleteFamilyMembersRow(" + count +
")\"><span class=\"glyphicon glyphicon-trash\"></span> </a></td>"
$(newRow).append(content);
$(newRow).attr("id", "familyMembersTableRow" + count);
$("#rowCount").val(++count);
}
function deleteFamilyMembersRow(count) {
$("#familyMembersTableRow" + count).remove();
$("#rowCount").val(count);
}
function myDateFormater(myDate) {
var d = new Date(myDate);
var m = d.getMonth() + 1;
var y = d.getFullYear();
var date = d.getDate();
// alert(date+"/"+m+"/"+y);
return date + "/" + m + "/" + y;
}
$(document).ready(function(e) {
$("#employee_form").on('submit', function(e) {
e.preventDefault();
$.ajax({
type: 'POST',
url: 'save_employee.php',
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
// $('.submitBtn').attr("disabled","disabled");
//$('#fupForm').css("opacity",".5");
},
success: function(msg) {
var emp_id = JSON.parse(msg);
BootstrapDialog.alert('Employee Saved Successfully.');
$("#flex1").flexReload();
$("#employee_id").val(emp_id);
$('.close').click();
return;
},
error: function(data) {
BootstrapDialog.alert('Error Saving Employee');
$('.close').click();
return;
}
});
});
});
function save_employee() {
var fname = $('#fname').val();
if (fname == '') {
BootstrapDialog.alert('Please Enter First Name.!!!');
return false;
}
var lname = $('#lname').val();
if (lname == '') {
BootstrapDialog.alert('Please Enter Last Name.!!!');
return false;
}
var fathername = $('#father_name').val();
if (fathername == '') {
BootstrapDialog.alert('Please Enter Father Name.!!!');
return false;
}
var dob = $('#dob').val();
if (dob == '') {
BootstrapDialog.alert('Please Enter DOB.!!!');
return false;
}
var doj = $('#doj').val();
if (doj == '') {
BootstrapDialog.alert('Please Enter DOJ.!!!');
return false;
}
var designationid = $('#designationid').val();
if (designationid == '') {
BootstrapDialog.alert('Please Enter Designation Id.!!!');
return false;
}
var emp_code = $('#emp_code').val();
if (emp_code == '') {
BootstrapDialog.alert('Please Enter Employee Code.!!!');
return false;
}
var emp_type_id = $('#emp_type_id').val();
if (emp_type_id == '') {
BootstrapDialog.alert('Please Enter Employee Type Id.!!!');
return false;
}
var bu_id = $('#bu_id').val();
if (bu_id == '') {
BootstrapDialog.alert('Please Enter Bu Id.!!!');
return false;
}
var sbu_id = $('#sbu_id').val();
if (sbu_id == '') {
BootstrapDialog.alert('Please Enter SBU Id.!!!');
return false;
}
var section_id = $('#section_id').val();
if (section_id == '') {
BootstrapDialog.alert('Please Enter Section Id.!!!');
return false;
}
var sub_section_id = $('#sub_section_id').val();
if (sub_section_id == '') {
BootstrapDialog.alert('Please Enter Sub Section Id.!!!');
return false;
}
var mgr_emp_id = $('#mgr_emp_id').val();
if (mgr_emp_id == '') {
BootstrapDialog.alert('Please Enter Manager.!!!');
return false;
}
var gender = $('#gender').val();
if (gender == '') {
BootstrapDialog.alert('Please Select Gender.!!!');
return false;
}
var address = $('#address').val();
if (address == '') {
BootstrapDialog.alert('Please Enter Address.!!!');
return false;
}
var primary_phone = $('#primary_phone').val();
if (primary_phone == '') {
BootstrapDialog.alert('Please Enter Phone No.!!!');
return false;
}
var email = $('#email').val();
if (email == '') {
BootstrapDialog.alert('Please Enter Email.!!!');
return false;
}
var aadhar_no = $('#aadhar_no').val();
if (aadhar_no == '') {
BootstrapDialog.alert('Please Aadhar No.!!!');
return false;
}
var blood_group = $('#blood_group').val();
if (blood_group == '') {
BootstrapDialog.alert('Please Select Blood Group.!!!');
return false;
}
$("#employee_form").submit();
/* $.ajax({
type: 'POST',
url: 'save_employee.php',
data:$("#employee_form").serialize(),
success: function(msg){
BootstrapDialog.alert('Employee Saved Successfully.');
$("#flex1").flexReload();
$('.close').click();
return;
},
error : function(data) {
BootstrapDialog.alert('Error Saving Employee');
$('.close').click();
return;
}
}); */
}
$('#doj').datepicker({
autoclose: true,
format: 'dd/mm/yyyy',
startDate: '1d/1m/2000y',
endDate: 'current',
todayHighlight: true,
}).next().on(ace.click_event, function() {
$(this).prev().focus();
});
$('#dob').datepicker({
autoclose: true,
format: 'dd/mm/yyyy',
startDate: '1d/1m/1970y',
}).next().on(ace.click_event, function() {
$(this).prev().focus();
});
function open_medical_pdf(page, medical_exam_id) {
$("#medical_exam_id").val(medical_exam_id);
$("#flex_medical_form_pdf").attr('method', 'POST');
$("#flex_medical_form_pdf").attr('action', page);
$("#flex_medical_form_pdf").submit();
}
function open_appointment_pdf(page, appointtment_id) {
$("#appointment_id_pdf").val(appointtment_id);
$("#flex_opd_injury_pdf").attr('method', 'POST');
$("#flex_opd_injury_pdf").attr('action', page);
$("#flex_opd_injury_pdf").submit();
}
function open_pdf_fitness(page, sickness_id) {
$("#flex_sickness_id").val(sickness_id);
$("#flex_sickness_pdf").attr('method', 'POST');
$("#flex_sickness_pdf").attr('action', page);
$("#flex_sickness_pdf").submit();
}
function printDiv(divName) {
$("#update_button").hide();
$("#printPageButton").hide();
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
$("#printPageButton").show();
$("#update_button").show();
}
</script>
<form style="display: none" name="flex_medical_form_pdf" method="post" action="" target="_blank"
id="flex_medical_form_pdf">
<input type="hidden" name="medical_exam_id" id="medical_exam_id">
</form>
<form style="display: none" name="flex_opd_injury_pdf" method="post" action="" target="_blank"
id="flex_opd_injury_pdf">
<input type="hidden" name="appointment_id_pdf" id="appointment_id_pdf">
</form>
<form style="display: none" name="flex_sickness_pdf" method="post" action="" target="_blank" id="flex_sickness_pdf">
<input type="hidden" name="flex_sickness_id" id="flex_sickness_id">
</form>