183 lines
4.9 KiB
PHP
183 lines
4.9 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 class="#">Data Setup</li><li class="#">Master</li><li class="active">Route of Administration</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<!-- End of breadcrumb -->
|
||
|
|
||
|
|
||
|
<div class="page-content">
|
||
|
<div id="flexigridDiv" class="table-responsive">
|
||
|
|
||
|
<form name="f1" method="post" action=""id="flex_form_patient">
|
||
|
<div id="flex1" style="width:100%">
|
||
|
</div>
|
||
|
<input type="hidden" name="flex_patient_id" id="flex_patient_id"/>
|
||
|
</form>
|
||
|
</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: 'dosage_category_list_script.php',
|
||
|
dataType: 'json',
|
||
|
colModel: [
|
||
|
{display: 'Sr', name: 'count', width: w*.04, sortable: false, align: 'left'},
|
||
|
{display: '', name: '', width: w*.1, sortable: false, align: 'left'},
|
||
|
{display: 'Route of Administration', name: 'dosage_category', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'Remarks', name: 'remarks', width: w*.2, sortable: true, align: 'left'},
|
||
|
|
||
|
|
||
|
],
|
||
|
buttons: [
|
||
|
|
||
|
{name: 'Add', bclass: 'add', onpress : add},
|
||
|
|
||
|
{separator: true},
|
||
|
|
||
|
],
|
||
|
searchitems: [
|
||
|
|
||
|
{display: 'Route of Administration', name: 'dosage_category', isdefault: true},
|
||
|
{display: 'Remarks', name: 'remarks'}
|
||
|
],
|
||
|
sortname: "dosage_category",
|
||
|
sortorder: "asc",
|
||
|
usepager: true, //pagination
|
||
|
|
||
|
useRp: true,
|
||
|
rp: 50, //records per page
|
||
|
showTableToggleBtn: false, //toggle button for the whole table
|
||
|
resizable: true,
|
||
|
//width: w,
|
||
|
height: h,
|
||
|
singleSelect: true
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
function add(){
|
||
|
$(".save_button").show();
|
||
|
$("#dosage_category_id").val("");
|
||
|
$("#dosage_category").val("");
|
||
|
|
||
|
$("#remarks").val("");
|
||
|
|
||
|
$('#modal-add-emp-cadre').modal("show");
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function save_dosage_category(){
|
||
|
|
||
|
$.ajax({
|
||
|
url : 'save_dosage_category.php',
|
||
|
type : "POST",
|
||
|
data : $("#emp-cadre_form").serialize(),
|
||
|
success : function(data) {
|
||
|
BootstrapDialog.alert('Route of Administration Saved Successfully.');
|
||
|
$("#flex1").flexReload();
|
||
|
return;
|
||
|
},
|
||
|
error : function(data) {
|
||
|
BootstrapDialog.alert('Error In Saving Route of Administration');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
$('.close').click();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function open_employee_cadre(dosage_category_id, action) {
|
||
|
|
||
|
|
||
|
if(action=="V"){
|
||
|
$(".save_button").hide();
|
||
|
|
||
|
}else{
|
||
|
$(".save_button").show();
|
||
|
}
|
||
|
$.ajax({
|
||
|
url : 'select_dosage_category.php',
|
||
|
type : 'POST',
|
||
|
data:{dosage_category_id:dosage_category_id},
|
||
|
dataType:'json',
|
||
|
success : function(data) {
|
||
|
|
||
|
$("#dosage_category_id").val(data.dosage_category_id);
|
||
|
$("#dosage_category").val(data.dosage_category);
|
||
|
|
||
|
$("#remarks").val(data.remarks);
|
||
|
|
||
|
|
||
|
|
||
|
$('#modal-add-emp-cadre').modal("show");
|
||
|
},
|
||
|
error : function(data) {
|
||
|
BootstrapDialog.alert('Error Populating Route of Administration');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function delete_dosage(dosage_category_id) {
|
||
|
$("#flex_patient_id").val(dosage_category_id);
|
||
|
|
||
|
BootstrapDialog.confirm('Are you sure to delete the Item?', function(result) {
|
||
|
if (result) {
|
||
|
$.ajax({
|
||
|
url: 'delete_dosage.php',
|
||
|
type: "POST",
|
||
|
data: $("#flex_form_patient").serialize(),
|
||
|
success: function(data) {
|
||
|
if (data.indexOf("SUCCESS") != -1) {
|
||
|
BootstrapDialog.alert('Item Deleted Successfully.');
|
||
|
$("#flex1").flexReload();
|
||
|
|
||
|
} else {
|
||
|
BootstrapDialog.alert('Error Deleting Item');
|
||
|
}
|
||
|
return;
|
||
|
},
|
||
|
error: function(data) {
|
||
|
BootstrapDialog.alert('Error Deleting Item');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
<?php include('form/dosage_category_form.php');?>
|