1788 lines
84 KiB
PHP
1788 lines
84 KiB
PHP
<!-- bootstrap & fontawesome -->
|
|
<?php
|
|
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING);
|
|
include('includes/config/config.php');
|
|
|
|
?>
|
|
<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" />
|
|
<link rel="stylesheet" href="adminlte/bower_components/bootstrap/less/type.less" />
|
|
<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>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$(".glyphicon").css("top", "");
|
|
|
|
});
|
|
|
|
function open_treatments(appointment_id) {
|
|
$('#modal-add-consultation').modal("show");
|
|
|
|
}
|
|
</script>
|
|
|
|
<form id="opd_form" method="post">
|
|
<div class="widget-box box box-success" id="opd_form_pdf">
|
|
<div class="widget-header" data-action="fullscreen">
|
|
<h5 class="widget-title">Employee OPD Visit > <?php echo $patient_name ?> <a target="_blank"
|
|
href="emp_dashboard.php?flex_patient_id=<?php echo $row1['emp_id'] ?>"><i style="font-size: 17px;"
|
|
class="glyphicon glyphicon-user"></i></a>
|
|
</h5>
|
|
<div class="widget-toolbar" style="float: right">
|
|
<div class="clearfix">
|
|
<div class="pull-right tableTools-container">
|
|
<div class="dt-buttons btn-overlap btn-group">
|
|
|
|
|
|
<a class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold"
|
|
id="forwardButton" tabindex="0" aria-controls="dynamic-table"
|
|
data-original-title="Send To Pharmacy" title="Save"><span><i
|
|
class="fa fa-save bigger-110 blue"></i> <span
|
|
class="hidden">Save</span></span></a>
|
|
|
|
<a id="hide" style="display:none"
|
|
class="dt-button buttons-print btn btn-white btn-primary btn-bold"
|
|
onclick="exporttopdf();" tabindex="0" aria-controls="dynamic-table"
|
|
data-original-title="Print" title="Print"><span><i
|
|
class="fa fa-print bigger-110 grey"></i> <span
|
|
class="hidden">Print</span></span></a>
|
|
|
|
|
|
<a class="dt-button buttons-print btn btn-white btn-primary btn-bold"
|
|
data-action="fullscreen" tabindex="0" aria-controls="dynamic-table"
|
|
data-original-title="Maximize" title="Maximize"><span><i
|
|
class="fa fa fa-expand bigger-110 grey"></i> <span
|
|
class="hidden">Maximize</span></span></a>
|
|
<input type="hidden" name="attendedStatus" id="attendedStatus"
|
|
value="<?php echo $__STATUS_RECEPTIONIST_ATTENDED ?>" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<div class="col-xs-12 table-responsive">
|
|
<div class="widget-box box box-danger">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<!-- <div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="isEmergency"><strong style="font-size: 11px">Emergency?</strong></label> <select class="form-control" id="isEmergency" name="isEmergency">
|
|
<option value="0" <?php if ($row['IsEmergency'] == 0) { ?> selected <?php } ?>>No</option>
|
|
<option value="1" <?php if ($row['IsEmergency'] == 1) { ?> selected <?php } ?>>Yes</option>
|
|
</select>
|
|
</div> -->
|
|
<!-- <div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Chargeable?</strong></label> <select class="form-control" id="isChargeable" name="isChargeable">
|
|
<option value="1" <?php if ($row['IsChargeable'] == 1) { ?> selected <?php } ?>>Yes</option>
|
|
<option value="0" <?php if ($row['IsChargeable'] == 0) { ?> selected <?php } ?>>No</option>
|
|
</select>
|
|
</div> -->
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Weight</strong></label>
|
|
<input type="number" class="form-control" placeholder="WEIGHT(kg)" id="weight" name="weight" onchange="calculateBMI()" value="<?php echo $row['weight'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Height</strong></label>
|
|
<input type="number" class="form-control" id="height" name="height" placeholder="HEIGHT (cms)" onchange="calculateBMI()" value="<?php echo $row['height'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">BMI</strong></label>
|
|
<input type="number" class="form-control" id="bmi" name="bmi" placeholder="BMI(KG/m2)" value="<?php echo $row['bmi'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">SBP</strong></label>
|
|
<input type="number" class="form-control" min="0" max="1000" placeholder="SBP" id="sbp" name="sbp" value="<?php echo $row['bp_sbp'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">DBP</strong></label>
|
|
<input type="number" class="form-control" id="DBP" name="dbp" placeholder="DBP" min="0" max="1000" value="<?php echo $row['bp_dbp'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Temperature</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" placeholder="Temp.(C)" id="temperature" name="temperature" value="<?php echo $row['temperature'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">R Rate</strong></label>
|
|
<input type="number" class="form-control" placeholder="Respiratory rate" id="resp_rate" name="resp_rate" value="<?php echo $row['respiratory_rate'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Heart Rate</strong></label>
|
|
<input type="number" class="form-control" id="heart_rate" name="heart_rate" placeholder="Heart Rate(BPM)" value="<?php echo $row['heart_rate'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Pulse</strong></label>
|
|
<input type="number" class="form-control" id="pulse_output" name="pulse_output" placeholder="Pulse" value="<?php echo $row['pulse_output'] ?>">
|
|
</div>
|
|
<!-- <div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">FBS</strong></label>
|
|
<input type="number" class="form-control" min="0" max="1000" placeholder="FBS" id="fbs" name="fbs" value="<?php echo $row['blood_sugar_fbs'] ?>">
|
|
</div> -->
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">SPO2</strong></label>
|
|
<input type="number" class="form-control" id="spo2_percent" name="spoc2_percent" placeholder="SPO2" value="<?php echo $row['spo2_percent'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-2" style="width:14%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">GC SCALE</strong></label>
|
|
<input type="number" class="form-control" id="glasgow_coma_scale" name="glasgow_coma_scale" placeholder="Glasgow coma scale" value="<?php echo $row['glasgow_coma_scale'] ?>" maxlength="10">
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
|
|
<div class="space-6"></div>
|
|
<div class="row"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-xs-12 table-responsive">
|
|
<div class="widget-box box box-warning">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="appointment_id"><strong
|
|
style="font-size: 11px">Medical Record No:</strong></label>
|
|
|
|
<?php
|
|
//$ticket_no = getTableFieldValue('employee_appointment','max(appointment_id)');
|
|
$ticket_no = creatingTicketNoOPD();
|
|
|
|
?>
|
|
<input id="ticket_no" type="hidden" name="ticket_no"
|
|
value="<?php echo $ticket_no; ?>" /> <input id="appointment_id"
|
|
type="hidden" name="appointment_id" />
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<?php echo $ticket_no; ?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="appointment_date"><strong
|
|
style="font-size: 11px">In Time</strong></label>
|
|
|
|
<div class="input-group">
|
|
<input id="emp_id" name="emp_id" type="hidden"
|
|
value="<?php echo ($_REQUEST['flex_opd_id'] != '' ? $_REQUEST['flex_opd_id'] : $_REQUEST['flex_patient_id']) ?>" />
|
|
<input id="appointment_type" name="appointment_type"
|
|
type="hidden" value="O" /> <input id="appointment_date"
|
|
type="text" style="height: 30px" class="form-control"
|
|
name="appointment_date" /> <span class="input-group-addon">
|
|
<i class="fa fa-clock-o bigger-110"
|
|
style="height: 5px; width: 30px"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class=" col-sm-2">
|
|
<label class="control-label" for="followup_to_opd"><strong
|
|
style="font-size: 11px">Case Type</strong></label>
|
|
|
|
|
|
<select class="form-control" id="case_type" name="case_type">
|
|
<option value="">None</option>
|
|
<?php echo generateOption('case_type','case_name','case_code','','') ?>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="shift_type">Shift
|
|
</label>
|
|
|
|
<select class="form-control select2" id="shift_type"
|
|
name="shift_type">
|
|
<option value="A">A</option>
|
|
<option value="B">B</option>
|
|
<option value="C">C</option>
|
|
<option value="G">G</option>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
<div class=" col-sm-3">
|
|
<label class="control-label" for="followup_to_opd"><strong
|
|
style="font-size: 11px">Follow-up To(if
|
|
Applicable)</strong></label>
|
|
|
|
<div class="input-group">
|
|
<select id="followup_to_opd" name="followup_to_opd">
|
|
<option value="">None</option>
|
|
<?php echo generateOptionWithWhereClause('employee_appointment', "CONCAT(ticket_no,' ',DATE_FORMAT(appointment_date,'%d-%b-%Y %l:%i %p '))", 'appointment_id', '', '', 'emp_id', ($_REQUEST['flex_opd_id'] != '' ? $_REQUEST['flex_opd_id'] : $_REQUEST['flex_patient_id'])); ?>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="form-field-8"><strong
|
|
style="font-size: 11px">Referred By</strong></label>
|
|
<br>
|
|
|
|
|
|
|
|
<select class="form-control" id="referred_by" name="referred_by">
|
|
<option value="" disabled selected>Please select an option
|
|
</option>
|
|
<?php echo generateOption('referred_by_master', 'referred_by', 'id', $row['referred_by'], '') ?>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
<?php
|
|
$complaint_config = getFieldFromTable('value', 'config', 'key_name', 'complaint_tag_switch');
|
|
error_log("complaints_config tag switch " . $complaint_config . " compare " . strcmp(strtolower($complaint_config), "false"));
|
|
if (!strcmp(strtolower($complaint_config), "false")) {
|
|
?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Complaints</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
<select class="form-control chosen-select" name="complaints[]" id="complaints" multiple value='<?= $row['complaints'] ?>'>
|
|
<?php echo generateOptionForMultipleActive('complaints', 'complaint', 'complaint_id', "", '') ?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<?php
|
|
} else { ?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Complaints</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
|
|
<input type="text" class="form-control" id="complaints" name="complaints" data-placeholder="Complaints" />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<?php } ?>
|
|
<?php
|
|
|
|
if ($_SESSION['RoleCode'] == $_SESSION['RoleCode']) {
|
|
?>
|
|
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="ailment"><strong
|
|
style="font-size: 11px">Remarks/Follow-up Investigation
|
|
Details</strong></label>
|
|
|
|
<textarea name="remarks_rece" rows="3" cols="8" id="remarks_rece"
|
|
placeholder="Remaks" class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
|
|
|
|
</div>
|
|
<input type="hidden" name="doctor_attended_flag"
|
|
id="doctor_attended_flag" value="N"> <input type="hidden"
|
|
name="medicine_disbursement" value="N">
|
|
</div>
|
|
|
|
<?php } else { ?>
|
|
<input type="hidden" name="doctor_attended_flag" id="doctor_attended_flag"
|
|
value="Y">
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="form-field-8"><strong
|
|
style="font-size: 11px">Examination Findings</strong></label>
|
|
|
|
<textarea rows="3" cols="8" class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"
|
|
id="examination_remarks" name="examination_remarks"
|
|
placeholder="On Examination Symptoms" maxlength="500"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="ailment"><strong
|
|
style="font-size: 11px">Diagnosis</strong></label>
|
|
<div class="input-group">
|
|
|
|
|
|
<select multiple="" class="chosen-select form-control" id="ailment"
|
|
name="ailment[]" data-placeholder="Ailments">
|
|
<?php echo generateOption('ailment', 'ailment_name', 'ailment_id', '', ''); ?>
|
|
</select>
|
|
<div class="input-group-btn">
|
|
<button type="button" onclick="add_diagnosis();">
|
|
<font size="2">New</font>
|
|
|
|
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="ailment_system"><strong
|
|
style="font-size: 11px">Ailment System</strong></label>
|
|
|
|
<div class="input-group">
|
|
<select multiple="" class="chosen-select form-control"
|
|
id="ailment_system" name="ailment_system[]"
|
|
data-placeholder="Choose a System...">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '', ''); ?>
|
|
</select>
|
|
<div class="input-group-btn">
|
|
<button type="button" onclick="add_Ailment_System();">
|
|
<font size="2">New</font>
|
|
|
|
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12 table-responsive">
|
|
<table id="treatmentTable<?php echo $row_history['appointment_id'] ?>"
|
|
class="table table-striped table-bordered ">
|
|
<thead>
|
|
<tr class="active" style="width: 100%">
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:25%">Medicine</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:25%">Dosage</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:20%">For Days</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:5%">Qty</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:5%">Price Per Unit</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:5%">Stock</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:5%">Issued</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:5%">Total Price</th>
|
|
<th style="font-size: 11px; text-align: center;"
|
|
style="width:5%">
|
|
<button type="button"
|
|
onclick="addRow('<?php echo $row_history['appointment_id'] ?>')"
|
|
class="btn btn-info btn-sm"
|
|
id="addrow<?php echo $row_history['appointment_id'] ?>">
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
</button>
|
|
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr style="width: 70%">
|
|
<td class="col-sm-2" style="width: 15%"><select
|
|
style="width: 25%"
|
|
class="chosen-select form-control"
|
|
onchange="getItemDetails(this.value,'current_stock<?php echo $row_history['appointment_id'] ?>_0','current_stock<?php echo $row_history['appointment_id'] ?>0','current_rate<?php echo $row_history['appointment_id'] ?>_0','current_rate<?php echo $row_history['appointment_id'] ?>0','<?php echo $row_history['appointment_id'] ?>_0', '0');"
|
|
id="treatment_item<?php echo $row_history['appointment_id'] ?>_0"
|
|
name="treatment_item0"
|
|
data-placeholder="Treatment...">
|
|
<option value=""></option>
|
|
<?php echo generateOption('tbl_items', 'item_name', 'item_id', '', ''); ?>";
|
|
</select></td>
|
|
<td class="col-sm-2" style="width: 15%"><select
|
|
class="chosen-select form-control"
|
|
id="treatment_item_dosage<?php echo $row_history['appointment_id'] ?>_0"
|
|
name="treatment_item_dosage0"
|
|
data-placeholder="Dosages..."
|
|
onchange="getFrequenceyQty(this.value,'frequency_qty<?php echo $row_history['appointment_id'] ?>_0','dosage<?php echo $row_history['appointment_id'] ?>_0','<?php echo $row_history['appointment_id'] ?>','0');">
|
|
<option value=""></option>
|
|
<?php echo generateOption('medicine_frequency', 'medicine_frequency', 'frequency_id', '', ''); ?>
|
|
</select></td>
|
|
<td class="col-sm-2" style="width: 5%"><input type="number"
|
|
style="height: 25px; font-size: 12px"
|
|
class="form-control" name="treatment_item_days0"
|
|
id="treatment_item_days<?php echo $row_history['appointment_id'] ?>_0"
|
|
value="1"
|
|
onblur="updateTotalMedicineQty('frequency_qty<?php echo $row_history['appointment_id'] ?>_0','treatment_item_days<?php echo $row_history['appointment_id'] ?>_0','treatment_item_total<?php echo $row_history['appointment_id'] ?>_0','treatment_item_total_div0')" />
|
|
</td>
|
|
|
|
<td class="col-sm-1" style="width: 5%"><input type="hidden"
|
|
name="frequency_qty0"
|
|
id="frequency_qty<?php echo $row_history['appointment_id'] ?>_0" />
|
|
<input type="hidden" name="dosage0"
|
|
id="dosage<?php echo $row_history['appointment_id'] ?>_0" />
|
|
|
|
|
|
<div style="text-align: center"
|
|
id="treatment_item_total_div<?php echo $row_history['appointment_id'] ?>0">
|
|
</div> <input type="hidden"
|
|
style="height: 25px; font-size: 12px"
|
|
class="form-control" name="treatment_item_total0"
|
|
id="treatment_item_total<?php echo $row_history['appointment_id'] ?>_0" />
|
|
</td>
|
|
|
|
<td class="col-sm-1" style="width: 5%">
|
|
<div style="text-align: center"
|
|
id="current_rate<?php echo $row_history['appointment_id'] ?>0">
|
|
</div> <input type="hidden"
|
|
style="height: 25px; font-size: 12px"
|
|
class="form-control" name="current_rate0"
|
|
id="current_rate<?php echo $row_history['appointment_id'] ?>_0" />
|
|
</td>
|
|
<td class="col-sm-1" style="width: 5%">
|
|
<div style="text-align: center"
|
|
id="current_stock<?php echo $row_history['appointment_id'] ?>0">
|
|
</div> <input type="hidden" name="current_stock0"
|
|
id="current_stock<?php echo $row_history['appointment_id'] ?>_0" />
|
|
|
|
</td>
|
|
|
|
<td class="col-sm-1" style="width: 5%"><input type="hidden"
|
|
name="treatment_id0" id="treatment_id_0" /><input
|
|
type="text" style="height: 25px; font-size: 12px"
|
|
class="form-control" name="treatment_item_qtygvn0"
|
|
id="treatment_item_qtygvn<?php echo $row_history['appointment_id'] ?>_0"
|
|
disabled
|
|
onchange="itemLevelTotol('treatment_item_qtygvn<?php echo $row_history['appointment_id'] ?>_0','current_rate<?php echo $row_history['appointment_id'] ?>_0','treatment_item_total_amount<?php echo $row_history['appointment_id'] ?>_0','treatment_item_total_amount<?php echo $row_history['appointment_id'] ?>0');checkQty() " />
|
|
</td>
|
|
|
|
<td class="col-sm-1" style="width: 5%">
|
|
<div style="text-align: center"
|
|
id="treatment_item_total_amount<?php echo $row_history['appointment_id'] ?>0">
|
|
</div>
|
|
<input type="hidden"
|
|
style="height: 25px; font-size: 12px"
|
|
class="form-control"
|
|
name="treatment_item_total_amount0"
|
|
id="treatment_item_total_amount<?php echo $row_history['appointment_id'] ?>_0" />
|
|
|
|
<td class="col-sm-1" style="width: 5%"><a
|
|
class="deleteRow"></a></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="7" style="text-align: right;"><strong
|
|
style="font-size: 11px"> Total Amount :<strong></td>
|
|
<td colspan="2"><input type="hidden"
|
|
name="count_treatment_item"
|
|
id="count_treatment_item" value="1" /><input
|
|
type="hidden" name="count_treatment_item_new"
|
|
id="count_treatment_item_new" value="1" /> <input
|
|
type="hidden"
|
|
style="height: 25px; font-size: 12px; width: 60px; align: center"
|
|
class="form-control" name="order_level_total"
|
|
id="order_level_total" />
|
|
<div id="order_level_total_div"
|
|
style="margin-left: 30px"></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class=" control-label " for="form-field-8"><strong
|
|
style="font-size: 11px">Medicine Disbursement</strong> </label>
|
|
</div>
|
|
<div class="col-sm-1">
|
|
<input type="radio" name="medicine_disbursement" value="Y"
|
|
onchange="setFieldDisableOrEnable(this.value)">
|
|
Yes<br>
|
|
</div>
|
|
<div class="col-sm-1">
|
|
<input type="radio" name="medicine_disbursement" value="N" checked
|
|
onchange="setFieldDisableOrEnable(this.value)">
|
|
No
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral"><strong
|
|
style="font-size: 11px">Referral</strong></label>
|
|
<textarea name="referral" rows="4" cols="8" id="referral"
|
|
placeholder="Referral" class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="followup"><strong
|
|
style="font-size: 11px">Follow-up</strong></label>
|
|
<textarea id="followup" rows="4" cols="8" name="followup"
|
|
placeholder="Follow Up" class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"></textarea>
|
|
</div>
|
|
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
<!-- /.col-xs-12 -->
|
|
</div>
|
|
<!--row end-->
|
|
|
|
</div>
|
|
<!--end of widget-main-->
|
|
</div>
|
|
<!--end of widget-body-->
|
|
</div>
|
|
<!--end of widget-box-->
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<form id="pdfform" target="_blank">
|
|
<input type="hidden" id="appointment_id_pdf" name="appointment_id_pdf">
|
|
</form>
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
$("#hide").hide();
|
|
});
|
|
|
|
function itemLevelTotol(treatment_item_qtygvn_field, current_rate_field, treatment_item_total_amount_field,
|
|
treatment_item_total_amount_field_div) {
|
|
var count = $("#count_treatment_item").val();
|
|
//alert(count);
|
|
var price = $("#" + current_rate_field).val();
|
|
var qty = $("#" + treatment_item_qtygvn_field).val();
|
|
var totalValue = price * qty;
|
|
///alert(totalValue);
|
|
$("#" + treatment_item_total_amount_field).val(totalValue);
|
|
document.getElementById(treatment_item_total_amount_field_div + "").innerText = totalValue;
|
|
|
|
orderLevelTotal(count);
|
|
}
|
|
|
|
function orderLevelTotal(count) {
|
|
var totalAmount = 0;
|
|
//totalAmount=totalAmount+parseInt(treatment_item_total_amount_field_value);
|
|
for (var i = 0; i < count; i++) {
|
|
if ($("#treatment_item_total_amount_" + i).val() == "" || $("#treatment_item_total_amount_" + i).val() ==
|
|
null) {
|
|
$("#treatment_item_total_amount_" + i).val(0);
|
|
}
|
|
totalAmount = totalAmount + parseInt($("#treatment_item_total_amount_" + i).val());
|
|
}
|
|
|
|
//alert(totalAmount);
|
|
$("#order_level_total").val(totalAmount);
|
|
|
|
document.getElementById("order_level_total_div").innerText = totalAmount;
|
|
|
|
|
|
|
|
}
|
|
|
|
function getBMI(height, weight) {
|
|
//var height=$("#"+heightField).val();
|
|
//var weight=$("#"+WeightField).val();
|
|
if (height != null && height != '' && weight != null && weight != '') {
|
|
height = parseFloat(height);
|
|
weight = parseFloat(weight);
|
|
if (height != 0.0)
|
|
var bmi = (weight / (height / 100 * height / 100));
|
|
return bmi.toFixed(1);
|
|
}
|
|
return "";
|
|
}
|
|
|
|
function calculateBMI() {
|
|
var height = $("#height").val();
|
|
var weight = $("#weight").val();
|
|
$("#bmi").val(getBMI(height, weight));
|
|
}
|
|
|
|
function save_appointment() {
|
|
// var comp= $("#complaints").val();
|
|
// alert(comp)
|
|
$.ajax({
|
|
url: 'save_opd.php',
|
|
type: "POST",
|
|
data: $("#opd_form").serialize(),
|
|
success: function(data) {
|
|
var data = $.parseJSON(data);
|
|
//alert(data);
|
|
if ($("#appointment_id").val() == "") {
|
|
var history_record = $("#history_record").text();
|
|
|
|
$('#history_record').text(parseInt(history_record) + 1);
|
|
}
|
|
if (data[0].appointment_id != null) {
|
|
$("#appointment_id").val(data[0].appointment_id);
|
|
$("#appointment_id_pdf").val(data[0].appointment_id);
|
|
}
|
|
if (data[1] != null && data[1] != "") {
|
|
for (var i = 0; i < data[1].length; i++) {
|
|
$("#treatment_id_" + i).val(data[1][i]);
|
|
}
|
|
|
|
}
|
|
$('#flex1').flexReload();
|
|
BootstrapDialog.alert('Details Saved Successfully.');
|
|
|
|
|
|
|
|
//loadAppointmentHistory('<?php echo $_REQUEST['flex_opd_id'] ?>');
|
|
//return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Details');
|
|
//return;
|
|
}
|
|
});
|
|
}
|
|
|
|
function getFrequenceyQty(frequency_id, qty_value_field_id, dosage_desc_field_id, appointment_id, counter) {
|
|
|
|
$.ajax({
|
|
url: 'select_frequency.php?frequency_id=' + frequency_id,
|
|
type: "GET",
|
|
//data : $("#"+formId).serialize(),
|
|
async: false,
|
|
success: function(data) {
|
|
var data = $.parseJSON(data);
|
|
//alert(data);
|
|
if (data.qty != null) {
|
|
$("#" + qty_value_field_id).val(data.qty);
|
|
$("#" + dosage_desc_field_id).val(data.frequency_description);
|
|
|
|
}
|
|
|
|
//BootstrapDialog.alert('Injury Details Updated Successfully.');
|
|
//location.reload();
|
|
//return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error pulling frequency qty');
|
|
return;
|
|
}
|
|
|
|
});
|
|
updateTotalMedicineQty('frequency_qty' + '_' + counter, 'treatment_item_days' + '_' + counter,
|
|
'treatment_item_total' + '_' + counter, 'treatment_item_total_div' + counter)
|
|
}
|
|
|
|
function setFieldDisableOrEnable(value) {
|
|
var count = $("#count_treatment_item").val();
|
|
if (value == 'Y') {
|
|
// $("[name='field07']").prop("disabled", false);
|
|
for (var i = 0; i < count; i++) {
|
|
$("#treatment_item_qtygvn_" + i).prop("disabled", false);
|
|
}
|
|
} else if (value == 'N') {
|
|
|
|
for (var i = 0; i < count; i++) {
|
|
$("#treatment_item_qtygvn_" + i).prop("disabled", true);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
function exporttopdf() {
|
|
|
|
|
|
document.forms['pdfform'].action = "opd_form_pdf.php";
|
|
document.forms['pdfform'].method = "post";
|
|
document.forms['pdfform'].submit();
|
|
}
|
|
|
|
function add_diagnosis() {
|
|
//$("#aligment-model").model("show");
|
|
$("#ailment_id").val("");
|
|
$("#ailment_name").val("");
|
|
$("#ailment_description").val("");
|
|
$("#ailment_code").val("");
|
|
|
|
$('#modal-add-ailment').modal({
|
|
show: 'true'
|
|
});
|
|
|
|
}
|
|
|
|
function add_Ailment_System() {
|
|
|
|
$("#ailment_system_name").val("");
|
|
$("#ailment_system_description").val("");
|
|
$("#ailment_system_code").val("");
|
|
$("#ailment_system_id").val("");
|
|
|
|
|
|
|
|
|
|
$('#modal-add-ailment-system').modal({
|
|
show: 'true'
|
|
});
|
|
|
|
}
|
|
addRow('<?php echo $row_history['appointment_id'] ?>');
|
|
addRow('<?php echo $row_history['appointment_id'] ?>');
|
|
var flag = 0;
|
|
|
|
function addRow(appointment_id) {
|
|
var counter = $("#count_treatment_item" + appointment_id).val();
|
|
var itemOptions = "<?php echo generateOption('tbl_items', 'item_name', 'item_id', '', ''); ?>";
|
|
var itemDosages =
|
|
"<?php echo generateOption('medicine_frequency', 'medicine_frequency', 'frequency_id', '', ''); ?>";
|
|
|
|
var newRow = $("<tr>");
|
|
var cols = "";
|
|
var select_treatment = "";
|
|
select_treatment +=
|
|
"<select class=\"chosen-select form-control\" size=\"5\" onchange=\"getItemDetails(this.value,'current_stock" +
|
|
appointment_id + "_" + counter + "','current_stock" + counter + "','current_rate" + appointment_id + "_" +
|
|
counter + "','current_rate" + counter + "','" + appointment_id + "', '" + counter + "');\" ";
|
|
select_treatment += "id=\"treatment_item" + appointment_id + "_" + counter + "\"name=\"treatment_item" + counter +
|
|
"\"data-placeholder=\"Treatment...\"";
|
|
//select_treatment+="style=\"display: none;\"";
|
|
select_treatment += ">";
|
|
|
|
select_treatment += "<option value=\"\"> </option>";
|
|
select_treatment += itemOptions
|
|
select_treatment += "</select>";
|
|
|
|
cols += '<td>' + select_treatment + '</td>';
|
|
var select_dosage = "";
|
|
select_dosage += "<select onchange=\"getFrequenceyQty(this.value,'frequency_qty" + appointment_id + "_" + counter +
|
|
"','dosage" + appointment_id + "_" + counter + "','" + appointment_id + "', '" + counter +
|
|
"');\" class='chosen-select form-control'";
|
|
select_dosage += "id=\"treatment_item_dosage" + appointment_id + "_" + counter + "\"name=\"treatment_item_dosage" +
|
|
counter + "\"data-placeholder=\"Dosage...\"";
|
|
//select_dosage+="style=\"display: none;\"";
|
|
select_dosage += ">";
|
|
|
|
select_dosage += "<option value=\"\"> </option>";
|
|
select_dosage += itemDosages
|
|
select_dosage += "</select>";
|
|
|
|
cols += '<td>' + select_dosage + '</td>';
|
|
cols += '<td><input type=\"hidden\" name=\"treatment_id' + counter + '" id=\"treatment_id' + '_' + counter +
|
|
'" ><input type="number" style="height:25px;font-size:12px" class="form-control"id ="treatment_item_days' +
|
|
appointment_id + '_' + counter + '" value="1" onblur="updateTotalMedicineQty(\'frequency_qty' +
|
|
appointment_id + '_' + counter + '\',\'treatment_item_days' + appointment_id + '_' + counter +
|
|
'\',\'treatment_item_total' + appointment_id + '_' + counter + '\',\'treatment_item_total_div' + counter +
|
|
'\')" name="treatment_item_days' + counter + '"/></td>';
|
|
cols += '<td><div style="text-align:center" id="treatment_item_total_div' + appointment_id + counter +
|
|
'""></div><input type="hidden" style="height:25px;font-size:12px" class="form-control"id="treatment_item_total' +
|
|
appointment_id + '_' + counter + '" name="treatment_item_total' + counter + '" readonly/></td>';
|
|
cols += '<td><input type="hidden" name="frequency_qty' + counter + '" id="frequency_qty' + appointment_id + '_' +
|
|
counter + '" /><input type="hidden" name="dosage' + counter + '" id="dosage' + appointment_id + '_' + counter +
|
|
'" /> <div style="text-align:center" id="current_rate' + appointment_id + counter +
|
|
'" "></div><input type="hidden" style="height:25px;font-size:12px" class="form-control" id="current_rate' +
|
|
appointment_id + '_' + counter + '" name="current_rate' + counter +
|
|
'" onblur="updatePrice(\'treatment_item_qtygvn' + appointment_id + '_' + counter + '\',\'treatment_item' +
|
|
appointment_id + '_' + counter + '\',\'current_rate' + appointment_id + '_' + counter + '\',\'current_stock' +
|
|
appointment_id + '_' + counter + '\',\'price' + appointment_id + '_' + counter + '\')" /></td>';
|
|
cols += '<td><div style="text-align:center" id="current_stock' + counter +
|
|
'" ></div><input type="hidden" style="height:25px;font-size:12px" class="form-control" id="current_stock' +
|
|
appointment_id + '_' + counter + '" name="current_stock' + counter + '" /></td>';
|
|
cols +=
|
|
'<td><input type="text" style="height:25px;font-size:12px" class="form-control" id="treatment_item_qtygvn' +
|
|
appointment_id + '_' + counter + '" name="treatment_item_qtygvn' + counter +
|
|
'" onchange="itemLevelTotol(\'treatment_item_qtygvn' + appointment_id + '_' + counter + '\',\'current_rate' +
|
|
appointment_id + '_' + counter + '\',\'treatment_item_total_amount' + appointment_id + '_' + counter +
|
|
'\',\'treatment_item_total_amount' + counter + '\');checkQty()" /></td>';
|
|
|
|
cols += '<td><div style="text-align:center" id="treatment_item_total_amount' + counter +
|
|
'"></div><input type="hidden" style="height:25px;font-size:12px" class="form-control" id="treatment_item_total_amount' +
|
|
appointment_id + '_' + counter + '" name="treatment_item_total_amount' + counter + '"/></td>';
|
|
cols += '<td><a href="#"><i class="ace-icon fa fa-trash-o bigger-130"></i></a></td>';
|
|
newRow.append(cols);
|
|
|
|
$("#treatmentTable" + appointment_id).append(newRow);
|
|
if (parseInt(counter) > 2) {
|
|
// $('.chosen-select').chosen({allow_single_deselect:true});
|
|
//$('.chosen-select').next().css({'width': $('#treatment_item'+counter).parent().width()});
|
|
$('#treatment_item_dosage' + "_" + counter).chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
$('#treatment_item_dosage' + "_" + counter).next().css({
|
|
'width': '100%'
|
|
});
|
|
|
|
$('#treatment_item' + "_" + counter).chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
$('#treatment_item' + "_" + counter).next().css({
|
|
'width': '100%'
|
|
});
|
|
|
|
}
|
|
if (parseInt($("#count_treatment_item_new").val()) > parseInt($("#count_treatment_item").val())) {
|
|
$('#treatment_item_dosage' + "_" + counter).chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
$('#treatment_item_dosage' + "_" + counter).next().css({
|
|
'width': '100%'
|
|
});
|
|
|
|
$('#treatment_item' + "_" + counter).chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
$('#treatment_item' + "_" + counter).next().css({
|
|
'width': '100%'
|
|
});
|
|
flag = 1;
|
|
} else if (flag == 1 && parseInt(counter) == 2) {
|
|
$('#treatment_item_dosage' + "_" + counter).chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
$('#treatment_item_dosage' + "_" + counter).next().css({
|
|
'width': '100%'
|
|
});
|
|
|
|
$('#treatment_item' + "_" + counter).chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
$('#treatment_item' + "_" + counter).next().css({
|
|
'width': '100%'
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
counter++;
|
|
$("#count_treatment_item" + appointment_id).val(counter);
|
|
$("#count_treatment_item_new").val(counter);
|
|
|
|
|
|
|
|
$("#treatmentTable" + appointment_id).on("click", ".fa-trash-o", function(event) {
|
|
$(this).closest("tr").remove();
|
|
counter -= 1
|
|
$("#count_treatment_item" + appointment_id).val(counter);
|
|
});
|
|
|
|
var valueChecked = $('input[name=medicine_disbursement]:checked').val();
|
|
|
|
setFieldDisableOrEnable(valueChecked)
|
|
}
|
|
|
|
function checkQty() {
|
|
|
|
|
|
var counter = $("#count_treatment_item").val();
|
|
for (var i = 0; i < counter; i++) {
|
|
var treatment_qty = $("#treatment_item_total_" + i).val();
|
|
var issued_qty = $("#treatment_item_qtygvn_" + i).val();
|
|
if (issued_qty == null || issued_qty == '') {
|
|
issued_qty = 0;
|
|
}
|
|
if (issued_qty > treatment_qty) {
|
|
BootstrapDialog.alert(' Issue Qty should be less than or equal to Treatment Qty .!!!');
|
|
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
function ailment_validate() {
|
|
var ailment_name = $('#ailment_name').val();
|
|
if (ailment_name == '') {
|
|
BootstrapDialog.alert('Please Enter Ailment Name.!!!');
|
|
return false;
|
|
}
|
|
var ailment_desc = $('#ailment_description').val();
|
|
if (ailment_desc == '') {
|
|
BootstrapDialog.alert('Please Enter Ailment Description.!!!');
|
|
return false;
|
|
}
|
|
var ailment_code = $('#ailment_code').val();
|
|
if (ailment_code == '') {
|
|
BootstrapDialog.alert('Please Enter Ailment Code.!!!');
|
|
return false;
|
|
}
|
|
save_ailment();
|
|
}
|
|
|
|
function save_ailment() {
|
|
|
|
$.ajax({
|
|
url: 'save_ailment.php',
|
|
type: "POST",
|
|
data: $("#ailment_form").serialize(),
|
|
success: function(data) {
|
|
var data = $.parseJSON(data);
|
|
BootstrapDialog.alert('Ailment Saved Successfully.');
|
|
var content = "<option value=" + data.ailment_id + ">" + data.ailment_name + "</option>"
|
|
|
|
$("#ailment").append(content);
|
|
|
|
|
|
$('#ailment').trigger('chosen:updated');
|
|
|
|
|
|
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving ailment');
|
|
return;
|
|
}
|
|
});
|
|
// $("#hide").show();
|
|
$('.close').click();
|
|
|
|
}
|
|
|
|
function ailment_system_save() {
|
|
|
|
$.ajax({
|
|
url: 'save_ailment_system.php? ',
|
|
type: "POST",
|
|
data: $("#ailment_system_form").serialize(),
|
|
success: function(data) {
|
|
var data = $.parseJSON(data);
|
|
BootstrapDialog.alert('Ailment System Saved Successfully.');
|
|
var content = "<option value=" + data.ailment_sys_id + ">" + data.ailment_sys_name + "</option>"
|
|
|
|
$("#ailment_system").append(content);
|
|
|
|
|
|
$('#ailment_system').trigger('chosen:updated');
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Ailment System');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
}
|
|
|
|
function ailment_system_validate() {
|
|
var ailment_name = $('#ailment_system_name').val();
|
|
if (ailment_name == '') {
|
|
BootstrapDialog.alert('Please Enter Ailment Name.!!!');
|
|
return false;
|
|
}
|
|
var ailment_desc = $('#ailment_system_description').val();
|
|
if (ailment_desc == '') {
|
|
BootstrapDialog.alert('Please Enter Ailment Description.!!!');
|
|
return false;
|
|
}
|
|
var ailment_code = $('#ailment_system_code').val();
|
|
if (ailment_code == '') {
|
|
BootstrapDialog.alert('Please Enter Ailment Code.!!!');
|
|
return false;
|
|
}
|
|
ailment_system_save();
|
|
}
|
|
</script>
|
|
|
|
<div class="modal fade" id="modal-add-ailment" name="modal-add-ailment" role="dialog" aria-hidden="true">
|
|
<form role="form" id="ailment_form" name="ailment_form" action="#" method="post">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">Add Ailment</h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
<label for="role">Ailment Name</label> <input type="hidden" class="form-control"
|
|
name="ailment_id" id="ailment_id" value="" required /> <input type="text"
|
|
autofocus="autofocus" class="form-control" name="ailment_name" id="ailment_name"
|
|
placeholder="Enter Ailment Name" required />
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
<label for="ailment">Ailment Description</label> <input type="text" class="form-control"
|
|
name="ailment_description" id="ailment_description"
|
|
placeholder="Enter Ailment Description" required />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
<label for="ailment">Ailment code</label> <input type="text" class="form-control"
|
|
name="ailment_code" id="ailment_code" placeholder="Enter Ailment code" required />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-info btn-sm save_button" onclick="ailment_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>
|
|
|
|
<div class="modal fade" id="modal-add-ailment-system" name="modal-add-ailment-system" role="dialog" aria-hidden="true">
|
|
<form role="form" id="ailment_system_form" name="ailment_system_form" action="#" method="post">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">Add Ailment System</h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
<label for="role">Ailment System Name</label> <input type="hidden"
|
|
id="ailment_system_id" name="ailment_system_id" vaule="" /> <input type="text"
|
|
autofocus="autofocus" class="form-control" name="ailment_system_name"
|
|
id="ailment_system_name" placeholder="Enter ailment Name" required />
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
<label for="ailment">Ailment System Description</label> <input type="text"
|
|
class="form-control" name="ailment_system_description"
|
|
id="ailment_system_description" placeholder="Enter Ailment Description" required />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
<label for="ailment">Ailment System Code</label> <input type="text" class="form-control"
|
|
name="ailment_system_code" id="ailment_system_code" placeholder="Enter Ailment Code"
|
|
required />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-info btn-sm save_button" onclick="ailment_system_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>
|
|
<script>
|
|
jQuery(function($) {
|
|
//alert("rolecode:<?php echo $_SESSION['RoleCode'] ?>");
|
|
<?php
|
|
if ($_SESSION['RoleCode'] == $_SESSION['RoleCode']) { ?>
|
|
$("#forwardButton").on("click", function() {
|
|
|
|
BootstrapDialog.show({
|
|
// type: BootstrapDialog.TYPE_DEFAULT,
|
|
title: 'Save & Forward',
|
|
|
|
message: '<select class="form-control" id="forward_status" >' +
|
|
'<option value="<?php echo $__STATUS_PHARMACY_PENDING ?>">Forward To Nursing</option>' +
|
|
'<option value="<?php echo $__STATUS_DOCTOR_PENDING ?>">Forward To Doctor</option>' +
|
|
'</select>',
|
|
|
|
buttons: [{
|
|
label: 'Save & Submit',
|
|
icon: 'fa fa-save',
|
|
cssClass: 'btn-info',
|
|
action: function() {
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
validate($("#forward_status").val())
|
|
$(".close").click();
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
<?php } else { ?>
|
|
validate($("#forward_status").val())
|
|
<?php } ?>
|
|
|
|
|
|
$('#id-disable-check').on('click', function() {
|
|
var inp = $('#form-input-readonly').get(0);
|
|
if (inp.hasAttribute('disabled')) {
|
|
inp.setAttribute('readonly', 'true');
|
|
inp.removeAttribute('disabled');
|
|
inp.value = "This text field is readonly!";
|
|
} else {
|
|
inp.setAttribute('disabled', 'disabled');
|
|
inp.removeAttribute('readonly');
|
|
inp.value = "This text field is disabled!";
|
|
}
|
|
});
|
|
|
|
|
|
if (!ace.vars['touch']) {
|
|
$('.chosen-select').chosen({
|
|
allow_single_deselect: true
|
|
});
|
|
//resize the chosen on window resize
|
|
|
|
$(window)
|
|
.off('resize.chosen')
|
|
.on('resize.chosen', function() {
|
|
$('.chosen-select').each(function() {
|
|
var $this = $(this);
|
|
$this.next().css({
|
|
'width': $this.parent().width()
|
|
});
|
|
})
|
|
}).trigger('resize.chosen');
|
|
//resize chosen on sidebar collapse/expand
|
|
$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
|
|
if (event_name != 'sidebar_collapsed') return;
|
|
$('.chosen-select').each(function() {
|
|
var $this = $(this);
|
|
$this.next().css({
|
|
'width': $this.parent().width()
|
|
});
|
|
})
|
|
});
|
|
|
|
|
|
$('#chosen-multiple-style .btn').on('click', function(e) {
|
|
var target = $(this).find('input[type=radio]');
|
|
var which = parseInt(target.val());
|
|
if (which == 2) $('#form-field-select-4').addClass('tag-input-style');
|
|
else $('#form-field-select-4').removeClass('tag-input-style');
|
|
});
|
|
}
|
|
|
|
|
|
$('[data-rel=tooltip]').tooltip({
|
|
container: 'body'
|
|
});
|
|
$('[data-rel=popover]').popover({
|
|
container: 'body'
|
|
});
|
|
|
|
autosize($('textarea[class*=autosize]'));
|
|
|
|
$('textarea.limited').inputlimiter({
|
|
remText: '%n character%s remaining...',
|
|
limitText: 'max allowed : %n.'
|
|
});
|
|
|
|
$.mask.definitions['~'] = '[+-]';
|
|
$('.input-mask-date').mask('99/99/9999');
|
|
$('.input-mask-phone').mask('(999) 999-9999');
|
|
$('.input-mask-eyescript').mask('~9.99 ~9.99 999');
|
|
$(".input-mask-product").mask("a*-999-a999", {
|
|
placeholder: " ",
|
|
completed: function() {
|
|
alert("You typed the following: " + this.val());
|
|
}
|
|
});
|
|
|
|
|
|
|
|
$("#input-size-slider").css('width', '200px').slider({
|
|
value: 1,
|
|
range: "min",
|
|
min: 1,
|
|
max: 8,
|
|
step: 1,
|
|
slide: function(event, ui) {
|
|
var sizing = ['', 'input-sm', 'input-lg', 'input-mini', 'input-small', 'input-medium',
|
|
'input-large', 'input-xlarge', 'input-xxlarge'
|
|
];
|
|
var val = parseInt(ui.value);
|
|
$('#form-field-4').attr('class', sizing[val]).attr('placeholder', '.' + sizing[val]);
|
|
}
|
|
});
|
|
|
|
$("#input-span-slider").slider({
|
|
value: 1,
|
|
range: "min",
|
|
min: 1,
|
|
max: 12,
|
|
step: 1,
|
|
slide: function(event, ui) {
|
|
var val = parseInt(ui.value);
|
|
$('#form-field-5').attr('class', 'col-xs-' + val).val('.col-xs-' + val);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
//"jQuery UI Slider"
|
|
//range slider tooltip example
|
|
$("#slider-range").css('height', '200px').slider({
|
|
orientation: "vertical",
|
|
range: true,
|
|
min: 0,
|
|
max: 100,
|
|
values: [17, 67],
|
|
slide: function(event, ui) {
|
|
var val = ui.values[$(ui.handle).index() - 1] + "";
|
|
|
|
if (!ui.handle.firstChild) {
|
|
$("<div class='tooltip right in' style='display:none;left:16px;top:-6px;'><div class='tooltip-arrow'></div><div class='tooltip-inner'></div></div>")
|
|
.prependTo(ui.handle);
|
|
}
|
|
$(ui.handle.firstChild).show().children().eq(1).text(val);
|
|
}
|
|
}).find('span.ui-slider-handle').on('blur', function() {
|
|
$(this.firstChild).hide();
|
|
});
|
|
|
|
|
|
$("#slider-range-max").slider({
|
|
range: "max",
|
|
min: 1,
|
|
max: 10,
|
|
value: 2
|
|
});
|
|
|
|
$("#slider-eq > span").css({
|
|
width: '90%',
|
|
'float': 'left',
|
|
margin: '15px'
|
|
}).each(function() {
|
|
// read initial values from markup and remove that
|
|
var value = parseInt($(this).text(), 10);
|
|
$(this).empty().slider({
|
|
value: value,
|
|
range: "min",
|
|
animate: true
|
|
|
|
});
|
|
});
|
|
|
|
$("#slider-eq > span.ui-slider-purple").slider('disable'); //disable third item
|
|
|
|
|
|
$('#id-input-file-1 , #id-input-file-2').ace_file_input({
|
|
no_file: 'No File ...',
|
|
btn_choose: 'Choose',
|
|
btn_change: 'Change',
|
|
droppable: false,
|
|
onchange: null,
|
|
thumbnail: false //| true | large
|
|
//whitelist:'gif|png|jpg|jpeg'
|
|
//blacklist:'exe|php'
|
|
//onchange:''
|
|
//
|
|
});
|
|
//pre-show a file name, for example a previously selected file
|
|
//$('#id-input-file-1').ace_file_input('show_file_list', ['myfile.txt'])
|
|
|
|
|
|
$('#id-input-file-3').ace_file_input({
|
|
style: 'well',
|
|
btn_choose: 'Drop files here or click to choose',
|
|
btn_change: null,
|
|
no_icon: 'ace-icon fa fa-cloud-upload',
|
|
droppable: true,
|
|
thumbnail: 'small' //large | fit
|
|
//,icon_remove:null//set null, to hide remove/reset button
|
|
/**,before_change:function(files, dropped) {
|
|
//Check an example below
|
|
//or examples/file-upload.html
|
|
return true;
|
|
}*/
|
|
/**,before_remove : function() {
|
|
return true;
|
|
}*/
|
|
,
|
|
preview_error: function(filename, error_code) {
|
|
//name of the file that failed
|
|
//error_code values
|
|
//1 = 'FILE_LOAD_FAILED',
|
|
//2 = 'IMAGE_LOAD_FAILED',
|
|
//3 = 'THUMBNAIL_FAILED'
|
|
//alert(error_code);
|
|
}
|
|
|
|
}).on('change', function() {
|
|
//console.log($(this).data('ace_input_files'));
|
|
//console.log($(this).data('ace_input_method'));
|
|
});
|
|
|
|
|
|
//$('#id-input-file-3')
|
|
//.ace_file_input('show_file_list', [
|
|
//{type: 'image', name: 'name of image', path: 'http://path/to/image/for/preview'},
|
|
//{type: 'file', name: 'hello.txt'}
|
|
//]);
|
|
|
|
|
|
|
|
|
|
//dynamically change allowed formats by changing allowExt && allowMime function
|
|
$('#id-file-format').removeAttr('checked').on('change', function() {
|
|
var whitelist_ext, whitelist_mime;
|
|
var btn_choose
|
|
var no_icon
|
|
if (this.checked) {
|
|
btn_choose = "Drop images here or click to choose";
|
|
no_icon = "ace-icon fa fa-picture-o";
|
|
|
|
whitelist_ext = ["jpeg", "jpg", "png", "gif", "bmp"];
|
|
whitelist_mime = ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/bmp"];
|
|
} else {
|
|
btn_choose = "Drop files here or click to choose";
|
|
no_icon = "ace-icon fa fa-cloud-upload";
|
|
|
|
whitelist_ext = null; //all extensions are acceptable
|
|
whitelist_mime = null; //all mimes are acceptable
|
|
}
|
|
var file_input = $('#id-input-file-3');
|
|
file_input
|
|
.ace_file_input('update_settings', {
|
|
'btn_choose': btn_choose,
|
|
'no_icon': no_icon,
|
|
'allowExt': whitelist_ext,
|
|
'allowMime': whitelist_mime
|
|
})
|
|
file_input.ace_file_input('reset_input');
|
|
|
|
file_input
|
|
.off('file.error.ace')
|
|
.on('file.error.ace', function(e, info) {
|
|
//console.log(info.file_count);//number of selected files
|
|
//console.log(info.invalid_count);//number of invalid files
|
|
//console.log(info.error_list);//a list of errors in the following format
|
|
|
|
//info.error_count['ext']
|
|
//info.error_count['mime']
|
|
//info.error_count['size']
|
|
|
|
//info.error_list['ext'] = [list of file names with invalid extension]
|
|
//info.error_list['mime'] = [list of file names with invalid mimetype]
|
|
//info.error_list['size'] = [list of file names with invalid size]
|
|
|
|
|
|
/**
|
|
if( !info.dropped ) {
|
|
//perhapse reset file field if files have been selected, and there are invalid files among them
|
|
//when files are dropped, only valid files will be added to our file array
|
|
e.preventDefault();//it will rest input
|
|
}
|
|
*/
|
|
|
|
|
|
//if files have been selected (not dropped), you can choose to reset input
|
|
//because browser keeps all selected files anyway and this cannot be changed
|
|
//we can only reset file field to become empty again
|
|
//on any case you still should check files with your server side script
|
|
//because any arbitrary file can be uploaded by user and it's not safe to rely on browser-side measures
|
|
});
|
|
|
|
|
|
/**
|
|
file_input
|
|
.off('file.preview.ace')
|
|
.on('file.preview.ace', function(e, info) {
|
|
console.log(info.file.width);
|
|
console.log(info.file.height);
|
|
e.preventDefault();//to prevent preview
|
|
});
|
|
*/
|
|
|
|
});
|
|
|
|
$('#spinner1').ace_spinner({
|
|
value: 0,
|
|
min: 0,
|
|
max: 200,
|
|
step: 10,
|
|
btn_up_class: 'btn-info',
|
|
btn_down_class: 'btn-info'
|
|
})
|
|
.closest('.ace-spinner')
|
|
.on('changed.fu.spinbox', function() {
|
|
//console.log($('#spinner1').val())
|
|
});
|
|
$('#spinner2').ace_spinner({
|
|
value: 0,
|
|
min: 0,
|
|
max: 10000,
|
|
step: 100,
|
|
touch_spinner: true,
|
|
icon_up: 'ace-icon fa fa-caret-up bigger-110',
|
|
icon_down: 'ace-icon fa fa-caret-down bigger-110'
|
|
});
|
|
$('#spinner3').ace_spinner({
|
|
value: 0,
|
|
min: -100,
|
|
max: 100,
|
|
step: 10,
|
|
on_sides: true,
|
|
icon_up: 'ace-icon fa fa-plus bigger-110',
|
|
icon_down: 'ace-icon fa fa-minus bigger-110',
|
|
btn_up_class: 'btn-success',
|
|
btn_down_class: 'btn-danger'
|
|
});
|
|
$('#spinner4').ace_spinner({
|
|
value: 0,
|
|
min: -100,
|
|
max: 100,
|
|
step: 10,
|
|
on_sides: true,
|
|
icon_up: 'ace-icon fa fa-plus',
|
|
icon_down: 'ace-icon fa fa-minus',
|
|
btn_up_class: 'btn-purple',
|
|
btn_down_class: 'btn-purple'
|
|
});
|
|
|
|
//$('#spinner1').ace_spinner('disable').ace_spinner('value', 11);
|
|
//or
|
|
//$('#spinner1').closest('.ace-spinner').spinner('disable').spinner('enable').spinner('value', 11);//disable, enable or change value
|
|
//$('#spinner1').closest('.ace-spinner').spinner('value', 0);//reset to 0
|
|
|
|
|
|
//datepicker plugin
|
|
//link
|
|
$('.date-picker').datepicker({
|
|
autoclose: true,
|
|
todayHighlight: true
|
|
})
|
|
//show datepicker when clicking on the icon
|
|
.next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
//or change it into a date range picker
|
|
$('.input-daterange').datepicker({
|
|
autoclose: true
|
|
});
|
|
|
|
|
|
//to translate the daterange picker, please copy the "examples/daterange-fr.js" contents here before initialization
|
|
$('input[name=date-range-picker]').daterangepicker({
|
|
'applyClass': 'btn-sm btn-success',
|
|
'cancelClass': 'btn-sm btn-default',
|
|
locale: {
|
|
applyLabel: 'Apply',
|
|
cancelLabel: 'Cancel',
|
|
}
|
|
})
|
|
.prev().on(ace.click_event, function() {
|
|
$(this).next().focus();
|
|
});
|
|
|
|
|
|
$('#timepicker1').timepicker({
|
|
minuteStep: 1,
|
|
showSeconds: true,
|
|
showMeridian: false,
|
|
disableFocus: true,
|
|
icons: {
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down'
|
|
}
|
|
}).on('focus', function() {
|
|
$('#timepicker1').timepicker('showWidget');
|
|
}).next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
|
|
|
|
|
|
if (!ace.vars['old_ie']) $('#appointment_date').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
defaultDate: new Date(),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
if (!ace.vars['old_ie']) $('#out_time').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
// defaultDate: new Date(),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
|
|
$('#colorpicker1').colorpicker();
|
|
//$('.colorpicker').last().css('z-index', 2000);//if colorpicker is inside a modal, its z-index should be higher than modal'safe
|
|
|
|
$('#simple-colorpicker-1').ace_colorpicker();
|
|
//$('#simple-colorpicker-1').ace_colorpicker('pick', 2);//select 2nd color
|
|
//$('#simple-colorpicker-1').ace_colorpicker('pick', '#fbe983');//select #fbe983 color
|
|
//var picker = $('#simple-colorpicker-1').data('ace_colorpicker')
|
|
//picker.pick('red', true);//insert the color if it doesn't exist
|
|
|
|
|
|
$(".knob").knob();
|
|
|
|
|
|
var tag_input = $('#form-field-tags');
|
|
try {
|
|
tag_input.tag({
|
|
placeholder: tag_input.attr('placeholder'),
|
|
//enable typeahead by specifying the source array
|
|
source: ailments, //defined in ace.js >> ace.enable_search_ahead
|
|
/**
|
|
//or fetch data from database, fetch those that match "query"
|
|
source: function(query, process) {
|
|
$.ajax({url: 'remote_source.php?q='+encodeURIComponent(query)})
|
|
.done(function(result_items){
|
|
process(result_items);
|
|
});
|
|
}
|
|
*/
|
|
})
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj = $('#form-field-tags').data('tag');
|
|
$tag_obj.add('Programmatically Added');
|
|
|
|
var index = $tag_obj.inValues('some tag');
|
|
$tag_obj.remove(index);
|
|
} catch (e) {
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
|
tag_input.after('<textarea id="' + tag_input.attr('id') + '" name="' + tag_input.attr('name') +
|
|
'" rows="3">' + tag_input.val() + '</textarea>').remove();
|
|
//autosize($('#form-field-tags'));
|
|
}
|
|
|
|
|
|
/////////
|
|
$('#modal-form input[type=file]').ace_file_input({
|
|
style: 'well',
|
|
btn_choose: 'Drop files here or click to choose',
|
|
btn_change: null,
|
|
no_icon: 'ace-icon fa fa-cloud-upload',
|
|
droppable: true,
|
|
thumbnail: 'large'
|
|
})
|
|
|
|
//chosen plugin inside a modal will have a zero width because the select element is originally hidden
|
|
//and its width cannot be determined.
|
|
//so we set the width after modal is show
|
|
$('#modal-form').on('shown.bs.modal', function() {
|
|
if (!ace.vars['touch']) {
|
|
$(this).find('.chosen-container').each(function() {
|
|
$(this).find('a:first-child').css('width', '210px');
|
|
$(this).find('.chosen-drop').css('width', '210px');
|
|
$(this).find('.chosen-search input').css('width', '200px');
|
|
});
|
|
}
|
|
})
|
|
/**
|
|
//or you can activate the chosen plugin after modal is shown
|
|
//this way select element becomes visible with dimensions and chosen works as expected
|
|
$('#modal-form').on('shown', function () {
|
|
$(this).find('.modal-chosen').chosen();
|
|
})
|
|
*/
|
|
|
|
|
|
|
|
$(document).one('ajaxloadstart.page', function(e) {
|
|
autosize.destroy('textarea[class*=autosize]')
|
|
|
|
$('.limiterBox,.autosizejs').remove();
|
|
$('.daterangepicker.dropdown-menu,.colorpicker.dropdown-menu,.bootstrap-datetimepicker-widget.dropdown-menu')
|
|
.remove();
|
|
});
|
|
|
|
});
|
|
|
|
<?php if (!strcmp(strtolower($complaint_config), "true")) { ?>
|
|
|
|
if ($('#complaints')) {
|
|
|
|
var complaints = new Array();
|
|
getComplaints();
|
|
|
|
function getComplaints() {
|
|
$.ajax({
|
|
url: 'select_complaints.php',
|
|
type: "GET",
|
|
success: function(data) {
|
|
complaints = $.parseJSON(data);
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error pulling Complaints!!');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
<?php } ?>
|
|
|
|
<?php if (!strcmp(strtolower($complaint_config), "true")) { ?>
|
|
|
|
if ($('#complaints')) {
|
|
setTimeout(function() {
|
|
|
|
var tag_input_complaints = $('#complaints');
|
|
try {
|
|
tag_input_complaints.tag({
|
|
placeholder: tag_input_complaints.attr('placeholder'),
|
|
|
|
source: complaints
|
|
|
|
})
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj = $('#complaints').data('tag');
|
|
//$tag_obj.add('Programmatically Added');
|
|
var existingComplaints = "<?php echo $row['complaints'] ?>"
|
|
if (existingComplaints != undefined && existingComplaints != null && existingComplaints != '') {
|
|
var existingComplaintsArr = existingComplaints.split(",");
|
|
jQuery.each(existingComplaintsArr, function(i, val) {
|
|
$tag_obj.add(val.toUpperCase());
|
|
});
|
|
}
|
|
//var index = $tag_obj.inValues('some tag');
|
|
// $tag_obj.remove(index);
|
|
} catch (e) {
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
|
tag_input_complaints.after('<textarea id="' + tag_input_complaints.attr('id') + '" name="' +
|
|
tag_input_complaints.attr('name') + '" rows="3">' + tag_input_complaints.val() +
|
|
'</textarea>').remove();
|
|
//autosize($('#form-field-tags'));
|
|
}
|
|
var y = $('#complaints').parents(".col-sm-3").width();
|
|
$('#complaints').siblings().css('width', y - 5);
|
|
}, 2000);
|
|
}
|
|
<?php } ?>
|
|
</script>
|
|
|
|
<style>
|
|
.modal-dialog {
|
|
padding: 15px;
|
|
width: 45%;
|
|
}
|
|
|
|
.form-control {
|
|
height: 30px;
|
|
}
|
|
|
|
.close {
|
|
font-size: 12px;
|
|
font-weight: 900;
|
|
}
|
|
|
|
.input-group-addon {
|
|
padding: unset;
|
|
}
|
|
</style>
|