432 lines
15 KiB
PHP
432 lines
15 KiB
PHP
|
<?php include('techsyn_header.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>
|
||
|
<?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="#">Patient List</li><li class="active">OPD/Injury List</li>
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<!-- End of breadcrumb -->
|
||
|
|
||
|
|
||
|
<div>
|
||
|
|
||
|
<form name="f1" method="post" id="flex_appointment_form" action="">
|
||
|
<div id="flex1" style="width:100%">
|
||
|
<input type="hidden" name="flex_employee_appointment_id" id="flex_employee_appointment_id"/>
|
||
|
</div>
|
||
|
|
||
|
</form>
|
||
|
|
||
|
<form name="export_form" method="post" id="export_form" action="">
|
||
|
<input type="hidden" name="flex_employee_appointment_id" id="flex_employee_appointment_id"/>
|
||
|
<input type="hidden" name="pdf_action" id="pdf_action" value="pdf_emp_appointment_list.php"/>
|
||
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_emp_appointment_list.php"/>
|
||
|
</form>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</div><!-- /.page-content -->
|
||
|
</div>
|
||
|
</div><!-- /.main-content -->
|
||
|
|
||
|
<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>
|
||
|
<style>
|
||
|
.emergency{
|
||
|
background-color:red;
|
||
|
}
|
||
|
.injury{
|
||
|
background-color:red;
|
||
|
}
|
||
|
</style>
|
||
|
<script type="text/javascript">
|
||
|
$(function() {
|
||
|
var w=screen.width*.90;
|
||
|
var h =$(".main-content").height()+100;
|
||
|
$("#flex1").flexigrid({
|
||
|
url: 'employee_appointment_history_list_script.php',
|
||
|
dataType: 'json',
|
||
|
colModel : [
|
||
|
{display: 'Sr', name : 'count', width : w*.02, sortable : false, align: 'left'},
|
||
|
{display: 'Id', name : 'appointment_id', width : w*.02, sortable : true, align: 'left'},
|
||
|
|
||
|
{display: 'Date', name : 'appointment_date', width : w*.1, sortable : true, align: 'left'},
|
||
|
{display: 'Emp Code ', name : '', width : w*.05, sortable : true, align: 'left'},
|
||
|
{display: 'Employee Name', name : '', width : w*.07, sortable : true, align: 'left'},
|
||
|
|
||
|
|
||
|
{display: 'Complaints', name : 'complaints', width : w*.1, sortable : true, align: 'left'},
|
||
|
{display: 'Examination Findings', name : 'examination_remarks', width : w*.1, sortable : true, align: 'left'},
|
||
|
{display: 'Diagnosis', name : 'ailment_ids', width : w*.1, sortable : true, align: 'left'},
|
||
|
{display: 'Treatments', name : 'hospital_treatment', width : w*.15, sortable : true, align: 'left'},
|
||
|
{display: 'Referral', name : 'referral', width : w*.05, sortable : true, align: 'left'},
|
||
|
{display: 'Follow-up', name : 'followup', width : w*.05, sortable : true, align: 'left'},
|
||
|
{display: 'Emergency', name : 'IsEmergency', width : w*.05, sortable : true, align: 'left'},
|
||
|
{display: 'Injury', name : 'appointment_type', width : w*.05, sortable : true, align: 'left'},
|
||
|
{display: 'Check-Up Results', name : 'followup', width : w*.05, sortable : false, align: 'left'},
|
||
|
{display: 'Remarks', name : 'remarks', width : w*.05, sortable : true, align: 'left'},
|
||
|
|
||
|
{display: '', name : 'link', width : w*.07, sortable : false, align: 'left'}
|
||
|
],
|
||
|
buttons : [
|
||
|
|
||
|
|
||
|
{name: 'PDF', bclass: 'print', onpress : pdf},
|
||
|
{separator: true},
|
||
|
{name: 'Excel', bclass: 'print_excel', onpress : excel},
|
||
|
{separator: true}
|
||
|
],
|
||
|
searchitems : [
|
||
|
{display: 'Appointment Id', name : 'appointment_id',isdefault: true},
|
||
|
{display: 'Employee Code', name : 'emp_code'},
|
||
|
{display: 'Patient First Name', name : 'fname' },
|
||
|
{display: 'Patient Last Name', name : 'lname' },
|
||
|
{display: 'DOB', name : 'dob'},
|
||
|
{display: 'DOJ', name : 'doj'},
|
||
|
{display: 'Designation', name : 'designation_id'},
|
||
|
{display: 'Employment Type', name : 'emp_type_id'},
|
||
|
{display: 'Section', name : 'section_id'},
|
||
|
{display: 'Sub Section', name : 'sub_section_id'},
|
||
|
{display: 'Blood Group', name : 'blood_group'},
|
||
|
{display: 'Aadhar Number', name : 'aadhar_no'},
|
||
|
{display: 'Phone Number', name : 'primary_phone'},
|
||
|
{display: 'Email', name : 'email_id'},
|
||
|
|
||
|
],
|
||
|
sortname: "appointment_id",
|
||
|
sortorder: "desc",
|
||
|
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 pdf(){
|
||
|
window.open('ajax_pdf.php','OPD-Injury List');
|
||
|
}
|
||
|
function excel(){
|
||
|
window.open('ajax_excel.php','OPD-Injury List');
|
||
|
}
|
||
|
|
||
|
|
||
|
function delete_employee_appointment_history(appointmnentId){
|
||
|
$("#flex_employee_appointment_id").val(appointmnentId);
|
||
|
|
||
|
BootstrapDialog.confirm('Are you sure to delete?', function(result){
|
||
|
if(result) {
|
||
|
$.ajax({
|
||
|
url : 'delete_appointment_emp.php',
|
||
|
type : "POST",
|
||
|
data : $("#flex_appointment_form").serialize(),
|
||
|
success : function(data) {
|
||
|
if(data.indexOf("SUCCESS")!=-1){
|
||
|
BootstrapDialog.alert('Deleted Successfully.');
|
||
|
$("#flex1").flexReload();
|
||
|
//loadAppointmentHistory('<?php echo $_REQUEST['flex_opd_id']?>');
|
||
|
|
||
|
}else{
|
||
|
BootstrapDialog.alert('Error Deleting');
|
||
|
}
|
||
|
return;
|
||
|
},
|
||
|
error : function(data) {
|
||
|
BootstrapDialog.alert('Error Deleting');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
var appointment_id = "";
|
||
|
function open_employee_appointment(appointmentId,appointment_type, action) {
|
||
|
var pagekey="<?php echo $_REQUEST['pagekey']?>"
|
||
|
if(appointment_type=="O"){
|
||
|
|
||
|
window.location = 'employee_appointment_form.php?appointmentId='+appointmentId+'&returnPage=appointment_list.php?pagekey='+pagekey+' ';
|
||
|
}else if(appointment_type=="I"){
|
||
|
window.location = 'employee_injury_form.php?appointmentId='+appointmentId+'&returnPage=appointment_list.php?pagekey='+pagekey+' ';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<script>
|
||
|
|
||
|
jQuery(function($) {
|
||
|
//initiate dataTables plugin
|
||
|
var myTable =
|
||
|
$('#dynamic-table')
|
||
|
//.wrap("<div class='dataTables_borderWrap' />") //if you are applying horizontal scrolling (sScrollX)
|
||
|
.DataTable( {
|
||
|
bAutoWidth: false,
|
||
|
"aoColumns": [
|
||
|
{ "bSortable": false },
|
||
|
null, null,null, null, null,
|
||
|
{ "bSortable": false }
|
||
|
],
|
||
|
"aaSorting": [],
|
||
|
|
||
|
|
||
|
//"bProcessing": true,
|
||
|
//"bServerSide": true,
|
||
|
//"sAjaxSource": "http://127.0.0.1/table.php" ,
|
||
|
|
||
|
//,
|
||
|
//"sScrollY": "200px",
|
||
|
//"bPaginate": false,
|
||
|
|
||
|
//"sScrollX": "100%",
|
||
|
//"sScrollXInner": "120%",
|
||
|
//"bScrollCollapse": true,
|
||
|
//Note: if you are applying horizontal scrolling (sScrollX) on a ".table-bordered"
|
||
|
//you may want to wrap the table inside a "div.dataTables_borderWrap" element
|
||
|
|
||
|
//"iDisplayLength": 50
|
||
|
|
||
|
|
||
|
select: {
|
||
|
style: 'multi'
|
||
|
}
|
||
|
} );
|
||
|
|
||
|
|
||
|
|
||
|
//style the message box
|
||
|
var defaultCopyAction = myTable.button(1).action();
|
||
|
myTable.button(1).action(function (e, dt, button, config) {
|
||
|
defaultCopyAction(e, dt, button, config);
|
||
|
$('.dt-button-info').addClass('gritter-item-wrapper gritter-info gritter-center white');
|
||
|
});
|
||
|
|
||
|
|
||
|
var defaultColvisAction = myTable.button(0).action();
|
||
|
myTable.button(0).action(function (e, dt, button, config) {
|
||
|
|
||
|
defaultColvisAction(e, dt, button, config);
|
||
|
|
||
|
|
||
|
if($('.dt-button-collection > .dropdown-menu').length == 0) {
|
||
|
$('.dt-button-collection')
|
||
|
.wrapInner('<ul class="dropdown-menu dropdown-light dropdown-caret dropdown-caret" />')
|
||
|
.find('a').attr('href', '#').wrap("<li />")
|
||
|
}
|
||
|
$('.dt-button-collection').appendTo('.tableTools-container .dt-buttons')
|
||
|
});
|
||
|
|
||
|
////
|
||
|
|
||
|
setTimeout(function() {
|
||
|
$($('.tableTools-container')).find('a.dt-button').each(function() {
|
||
|
var div = $(this).find(' > div').first();
|
||
|
if(div.length == 1) div.tooltip({container: 'body', title: div.parent().text()});
|
||
|
else $(this).tooltip({container: 'body', title: $(this).text()});
|
||
|
});
|
||
|
}, 500);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
myTable.on( 'select', function ( e, dt, type, index ) {
|
||
|
if ( type === 'row' ) {
|
||
|
$( myTable.row( index ).node() ).find('input:checkbox').prop('checked', true);
|
||
|
}
|
||
|
} );
|
||
|
myTable.on( 'deselect', function ( e, dt, type, index ) {
|
||
|
if ( type === 'row' ) {
|
||
|
$( myTable.row( index ).node() ).find('input:checkbox').prop('checked', false);
|
||
|
}
|
||
|
} );
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/////////////////////////////////
|
||
|
//table checkboxes
|
||
|
$('th input[type=checkbox], td input[type=checkbox]').prop('checked', false);
|
||
|
|
||
|
//select/deselect all rows according to table header checkbox
|
||
|
$('#dynamic-table > thead > tr > th input[type=checkbox], #dynamic-table_wrapper input[type=checkbox]').eq(0).on('click', function(){
|
||
|
var th_checked = this.checked;//checkbox inside "TH" table header
|
||
|
|
||
|
$('#dynamic-table').find('tbody > tr').each(function(){
|
||
|
var row = this;
|
||
|
if(th_checked) myTable.row(row).select();
|
||
|
else myTable.row(row).deselect();
|
||
|
});
|
||
|
});
|
||
|
|
||
|
//select/deselect a row when the checkbox is checked/unchecked
|
||
|
$('#dynamic-table').on('click', 'td input[type=checkbox]' , function(){
|
||
|
var row = $(this).closest('tr').get(0);
|
||
|
if(this.checked) myTable.row(row).deselect();
|
||
|
else myTable.row(row).select();
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
$(document).on('click', '#dynamic-table .dropdown-toggle', function(e) {
|
||
|
e.stopImmediatePropagation();
|
||
|
e.stopPropagation();
|
||
|
e.preventDefault();
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
//And for the first simple table, which doesn't have TableTools or dataTables
|
||
|
//select/deselect all rows according to table header checkbox
|
||
|
var active_class = 'active';
|
||
|
$('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){
|
||
|
var th_checked = this.checked;//checkbox inside "TH" table header
|
||
|
|
||
|
$(this).closest('table').find('tbody > tr').each(function(){
|
||
|
var row = this;
|
||
|
if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true);
|
||
|
else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
//select/deselect a row when the checkbox is checked/unchecked
|
||
|
$('#simple-table').on('click', 'td input[type=checkbox]' , function(){
|
||
|
var $row = $(this).closest('tr');
|
||
|
if($row.is('.detail-row ')) return;
|
||
|
if(this.checked) $row.addClass(active_class);
|
||
|
else $row.removeClass(active_class);
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
/********************************/
|
||
|
//add tooltip for small view action buttons in dropdown menu
|
||
|
$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
|
||
|
|
||
|
//tooltip placement on right or left
|
||
|
function tooltip_placement(context, source) {
|
||
|
var $source = $(source);
|
||
|
var $parent = $source.closest('table')
|
||
|
var off1 = $parent.offset();
|
||
|
var w1 = $parent.width();
|
||
|
|
||
|
var off2 = $source.offset();
|
||
|
//var w2 = $source.width();
|
||
|
|
||
|
if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
|
||
|
return 'left';
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/***************/
|
||
|
$('.show-details-btn').on('click', function(e) {
|
||
|
e.preventDefault();
|
||
|
$(this).closest('tr').next().toggleClass('open');
|
||
|
$(this).find(ace.vars['.icon']).toggleClass('fa-angle-double-down').toggleClass('fa-angle-double-up');
|
||
|
});
|
||
|
/***************/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
//add horizontal scrollbars to a simple table
|
||
|
$('#simple-table').css({'width':'2000px', 'max-width': 'none'}).wrap('<div style="width: 1000px;" />').parent().ace_scroll(
|
||
|
{
|
||
|
horizontal: true,
|
||
|
styleClass: 'scroll-top scroll-dark scroll-visible',//show the scrollbars on top(default is bottom)
|
||
|
size: 2000,
|
||
|
mouseWheelLock: true
|
||
|
}
|
||
|
).css('padding-top', '12px');
|
||
|
*/
|
||
|
|
||
|
|
||
|
})
|
||
|
|
||
|
|
||
|
$('#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();
|
||
|
|
||
|
});
|
||
|
|
||
|
</script>
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
<?php include('common_ace.php'); ?>
|