303 lines
11 KiB
PHP
Executable File
303 lines
11 KiB
PHP
Executable File
|
||
|
||
<div class="app-content content">
|
||
<section class="content-wrapper">
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<h3 class="font-weight-bold"><?php echo lang('Patient '); ?></h3>
|
||
</div>
|
||
|
||
<div class="col-md-6 no-print pull-right">
|
||
<a href="<?php echo base_url(); ?>referral/editReferal">
|
||
<div class="btn-group float-right">
|
||
<button id="" class="btn btn-info btn-min-width mr-1 mb-1">
|
||
<i class="fa fa-plus-circle"></i> <?php echo lang('Add New Referal'); ?>
|
||
</button>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<hr class="mt-0 mb-0" />
|
||
<div class="card-content collapse show">
|
||
<div class="card-body card-dashboard">
|
||
<div class="panel-body">
|
||
<div class="adv-table editable-table ">
|
||
<div class="space15"></div>
|
||
<table class="table table-striped table-bordered dom-jQuery-events" id="editable-sample" cellspacing="0" width="100%">
|
||
<thead>
|
||
<tr>
|
||
<th><?php echo lang('Sl.No'); ?></th>
|
||
<th><?php echo lang('Patient Id'); ?></th>
|
||
<th><?php echo lang('name'); ?></th>
|
||
<th><?php echo lang('Phone'); ?></th>
|
||
<th><?php echo lang('Status'); ?></th>
|
||
<th class="no-print"><?php echo lang('options'); ?></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
|
||
|
||
|
||
<!--main content end-->
|
||
<!--footer start-->
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- Add Nurse Modal-->
|
||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h4 class="modal-title"> <?php echo lang('Please choose an option'); ?> </h4>
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<a href="referral/addNewPatient?type=new" class="btn btn-primary btn">Add New Patient</a>
|
||
<a href="referral/addNewReferralPatient?type=referral" class="btn btn-primary btn">Referal Patient</a>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div><!-- /.modal-dialog -->
|
||
</div>
|
||
<!-- Add Accountant Modal-->
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- Edit Nurse Modal-->
|
||
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h4 class="modal-title"> <?php echo lang('edit_nurse'); ?> </h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<form role="form" id="editNurseForm" class="clearfix" action="nurse/addNew" method="post" enctype="multipart/form-data">
|
||
<div class="form-group">
|
||
<label for="exampleInputEmail1"><?php echo lang('name'); ?></label>
|
||
<input type="text" class="form-control" name="name" id="exampleInputEmail1" value='' placeholder="">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="exampleInputEmail1"><?php echo lang('email'); ?></label>
|
||
<input type="text" class="form-control" name="email" id="exampleInputEmail1" value='' placeholder="">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="exampleInputEmail1"><?php echo lang('password'); ?></label>
|
||
<input type="password" class="form-control" name="password" id="exampleInputEmail1" placeholder="********">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="exampleInputEmail1"><?php echo lang('address'); ?></label>
|
||
<input type="text" class="form-control" name="address" id="exampleInputEmail1" value='' placeholder="">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="exampleInputEmail1"><?php echo lang('phone'); ?></label>
|
||
<input type="text" class="form-control" name="phone" id="exampleInputEmail1" value='' placeholder="">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="exampleInputEmail1"><?php echo lang('image'); ?></label>
|
||
<input type="file" name="img_url">
|
||
</div>
|
||
|
||
<input type="hidden" name="id" value=''>
|
||
|
||
<div class="form-group col-md-12">
|
||
<button type="submit" name="submit" class="btn btn-info pull-right row"><?php echo lang('submit'); ?></button>
|
||
</div>
|
||
|
||
</form>
|
||
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div><!-- /.modal-dialog -->
|
||
</div>
|
||
<!-- Edit Event Modal-->
|
||
<?php
|
||
|
||
if(isset($_SESSION['new_patient'])){
|
||
?>
|
||
<script>
|
||
$(function(){
|
||
Swal.fire({
|
||
position: 'center',
|
||
icon: 'success',
|
||
title: 'Patient data successfully saved',
|
||
showConfirmButton: false,
|
||
timer: 2000
|
||
})
|
||
})
|
||
</script>
|
||
<?php
|
||
}
|
||
|
||
?>
|
||
|
||
<?php
|
||
|
||
if(isset($_SESSION['delete_patient'])){
|
||
?>
|
||
<script>
|
||
$(function(){
|
||
Swal.fire({
|
||
position: 'center',
|
||
icon: 'success',
|
||
title: 'Patient Deleted successfully',
|
||
showConfirmButton: false,
|
||
timer: 2000
|
||
})
|
||
})
|
||
</script>
|
||
<?php
|
||
}
|
||
|
||
?>
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function () {
|
||
$(".editbutton").click(function (e) {
|
||
e.preventDefault(e);
|
||
// Get the record's ID via attribute
|
||
var iid = $(this).attr('data-id');
|
||
$('#editNurseForm').trigger("reset");
|
||
$.ajax({
|
||
url: 'nurse/editNurseByJason?id=' + iid,
|
||
method: 'GET',
|
||
data: '',
|
||
dataType: 'json',
|
||
}).success(function (response) {
|
||
// Populate the form fields with the data returned from server
|
||
$('#editNurseForm').find('[name="id"]').val(response.nurse.id).end()
|
||
$('#editNurseForm').find('[name="name"]').val(response.nurse.name).end()
|
||
$('#editNurseForm').find('[name="password"]').val(response.nurse.password).end()
|
||
$('#editNurseForm').find('[name="email"]').val(response.nurse.email).end()
|
||
$('#editNurseForm').find('[name="address"]').val(response.nurse.address).end()
|
||
$('#editNurseForm').find('[name="phone"]').val(response.nurse.phone).end()
|
||
$('#myModal2').modal('show');
|
||
});
|
||
|
||
});
|
||
});
|
||
</script>
|
||
<script>
|
||
|
||
$(document).ready(function () {
|
||
var table = $('#editable-sample').DataTable({
|
||
responsive: true,
|
||
|
||
"processing": true,
|
||
"serverSide": true,
|
||
"searchable": true,
|
||
"ajax": {
|
||
url: "referral/getList",
|
||
type: 'POST',
|
||
data: {
|
||
'<?php echo $this->security->get_csrf_token_name(); ?>' : '<?php echo $this->security->get_csrf_hash(); ?>'
|
||
},
|
||
},
|
||
scroller: {
|
||
loadingIndicator: true
|
||
},
|
||
|
||
dom: "<'row'<'col-sm-5 data-table-pagelimit'l><'col-sm-6 data-table-search'f><'col-sm-1 text-center data-table-button-collection'B>>" +
|
||
"<'row'<'col-sm-12 data-table-body'tr>>" +
|
||
"<'row'<'col-sm-5 data-table-pagecountsummary'i><'col-sm-7 data-table-pagination'p>>",
|
||
buttons: [
|
||
{
|
||
extend: 'collection',
|
||
text: '...',
|
||
buttons: [
|
||
'copyHtml5',
|
||
'excelHtml5',
|
||
'csvHtml5',
|
||
'pdfHtml5',
|
||
{
|
||
extend: 'print',
|
||
exportOptions: {
|
||
columns: [0, 1, 2, 3, 4, 5, 6],
|
||
}
|
||
}
|
||
]
|
||
},
|
||
],
|
||
|
||
aLengthMenu: [
|
||
[10, 25, 50, 100, -1],
|
||
[10, 25, 50, 100, "All"]
|
||
],
|
||
iDisplayLength: 100,
|
||
"order": [[0, "desc"]],
|
||
|
||
"language": {
|
||
"lengthMenu": "_MENU_",
|
||
search: "_INPUT_",
|
||
"url": "common/assets/DataTables/languages/<?php echo $this->language; ?>.json"
|
||
}
|
||
});
|
||
table.buttons().container().appendTo('.custom_buttons');
|
||
});
|
||
|
||
$(document).ready(function () {
|
||
$(".flashmessage").delay(3000).fadeOut(100);
|
||
});
|
||
|
||
|
||
function validateConfirm(){
|
||
var r = confirm("Are you sure you want to delete?");
|
||
return r;
|
||
}
|
||
|
||
function changeStatus(_this){
|
||
$(_this).attr("value", _this.checked ? 1 : 0);
|
||
var rid = $(_this).attr('attrid');
|
||
var fldval = $(_this).val();
|
||
$.ajax('referral/statusChange', {
|
||
type: 'POST', // http method
|
||
data: { id: rid, val: fldval}, // data to submit
|
||
async: false,
|
||
success: function (data, status, xhr) {
|
||
// $('p').append('status: ' + status + ', data: ' + data);
|
||
|
||
|
||
|
||
},
|
||
error: function (jqXhr, textStatus, errorMessage) {
|
||
// $('p').append('Error' + errorMessage);
|
||
alert("error duc");
|
||
|
||
}
|
||
|
||
});
|
||
}
|
||
</script>
|
||
|
||
|
||
|