116 lines
4.3 KiB
PHP
116 lines
4.3 KiB
PHP
<script>
|
|
function validate(){
|
|
var cat_name = $('#cat_name').val();
|
|
if(cat_name == ''){
|
|
BootstrapDialog.alert('Please Enter Category Name.!!!');
|
|
return false;
|
|
}
|
|
var remarks = $('#remarks').val();
|
|
if(remarks == ''){
|
|
BootstrapDialog.alert('Please Enter Remarks.!!!');
|
|
return false;
|
|
}
|
|
|
|
var status = $('#status').val();
|
|
if(status == ''){
|
|
BootstrapDialog.alert('Please Enter Status.!!!');
|
|
return false;
|
|
}
|
|
|
|
|
|
save_category();
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" id="modal-add-consultation" role="dialog" aria-hidden="true">
|
|
<form role="form" id="treatment_form" name="treatment_form" action="#" method="post">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="widget-header">
|
|
<h5 class="widget-title"> Treatment Details</h5>
|
|
<div class="widget-toolbar">
|
|
<div class="widget-menu">
|
|
<a href="#" class="close" data-action="close" data-dismiss="modal">
|
|
<i class="ace-icon fa fa-times"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-body table-responsive ">
|
|
<p>Prescription</p>
|
|
<table id="treatmentTable<?php echo $row_history['appointment_id']?>" class="table table-bordered table-hover ">
|
|
<thead>
|
|
<tr class="active">
|
|
<th>Item</th>
|
|
<th>Dosages</th>
|
|
<th>For Days</th>
|
|
<th>Total Qty</th>
|
|
<th>Qty Given</th>
|
|
<th>Remarks</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr>
|
|
<td class="col-sm-2">
|
|
<select class="chosen-select form-control" id="treatment_item<?php echo $tCount?>"name="treatment_item<?php echo $tCount?>" data-placeholder="Treatment..." style="display: none;">
|
|
<option value=""> </option>
|
|
<?php echo generateOption('tbl_items','item_name','item_id',$row_history_treatment['item_id'],''); ?>
|
|
</select>
|
|
</td>
|
|
<td class="col-sm-2">
|
|
<select class="chosen-select form-control" id="treatment_item_dosage<?php echo $tCount?>"name="treatment_item_dosage<?php echo $tCount?>" data-placeholder="Dosages..." style="display: none;">
|
|
<option value=""> </option>
|
|
<?php echo generateOption('medicine_frequency','medicine_frequency','frequency_id','',''); ?>
|
|
</select>
|
|
</td>
|
|
<td class="col-sm-2">
|
|
<input type="number" name="treatment_item_days<?php echo $tCount?>" id="treatment_item_days<?php echo $tCount?>" value="<?php echo $row_history_treatment['days']?>"/>
|
|
</td>
|
|
|
|
<td class="col-sm-1">
|
|
<input type="number" name="treatment_item_total<?php echo $tCount?>" id="treatment_item_total<?php echo $tCount?>" value="<?php echo $row_history_treatment['calclulated_qty']?>" />
|
|
</td>
|
|
|
|
<td class="col-sm-2">
|
|
<input type="number" name="treatment_item_qtygvn<?php echo $tCount?>" id="treatment_item_qtygvn<?php echo $tCount?>" value="<?php echo $row_history_treatment['given_qty']?>"/>
|
|
</td>
|
|
<td class="col-sm-2">
|
|
<input type="text" name="treatment_item_remarks<?php echo $tCount?>" id="treatment_item_remarks<?php echo $tCount?>" value="<?php echo $row_history_treatment['remarks']?>" />
|
|
</td>
|
|
<td class="col-sm-1"><a class="deleteRow"></a>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="8" style="text-align: left;">
|
|
<input type="button" class="btn btn-lg btn-block btn-success " id="addrow<?php echo $row_history['appointment_id']?>" value="Add Row" />
|
|
<input type="hidden" name="count_treatment_item" id="count_treatment_item<?php echo $row_history['appointment_id']?>" value="<?php echo $tCount?>" />
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="widget-toolbox padding-8 clearfix" >
|
|
<button type="button" class="btn btn-info btn-sm save_button" onclick="validate();"><i class="ace-icon fa fa-floppy-o bigger-110"></i>Save </button>
|
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="ace-icon fa fa-times bigger-110"></i>Cancel</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|