949 lines
32 KiB
PHP
949 lines
32 KiB
PHP
<?php include('techsyn_header.php');
|
|
include('log_entry.php'); ?>
|
|
<!-- 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>
|
|
<style>
|
|
input[disabled] {
|
|
color: #848484 !important;
|
|
background-color: white !important;
|
|
border: none;
|
|
}
|
|
</style>
|
|
<?php include('techsyn_sidebar.php'); ?>
|
|
<!--breadcrumb-->
|
|
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
<li>
|
|
<i class="ace-icon fa fa-home home-icon"></i>
|
|
<a href="#">Home</a>
|
|
</li>
|
|
<li class="active"><a href="visitor_list.php">Visitor Examination</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
<?php
|
|
$id = ($_REQUEST['flex_opd_id'] != '' ? $_REQUEST['flex_opd_id'] : $_REQUEST['flex_patient_id']);
|
|
$query = "select * from visitor_patient_master where id = '" . $id . "' ";
|
|
//echo $query;
|
|
error_log("query: 11: " . $query);
|
|
if (!$result = @mysqli_query($conn, $query)) {
|
|
exit(error_log(mysqli_error($conn)));
|
|
} else {
|
|
$row = @mysqli_fetch_array($result);
|
|
@extract($row);
|
|
} ?>
|
|
<div class="box box-primary center" style="padding: 10px; margin: 2px 0px 50px 5px; width: 99.5%; ">
|
|
<form id="task_form" method="post">
|
|
<!-- box-body-->
|
|
<div class="box-body">
|
|
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<div class="input-group" style="text-align:left; white-space: nowrap;">
|
|
<span class="input-group-addon" style="padding:0; background-color:#fff; border:none">Visit Date </span>
|
|
<input id="emp_id" name="emp_id" type="hidden" value="<?= ($_REQUEST['flex_opd_id'] != '' ? $_REQUEST['flex_opd_id'] : $_REQUEST['flex_patient_id']) ?>" />
|
|
<input type="hidden" name="examinar_id" id="examinar_id">
|
|
<input id="appointment_date" type="text" class="form-control" name="appointment_date" /> <span class="input-group-addon"> <i class="fa fa-clock-o bigger-110" style="height: 5px; width: 10px"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<?php
|
|
//$ticket_no = getTableFieldValue('employee_appointment','max(appointment_id)');
|
|
$ticket_no = getVisitorTicketNo();
|
|
?>
|
|
<div class="input-group">
|
|
<label class="control-label" for="appointment_id"><strong style="font-size: 11px">Ticket No:</strong></label>
|
|
|
|
<input id="ticket_no" type="hidden" name="ticket_no" value="<?php echo $ticket_no; ?>" /> <input id="appointment_id" type="hidden" name="appointment_id" />
|
|
|
|
<?php echo $ticket_no; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<div class="input-group">
|
|
<label class="control-label" for="appointment_date"><strong style="font-size: 11px">Visitor: </strong></label>
|
|
<span class="visitor_details" id="visitor_details">
|
|
<?= getFieldFromTable("concat(patient_name,' S/O ',father_name)", 'visitor_patient_master', 'id', $_REQUEST['flex_patient_id']) ?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<label class="control-label" for="appointment_id"><strong style="font-size: 11px">Blood Group: </strong></label>
|
|
<span class="blood_group" id="blood_group"><?= $row['blood_group'] ?></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="appointment_id"><strong style="font-size: 11px">Gate Pass: </strong></label>
|
|
<span class="emp_code" id="emp_code"><?= $row['emp_code'] ?></span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<div class="input-group-addon" style="padding:0; border:0; background-color:#fff">
|
|
<label class="control-label" for="sbp"><strong style="font-size: 11px; text-align:left; white-space: nowrap; display:inline">Blood Pressure: </strong></label>
|
|
</div>
|
|
<input type="text" class="form-control" placeholder="SBP/DBP" id="sbp" name="sbp" style=" display:inline; ">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<div class="input-group-addon" style="padding:0; border:0; background-color:#fff">
|
|
<label class="control-label" for="heart_rate"><strong style="font-size: 11px; text-align:left; white-space: nowrap; display:inline">Heart Rate: </strong></label>
|
|
</div>
|
|
<input type="number" class="form-control" id="heart_rate" name="heart_rate" placeholder="Heart Rate" min="0" max="200" data-max="3" style=" display:inline;">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<div class="input-group-addon" style="padding:0; border:0; background-color:#fff">
|
|
<label class="control-label" for="temperature"><strong style="font-size: 11px; text-align:left; white-space: nowrap; display:inline">Temperature: </strong></label>
|
|
</div>
|
|
<input type="number" min="0" max="1000" class="form-control" placeholder="Temperature" id="temperature" name="temperature" value="<?= $row['temperature'] ?>" data-max="3" style=" display:inline;">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<div class="input-group-addon" style="padding:0; border:0; background-color:#fff">
|
|
<label class="control-label" for="spo2_percent"><strong style="font-size: 11px; text-align:left; white-space: nowrap; display:inline">SpO2: </strong></label>
|
|
</div>
|
|
<input type="number" min="0" max="1000" class="form-control" id="spo2_percent" name="spo2_percent" placeholder="SPO2 %" value="<?= $row['spo2_percent'] ?>" data-max="3" style=" display:inline;">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<div class="input-group-addon" style="padding:0; border:0; background-color:#fff">
|
|
<label class="control-label" for="entry_med_epilepsy"><strong style="font-size: 11px; text-align:left; white-space: nowrap; display:inline">Epilepsy: </strong></label>
|
|
</div>
|
|
<select name="entry_med_epilepsy" id="entry_med_epilepsy" style="display:inline; width:90px">
|
|
<option value="yes">Yes</option>
|
|
<option value="no">No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-2">
|
|
<div class="input-group">
|
|
<div class="input-group-addon" style="padding:0; border:0; background-color:#fff">
|
|
<label class="control-label" for="entry_med_diabetes"><strong style="font-size: 11px; text-align:left; white-space: nowrap; display:inline">Diabetes: </strong></label>
|
|
</div>
|
|
<select name="entry_med_diabetes" id="entry_med_diabetes" style="display:inline; width:90px">
|
|
<option value="yes">Yes</option>
|
|
<option value="no">No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
<div class="row" style="text-align:left">
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral"><strong style="font-size: 11px">If you have any medical condition(s) or illness, please provide details:</strong></label>
|
|
<span style="float:right; display:inline;">
|
|
<label for="entry_med_ill">Yes</label>
|
|
<input type="radio" name="entry_med_ill" id="entry_med_ill_yes" style="width:20px; margin-right:20px" value="yes">
|
|
<label for="entry_med_ill">No</label>
|
|
<input type="radio" name="entry_med_ill" id="entry_med_ill_no" style="width:20px" value="no">
|
|
</span>
|
|
<textarea id="entry_med_ill_comment" name="entry_med_ill_comment" placeholder="If you have any medical condition(s) or illness, please provide details:" class="autosize-transition form-control" style="overflow: scroll; overflow-wrap: break-word;" rows="4" cols="8"></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral"><strong style="font-size: 11px">Do you have any allergies with Medicine or Chemical restrictions?</strong></label>
|
|
<span style="float:right; display:inline;">
|
|
<label for="entry_med_aller">Yes</label>
|
|
<input type="radio" name="entry_med_aller" id="entry_med_aller_yes" style="width:20px; margin-right:20px" value="yes">
|
|
<label for="entry_med_aller">No</label>
|
|
<input type="radio" name="entry_med_aller" id="entry_med_aller_no" style="width:20px" value="no">
|
|
</span>
|
|
<textarea id="entry_med_aller_comment" name="entry_med_aller_comment" placeholder="Do you have any allergies with Medicine or Chemical restrictions?" rows="4" cols="8" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
|
|
<div class="row" style="text-align:left">
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral"><strong style="font-size: 11px">Are you on any Medication at the moment?</strong></label>
|
|
<span style="float:right; display:inline;">
|
|
<label for="entry_med_medi">Yes</label>
|
|
<input type="radio" name="entry_med_medi" id="entry_med_medi_yes" style="width:20px; margin-right:20px" value="yes">
|
|
<label for="entry_med_medi">No</label>
|
|
<input type="radio" name="entry_med_medi" id="entry_med_medi_no" style="width:20px" value="no">
|
|
</span>
|
|
<textarea id="entry_med_medi_comment" name="entry_med_medi_comment" placeholder="Are you on any Medication at the moment?" class="autosize-transition form-control" style="overflow: scroll; overflow-wrap: break-word;" rows="4" cols="8"></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral"><strong style="font-size: 11px">Do you have any Open wound/ Rash / Skin Reactions on your body?</strong></label>
|
|
<span style="float:right; display:inline;">
|
|
<label for="entry_med_reac">Yes</label>
|
|
<input type="radio" name="entry_med_reac" id="entry_med_reac_yes" style="width:20px; margin-right:20px" value="yes">
|
|
<label for="entry_med_reac">No</label>
|
|
<input type="radio" name="entry_med_reac" id="entry_med_reac_no" style="width:20px" value="no">
|
|
</span>
|
|
<textarea id="entry_med_reac_comment" name="entry_med_reac_comment" placeholder="Do you have any Open wound/ Rash / Skin Reactions on your body?" rows="4" cols="8" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row" style="text-align:left">
|
|
<?php
|
|
$role = $_SESSION['RoleCode'];
|
|
if ($role == 'DOC') { ?>
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="remarks"><strong style="font-size: 11px">Approval</strong></label>
|
|
<span style="float:right; display:inline;">
|
|
<label for="entry_med_test">Fit For Entry</label>
|
|
<input type="radio" name="entry_med_test" id="entry_fit" style="width:20px; margin-right:20px" value="fit">
|
|
<label for="entry_med_test">Not Fit For Entry</label>
|
|
<input type="radio" name="entry_med_test" id="entry_unfit" style="width:20px" value="unfit">
|
|
</span>
|
|
<textarea id="remarks" name="remarks" placeholder="comments" rows="4" cols="8" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="reviewer_comment"><strong style="font-size: 11px">Doctor's Comments</strong></label>
|
|
<textarea id="reviewer_comment" name="reviewer_comment" placeholder="Doctor's Comments" rows="4" cols="8" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
|
|
<?php } else { ?>
|
|
|
|
<div class="col-sm-12">
|
|
<label class="control-label" for="remarks"><strong style="font-size: 11px">Approval</strong></label>
|
|
<span style="float:right; display:inline;">
|
|
<label for="entry_med_test">Fit For Entry</label>
|
|
<input type="radio" name="entry_med_test" id="entry_fit" style="width:20px; margin-right:20px" value="fit">
|
|
<label for="entry_med_test">Not Fit For Entry</label>
|
|
<input type="radio" name="entry_med_test" id="entry_unfit" style="width:20px" value="unfit">
|
|
</span>
|
|
<textarea id="remarks" name="remarks" placeholder="comments" rows="4" cols="8" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="space-12"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<!-- End box-body-->
|
|
<!--box-footer-->
|
|
<div class="box-footer" style="text-align: center;">
|
|
|
|
<?php $role_id = getFieldFromTable('role_id', 'tbl_users', 'user_id', $_SESSION['user_id']);
|
|
$role = getFieldFromTable('role_code', 'role_master', 'role_id', $role_id);
|
|
error_log("Role id: " . $role_id . " role is: " . $role . " session id: " . $_SESSION['user_id']);
|
|
if ($role != 'DOC') { ?>
|
|
<button class="btn btn-success" type="button" onclick="location.href = 'visitor_add_select_patient.php';">
|
|
<i class="ace-icon fa fa-plus-square-o bigger-110"></i>
|
|
New
|
|
</button>
|
|
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-primary" type="button" data-toggle="modal" data-target="#visitorHistoryModal" onclick="open_visitor_history();">
|
|
<i class="ace-icon fa fa-file-text-o bigger-110"></i>
|
|
History
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-info save_button" id="save_button" type="button" onclick="validate();">
|
|
<i class="ace-icon fa fa-floppy-o bigger-110"></i>
|
|
Save
|
|
</button>
|
|
|
|
|
|
<!-- <button class="btn btn-warning" type="reset">
|
|
<i class="ace-icon fa fa-undo bigger-110"></i>
|
|
Reset
|
|
</button>
|
|
-->
|
|
<button class="btn btn-danger" id="visitor_pdf" type="button" style="display:none" onclick="exporttopdf();">
|
|
<i class="ace-icon fa fa-file-pdf-o bigger-110"></i>
|
|
Entry Receipt
|
|
</button>
|
|
</div>
|
|
<!--End box-footer-->
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<form id="pdfform" target="_blank">
|
|
<input type="hidden" id="appointment_id_pdf" name="appointment_id_pdf">
|
|
</form>
|
|
|
|
<div class="modal fade" id="visitorHistoryModal" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
|
<h4 class="modal-title">Visitor History</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style=" width: 9%; ">Visit Date</th>
|
|
<th style=" width: 10%; ">Patient Name</th>
|
|
<th style=" width: 10%; ">Father's Name</th>
|
|
<th style=" width: 5%; ">Age</th>
|
|
<th style=" width: 6%; ">Gender</th>
|
|
<th style=" width: 6%; ">Ticket No.</th>
|
|
<th style=" width: 8%; ">Gate Pass</th>
|
|
<th style=" width: 7%; ">Approved</th>
|
|
<th style=" width: 13%; ">Remarks</th>
|
|
<th style=" width: 13%; ">Doctor's Remarks</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="modal_data">
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 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>
|
|
|
|
|
|
|
|
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content" style="margin-top: -47px">
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
<form name="f1" method="post" id="flex_appointment_form" action="pbio_medical_waste_generation_excel.php">
|
|
<div id="flex1" style="width:100%">
|
|
<input type="hidden" name="flex_patient_id" id="flex_patient_id" />
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="visitor_details_pdf.php" />
|
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_visitor_details.php" />
|
|
</form>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var w = screen.width * .90;
|
|
var h = 0;
|
|
h = (window.innerHeight - ($("#navbar").height() + $(".breadcrumbs").height())) * .75;
|
|
$("#flex1").flexigrid({
|
|
url: 'visitor_details_script.php',
|
|
dataType: 'json',
|
|
colModel: [{
|
|
display: '',
|
|
name: 'link',
|
|
width: w * .07,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Sr',
|
|
name: 'count',
|
|
width: w * .03,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Visit Date',
|
|
name: 'date_added',
|
|
width: w * .12,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Patient Name',
|
|
name: 'patient_name',
|
|
width: w * .13,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Father Name',
|
|
name: 'father_name',
|
|
width: w * .13,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Age',
|
|
name: 'age',
|
|
width: w * .04,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Gender',
|
|
name: 'gender',
|
|
width: w * .04,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Ticket No.',
|
|
name: 'ticket_no',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Gate Pass',
|
|
name: 'emp_code',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Mobile No.',
|
|
name: 'personal_phone',
|
|
width: w * .12,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Approved',
|
|
name: 'entry_med_test',
|
|
width: w * .13,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Remarks',
|
|
name: 'remarks',
|
|
width: w * .14,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Doctor Comment',
|
|
name: 'reviewer_comment',
|
|
width: w * .14,
|
|
sortable: true,
|
|
align: 'left'
|
|
}
|
|
],
|
|
buttons: [{
|
|
name: 'PDF',
|
|
bclass: 'print',
|
|
onpress: pdf
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
name: 'Excel',
|
|
bclass: 'print_excel',
|
|
onpress: excel
|
|
},
|
|
{
|
|
separator: true
|
|
}
|
|
],
|
|
searchitems: [{
|
|
display: 'Patient Name',
|
|
name: 'patient_name'
|
|
},
|
|
{
|
|
display: 'Father Name',
|
|
name: 'father_name'
|
|
},
|
|
{
|
|
display: 'Gender',
|
|
name: 'gender'
|
|
},
|
|
{
|
|
display: 'Ticket No.',
|
|
name: 'ticket_no'
|
|
},
|
|
{
|
|
display: 'Gate Pass',
|
|
name: 'emp_code'
|
|
},
|
|
{
|
|
display: 'Visit Date',
|
|
name: 'appointment_date',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Approved',
|
|
name: 'entry_med_test',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Mobile no.',
|
|
name: 'personal_phone',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Remarks.',
|
|
name: 'remarks',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Doc Comm.',
|
|
name: 'reviewer_comment',
|
|
isdefault: true
|
|
},
|
|
],
|
|
sortname: "appointment_date",
|
|
// sortname: "patient_name",
|
|
// sortname: "emp_Code",
|
|
// sortname: "ticket_no",
|
|
sortorder: "asc",
|
|
usepager: true, //pagination
|
|
//title:"Employee OPD",
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
// width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
|
|
// }
|
|
function delete_visitor_details(id) {
|
|
|
|
$.ajax({
|
|
url: 'delete_visitors_details.php',
|
|
data: {
|
|
id: id
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
|
|
if (data == 'SUCCESS') {
|
|
|
|
BootstrapDialog.alert('Visitor Details Deleted Successfully!');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error: Visitor Details Not Deleted!');
|
|
return;
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function exporttopdf() {
|
|
|
|
|
|
document.forms['pdfform'].action = "visitor_examination_certificate.php";
|
|
document.forms['pdfform'].method = "post";
|
|
document.forms['pdfform'].submit();
|
|
}
|
|
|
|
|
|
function show_save_button() {
|
|
$("#save_button").show()
|
|
$("#visitor_details_id").val("");
|
|
}
|
|
|
|
|
|
|
|
function open_visitor_history() {
|
|
var id = $("#emp_id").val();
|
|
$.ajax({
|
|
url: 'open_visitor_history.php',
|
|
data: {
|
|
id: id
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
|
|
$("#modal_data").empty();
|
|
content = "";
|
|
if (data.length > 0) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
content += "<tr><td>" + data[i].appointment_date + "</td><td>" + data[i].patient_name + "</td><td>" + data[i].father_name + "</td><td>" + data[i].dob + "</td><td>" + data[i].gender + "</td><td>" + data[i].token_no + "</td><td>" + data[i].emp_code + "</td><td>" + data[i].entry_med_test + "</td><td>" + data[i].remarks + "</td><td>" + data[i].reviewer_comment + "</td></tr>"
|
|
}
|
|
}
|
|
$("#modal_data").append(content);
|
|
},
|
|
|
|
});
|
|
}
|
|
|
|
|
|
|
|
function open_visitor_details(id, access) {
|
|
if (access == 'V') {
|
|
$("#save_button").hide()
|
|
} else if (access == 'E')
|
|
$("#save_button").show()
|
|
|
|
$.ajax({
|
|
url: 'select_visitor_details.php',
|
|
data: {
|
|
id: id
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
$("#emp_id").val(data.emp_id);
|
|
|
|
$("#emp_code").html(data.emp_code);
|
|
$("#ticket_no").html(data.ticket_no);
|
|
$("#spo2_percent").val(data.spo2_percent);
|
|
$("#remarks").val(data.remarks);
|
|
// $("#resume_duties_from").val(data.resumed_duties_from);
|
|
// positive_on_dt = datetime_formate(data.tested_positive_on);
|
|
var dt_array = [];
|
|
dt = data.appointment_date;
|
|
dt_array = dt.split(' ');
|
|
var appointment_date = date_slash_formate(dt_array[0]);
|
|
appointment_date = appointment_date + " " + dt_array[1];
|
|
$("#appointment_date").val(appointment_date);
|
|
$("#chest_examination").val(data.chest_examination);
|
|
$("#temperature").val(data.temperature);
|
|
$("#heart_rate").val(data.heart_rate);
|
|
$("#sbp").val(data.bp_sbp);
|
|
$("#dbp").val(data.bp_dbp);
|
|
$("#blood_group").html(data.blood_group);
|
|
$("#entry_med_test").val(data.entry_med_test);
|
|
$("#examinar_id").val(data.examinar_id);
|
|
$("#appointment_id").val(data.appointment_id);
|
|
if (data.gender == "M") {
|
|
$("#visitor_details").html(data.patient_name + " s/o " + data.father_name);
|
|
} else if (data.gender == "F") {
|
|
$("#visitor_details").html(data.patient_name + " d/o " + data.father_name);
|
|
}
|
|
if (data.entry_med_ill == "yes") {
|
|
document.getElementById("entry_med_ill_yes").checked = true;
|
|
} else if (data.entry_med_ill == "no") {
|
|
document.getElementById("entry_med_ill_no").checked = true;
|
|
}
|
|
$("#entry_med_ill_comment").val(data.entry_med_ill_comment);
|
|
if (data.entry_med_aller == "yes") {
|
|
document.getElementById("entry_med_aller_yes").checked = true;
|
|
} else if (data.entry_med_aller == "no") {
|
|
document.getElementById("entry_med_aller_no").checked = true;
|
|
}
|
|
$("#entry_med_aller_comment").val(data.entry_med_aller_comment);
|
|
if (data.entry_med_medi == "yes") {
|
|
document.getElementById("entry_med_medi_yes").checked = true;
|
|
} else if (data.entry_med_medi == "no") {
|
|
document.getElementById("entry_med_medi_no").checked = true;
|
|
}
|
|
$("#entry_med_medi_comment").val(data.entry_med_medi_comment);
|
|
if (data.entry_med_reac == "yes") {
|
|
document.getElementById("entry_med_reac_yes").checked = true;
|
|
} else if (data.entry_med_reac == "no") {
|
|
document.getElementById("entry_med_reac_no").checked = true;
|
|
}
|
|
$("#entry_med_reac_comment").val(data.entry_med_reac_comment);
|
|
if (data.entry_med_test == "fit") {
|
|
document.getElementById("entry_fit").checked = true;
|
|
} else if (data.entry_med_test == "unfit") {
|
|
document.getElementById("entry_unfit").checked = true;
|
|
}
|
|
$("#reviewer_comment").val(data.reviewer_comment);
|
|
$("#entry_med_diabetes").val(data.entry_med_diabetes);
|
|
$("#entry_med_epilepsy").val(data.entry_med_epilepsy);
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Populating Visitor Details');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
|
|
function datetime_formate(dt) {
|
|
dt = dt.split(' ');
|
|
dt = dt[0] + "T" + dt[1];
|
|
return dt;
|
|
}
|
|
|
|
function date_slash_formate(dt) {
|
|
dt = dt.split('-');
|
|
dt = dt[2] + "/" + dt[1] + "/" + dt[0];
|
|
return dt;
|
|
}
|
|
|
|
function pdf() {
|
|
window.open('ajax_pdf.php', 'Visitor Details');
|
|
}
|
|
|
|
function excel() {
|
|
window.open('ajax_excel.php', 'Visitor Details');
|
|
}
|
|
|
|
$("#new_button").on("click", function() {
|
|
$("appointment_id").val("");
|
|
});
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- End of page-content -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function validate() {
|
|
save();
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#modal-add-ailment {
|
|
overflow-y: scroll;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<script type="text/javascript">
|
|
function save() {
|
|
var bp_sbp = $('#bp_sbp').val();
|
|
if (bp_sbp == '') {
|
|
BootstrapDialog.alert('Please Enter BP Details.!!!');
|
|
return false;
|
|
}
|
|
var temperature = $('#temperature').val();
|
|
if (temperature == '') {
|
|
BootstrapDialog.alert('Please Enter temperature.!!!');
|
|
return false;
|
|
}
|
|
var visitor_details = $('#emp_id').val();
|
|
// alert(visitor_details);
|
|
if (visitor_details == '') {
|
|
BootstrapDialog.alert('Please Select Visitor first.!!!');
|
|
return false;
|
|
}
|
|
var remarks = $('#remarks').val();
|
|
if (remarks == '') {
|
|
BootstrapDialog.alert('Please Enter Remarks.!!!');
|
|
return false;
|
|
}
|
|
var entry_med_test = $('#entry_med_test').val();
|
|
if (entry_med_test == '') {
|
|
BootstrapDialog.alert('Please Enter Aadhar No.!!!');
|
|
return false;
|
|
}
|
|
var chest_examination = $('#chest_examination').val();
|
|
if (chest_examination == '') {
|
|
BootstrapDialog.alert('Please Enter Chest Examination Details.!!!');
|
|
return false;
|
|
}
|
|
var heart_rate = $('#heart_rate').val();
|
|
if (heart_rate == '') {
|
|
BootstrapDialog.alert('Enter valid Heart Rate !!!');
|
|
return false;
|
|
}
|
|
var spo2_percent = $('#spo2_percent').val();
|
|
if (spo2_percent == '') {
|
|
BootstrapDialog.alert('Enter valid SPO2 Value !!!');
|
|
return false;
|
|
}
|
|
|
|
$.ajax({
|
|
url: 'visitors_save_opd.php ',
|
|
type: "POST",
|
|
data: $("#task_form").serialize(),
|
|
success: function(data) {
|
|
// alert(data);
|
|
var data = $.parseJSON(data);
|
|
$("#visitor_pdf").show();
|
|
$("#appointment_id_pdf").val(data.appointment_id);
|
|
$("")
|
|
BootstrapDialog.alert('Visitor\'s Details Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Visitor\'s Details!');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
// location.href="procurement_list.php";
|
|
}
|
|
$('.date-picker').datepicker({
|
|
autoclose: true,
|
|
format: 'dd/mm/yyyy'
|
|
}).next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
$("#heart_rate").change(function(e) {
|
|
e.preventDefault();
|
|
var keyObj = $("#heart_rate");
|
|
var maxLength = parseInt(keyObj.attr('data-max'));
|
|
if ((keyObj).val().length > maxLength) {
|
|
BootstrapDialog.alert("Enter valid Heart Rate !!!");
|
|
$(this).val('');
|
|
return false;
|
|
}
|
|
});
|
|
$("#temperature").change(function(e) {
|
|
e.preventDefault();
|
|
var keyObj = $("#temperature");
|
|
var maxLength = parseInt(keyObj.attr('data-max'));
|
|
if ((keyObj).val().length > maxLength) {
|
|
BootstrapDialog.alert("Enter valid Temperature !!!");
|
|
$(this).val('');
|
|
return false;
|
|
}
|
|
});
|
|
$("#spo2_percent").change(function(e) {
|
|
e.preventDefault();
|
|
var keyObj = $("#spo2_percent");
|
|
var maxLength = parseInt(keyObj.attr('data-max'));
|
|
if ((keyObj).val().length > maxLength) {
|
|
BootstrapDialog.alert("Enter valid SPO2 Value !!!");
|
|
$(this).val('');
|
|
return false;
|
|
}
|
|
});
|
|
</script>
|
|
<!-- bootstrap & fontawesome -->
|
|
<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/chosen.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datetimepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />
|
|
<script type="text/javascript" src="js/typeahead.bundle.js"></script>
|
|
<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/chosen.jquery.min.js"></script>
|
|
<script src="assets/js/spinbox.min.js"></script>
|
|
<script src="assets/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-timepicker.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
|
|
<script src="assets/js/dataTables.buttons.min.js"></script>
|
|
<script src="assets/js/buttons.flash.min.js"></script>
|
|
<script src="assets/js/buttons.html5.min.js"></script>
|
|
<script src="assets/js/buttons.print.min.js"></script>
|
|
<script src="assets/js/buttons.colVis.min.js"></script>
|
|
<script src="assets/js/dataTables.select.min.js"></script>
|
|
|
|
|
|
<script src="assets/js/moment.min.js"></script>
|
|
<script src="assets/js/daterangepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
|
|
<script src="assets/js/jquery.knob.min.js"></script>
|
|
<script src="assets/js/autosize.min.js"></script>
|
|
<script src="assets/js/jquery.inputlimiter.min.js"></script>
|
|
<script src="assets/js/jquery.maskedinput.min.js"></script>
|
|
<script src="assets/js/bootstrap-tag.min.js"></script>
|
|
<script src="assets/js/ace-elements.min.js"></script>
|