2623 lines
146 KiB
PHP
2623 lines
146 KiB
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>
|
|
|
|
<link rel="stylesheet" href="assets/css/jquery.dataTables.css" />
|
|
|
|
<script src="assets/js/jquery.dataTables.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$(".glyphicon").css("top", "");
|
|
|
|
|
|
});
|
|
|
|
function open_treatments(appointment_id) {
|
|
$('#modal-add-consultation').modal("show");
|
|
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#load-treatment-btn,
|
|
.loader {
|
|
float: right;
|
|
}
|
|
|
|
.loader {
|
|
border: 5px solid #f3f3f3;
|
|
border-radius: 50%;
|
|
border-top: 5px solid #3498db;
|
|
width: 25px;
|
|
height: 25px;
|
|
margin-bottom: 5px;
|
|
animation: spin 2s linear infinite;
|
|
display: none;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
25% {
|
|
transform: rotate(90deg);
|
|
border-top: 5px solid greenyellow;
|
|
}
|
|
|
|
50% {
|
|
transform: rotate(180deg);
|
|
border-top: 5px solid gold;
|
|
}
|
|
|
|
100% {
|
|
transform: rotate(360deg);
|
|
border-top: 5px solid #3498db;
|
|
}
|
|
}
|
|
|
|
.tags .tag {
|
|
white-space: normal !important;
|
|
font-size: 10px;
|
|
}
|
|
</style>
|
|
<?php
|
|
include('includes/config/config.php');
|
|
$rolecode = $_SESSION['RoleCode'];
|
|
|
|
error_log('ttttt' . $rolecode);
|
|
$saved_ohc_id = $_SESSION['current_ohcttype'];
|
|
error_log('ttttt' . $_REQUEST['followup_to_opd']);
|
|
$followup_id = $_REQUEST["followup_id"];
|
|
|
|
$saved_ohc_id = $_SESSION['current_ohcttype'];
|
|
|
|
$num_rows_treatment = 0;
|
|
$num_rows_treatment_external = 0;
|
|
$_REQUEST['appointmentId'] = $app_id = $_REQUEST['followup_to_opd'] != '' ? $_REQUEST['followup_to_opd'] : $_REQUEST['appointmentId'];
|
|
error_log('app_id' . $app_id);
|
|
$id = $_REQUEST['appointmentId'];
|
|
$num_rows_treatment = 0;
|
|
$num_rows_treatment_external = 0;
|
|
$chronic_days = 0;
|
|
$doctor_discussed_id = 0;
|
|
|
|
if (isset($app_id)) {
|
|
if ($followup_id != '' && $followup_id != null && $followup_id != 0) {
|
|
$sql = "select * from followup_details where followup_id='" . $followup_id . "'";
|
|
} else {
|
|
$sql = "select * from employee_appointment where appointment_id='" . $app_id . "'";
|
|
}
|
|
|
|
// echo "query:".$sql;error_log("APPOINTMENT QUERY::" .$query);
|
|
$result = mysqli_query($conn, $sql);
|
|
$num_rows = @mysqli_num_rows($result);
|
|
$row = null;
|
|
|
|
// echo fhfh;
|
|
if ($num_rows > 0) {
|
|
$row = @mysqli_fetch_array($result);
|
|
$saved_ohc_id = $row['ohc_type_id'];
|
|
}
|
|
|
|
$chronic_days = $row['chronic_day'];
|
|
$doctor_discussed_id = $row['doctor_discussed_id'];
|
|
|
|
if ($_REQUEST['followup_to_opd'] == '' || $_REQUEST['followup_to_opd'] == null || $_REQUEST['followup_to_opd'] == 0) {
|
|
$sql_for_treatment = "select * from treatment where appointment_id='" . $app_id . "' and is_display!='N' and followup_id='0' ";
|
|
} else {
|
|
|
|
if ($followup_id == '' || $followup_id == null) {
|
|
$sql_for_treatment = "select * from treatment where appointment_id='" . $app_id . "' and is_display!='N' and followup_id!='0' ";
|
|
} else {
|
|
$sql_for_treatment = "select * from treatment where appointment_id='" . $app_id . "' and is_display!='N' and followup_id='" . $followup_id . "' ";
|
|
}
|
|
}
|
|
error_log('tq' . $sql_for_treatment);
|
|
$result_for_treatment = @mysqli_query($conn, $sql_for_treatment);
|
|
$num_rows_treatment = @mysqli_num_rows($result_for_treatment);
|
|
|
|
|
|
|
|
$sql_for_treatment_external = "select * from treatment_external where appointment_id='" . $_REQUEST['appointmentId'] . "'";
|
|
$result_for_treatment_external = @mysqli_query($conn, $sql_for_treatment_external);
|
|
$num_rows_treatment_external = @mysqli_num_rows($result_for_treatment_external);
|
|
//If Its a follow up OPD/INJURY case - then add treatment details from the existing
|
|
$treatment_followup_picked = false;
|
|
|
|
if ($num_rows_treatment == 0 && $num_rows_treatment_external == 0 && ($row['followup_to_opd'] != null && $row['followup_to_opd'] != "0")) {
|
|
$follow_up_ohc = getFieldFromTable('ohc_type_id', 'employee_appointment', 'appointment_id', $row['followup_to_opd']);
|
|
if ($follow_up_ohc == $_SESSION['current_ohcttype']) {
|
|
$sql_for_treatment = "select * from treatment where appointment_id='" . $row['followup_to_opd'] . "' and is_display!='N'";
|
|
$result_for_treatment = @mysqli_query($conn, $sql_for_treatment);
|
|
$num_rows_treatment = @mysqli_num_rows($result_for_treatment);
|
|
|
|
$sql_for_treatment_external = "select * from treatment_external where appointment_id='" . $row['followup_to_opd'] . "'";
|
|
$result_for_treatment_external = @mysqli_query($conn, $sql_for_treatment_external);
|
|
$num_rows_treatment_external = @mysqli_num_rows($result_for_treatment_external);
|
|
$treatment_followup_picked = true;
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
<script>
|
|
var rolecode = '<?php echo $_SESSION['RoleCode'] ?>';
|
|
var num_rows_treatment = <?php echo $num_rows_treatment ?>;
|
|
var num_rows_treatment_external = <?php echo $num_rows_treatment_external ?>;
|
|
var curr_ohc_id = <?php echo $saved_ohc_id ?>;
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<form id="opd_form" method="post">
|
|
<div class="widget-box" id="opd_form_pdf">
|
|
<div class="widget-header" data-action="fullscreen">
|
|
<h5 class="widget-title">Patient injury > <?php echo $patient_name . " " . $emp_code ?> <a target="_blank" href="emp_dashboard.php?flex_patient_id=<?php if ($row['emp_id'] != '' || $row['emp_id'] != null) {
|
|
echo $row['emp_id'];
|
|
} else {
|
|
echo $_REQUEST['emp_id'];
|
|
} ?>"><i style="font-size: 17px;" class="glyphicon glyphicon-user"></i></a></h5>
|
|
<div class="loader"></div>
|
|
|
|
|
|
|
|
<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 save_button" id="forwardButton" tabindex="0" aria-controls="dynamic-table" data-original-title="" title="Save This Entry"><span><i class="fa fa-floppy-o bigger-110 blue"></i>
|
|
<span>SAVE & FORWARD</span></span></a>
|
|
|
|
|
|
|
|
<?php if ($rolecode == 'DOC' || $rolecode == $__ROLE_DISPENSARY || in_array('DIS', $Rolecodes)) { ?>
|
|
<input class="form-control" value='<?php if ($rolecode == 'DOC') {
|
|
echo 'PHP';
|
|
} else {
|
|
echo 'DRP';
|
|
} ?>' id="forward_status" name="forward_status" style="display:none" />
|
|
|
|
<?php } ?>
|
|
<?php if ($rolecode == 'DOC' || $rolecode == $__ROLE_DISPENSARY || in_array('DIS', $Rolecodes)) { ?>
|
|
<a class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold save_button"
|
|
style="float: left;"
|
|
onclick="$('#forward_status').val('CLS'); validate_update('opd_form','<?php echo $row['appointment_id'] ?>')"><i
|
|
class="fa fa-floppy-o bigger-110 green"></i> SAVE & CLOSE</a>
|
|
|
|
<?php } ?>
|
|
|
|
<?php if ($rolecode == 'DOC' || $rolecode == $__ROLE_DISPENSARY || in_array('DIS', $Rolecodes)) { ?>
|
|
<div class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold save_button" style=" padding-bottom: 3px; padding-top: 4px;">IPD <input type="checkbox" id='ipd' value="<?php echo $row['ipd'] ?>" style="width: 50%;" <?php if ($row['ipd'] == 1) echo 'checked'; ?> name="ipd">
|
|
</input></div>
|
|
<?php } ?>
|
|
|
|
<!-- <a class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold save_button" style="float: left;" onclick="add_consume();"><i class="fa fa-medkit bigger-110 red" onclick="add_consume();"></i>
|
|
CONSUMABLES</a>
|
|
|
|
-->
|
|
|
|
<!-- <a onclick="convertToOPD()" class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold save_button" style="float: left;">Convert to OPD</a> -->
|
|
<?php if ($row['doctor_attended_flag'] == 'Y' && ($_REQUEST['appointmentId'] != '' || $_REQUEST['appointmentId'] != null)) { ?>
|
|
<a class="dt-button buttons-print btn btn-white btn-primary btn-bold" onclick="exporttopdf();" tabindex="0" aria-controls="dynamic-table" data-original-title="" title=""><span><i class="fa fa-print bigger-110 grey"></i>
|
|
<span class="hidden">Print</span></span></a>
|
|
<?php } ?>
|
|
<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="" title=""><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" <?php if ($rolecode == 'DOC') { ?> value="<?php echo $__STATUS_DOCTOR_ATTENDED ?>" <?php } ?> <?php if ($rolecode == 'DIS' || in_array('DIS', $Rolecodes)) { ?> value="<?php echo $__STATUS_PHARMACY_ATTENDED ?>" <?php } ?> /> <input type="hidden" name="doctor_last_attended" id="doctor_last_attended" <?php if ($rolecode == 'DOC') { ?> value="<?php echo $_SESSION['user_id'] ?>" <?php } else { ?> value="<?php echo $row['doctor_last_attended'] ?>" <?php } ?> />
|
|
|
|
</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">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<!-- <h4>Asset</h4> -->
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Equipment</strong></label>
|
|
<input type="number" class="form-control" placeholder="Equipment" id="weight" name="weight" onchange="calculateBMI()" value="<?php echo $row['weight'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Equipment Description</strong></label>
|
|
<input type="number" class="form-control" id="bmi" name="bmi" placeholder="Equipment Description" value="<?php echo $row['bmi'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="isEmergency"><strong style="font-size: 11px">Company-Owned</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:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Still Operational</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:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Company-Owned</strong></label>
|
|
<input type="number" class="form-control" id="height" name="height" placeholder="Company-Owned" min="0" max="1000" onchange="calculateBMI()" value="<?php echo $row['height'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Still Operational</strong></label>
|
|
<input type="number" class="form-control" min="0" max="1000" placeholder="Still Operational" id="sbp" name="sbp" value="<?php echo $row['bp_sbp'] ?>">
|
|
</div> -->
|
|
|
|
<!-- <div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Plant ID</strong></label>
|
|
<input type="number" class="form-control" id="DBP" name="dbp" placeholder="Plant ID" min="0" max="1000" value="<?php echo $row['bp_dbp'] ?>">
|
|
</div> -->
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Oprater</strong></label>
|
|
<input type="number" class="form-control" placeholder="Oprater" id="temperature" name="temperature" value="<?php echo $row['temperature'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Functional Location</strong></label>
|
|
<input type="number" class="form-control" placeholder="Functional Location" id="resp_rate" name="resp_rate" value="<?php echo $row['respiratory_rate'] ?>">
|
|
</div>
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Location Description</strong></label>
|
|
<input type="text" class="form-control" id="glasgow_coma_scale" name="glasgow_coma_scale" placeholder="Location Description" value="<?php echo $row['glasgow_coma_scale'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-2" style="width:20%">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Additional Description</strong></label>
|
|
<input type="text" class="form-control" id="spo2_percent" name="spoc2_percent" placeholder="Additional Description" 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">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>
|
|
<div class="space-6"></div>
|
|
|
|
|
|
<!--
|
|
<div class="row">
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">RBS</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="rbs" name="rbs" placeholder="RBS" value="<?php echo $row['blood_sugar_rbs'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">PPBS</strong></label>
|
|
<input type="number" min="0" max="1000" style="height: 30px;width: 85px" id="ppbs" name="ppbs" placeholder="PPBS" value="<?php echo $row['blood_sugar_ppbs'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">SPO2</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="spo2_percent" name="spoc2_percent" placeholder="SPO2" value="<?php echo $row['spo2_percent'] ?>" maxlength="10">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">AVPU</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="avpu" name="avpu" placeholder="AVPU" value="<?php echo $row['avpu'] ?>" maxlength="10">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">TRAMA</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="trama" name="trama" placeholder="Trama" value="<?php echo $row['trama'] ?>" maxlength="10">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">oxy suple</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="oxygen_supply" name="oxygen_supply" placeholder="Oxygen supplementation" value="<?php echo $row['oxygen_supply'] ?>" maxlength="10">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">GC SCALE</strong></label>
|
|
<input type="number" min="0" max="1000" 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 class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">T.CHOLES</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="total_cholesterol" name="total_cholesterol" placeholder="Cholesterol" value="<?php echo $row['total_cholesterol'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-1">
|
|
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Mobility</strong></label>
|
|
<input type="number" min="0" max="1000" class="form-control" id="mobility" name="mobility" placeholder="Mobility" value="<?php echo $row['mobility'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-3">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Ecg Findings</strong></label>
|
|
|
|
<input type="text" name="ecg_finding" id="ecg_finding" class="form-control" value="<?= $row['ecg_findings'] ?>">
|
|
</div>
|
|
</div> -->
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12 table-responsive">
|
|
<div class="widget-box">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="appoint"><strong style="font-size: 11px">Injury Record No:</strong></label>
|
|
<input id="ticket_no" type="hidden" name="ticket_no" value="<?php if ($row['ticket_no'] != '' || $row['ticket_no'] != null) {
|
|
|
|
if (($_REQUEST['followup_to_opd'] != '' && $_REQUEST['followup_to_opd'] != null) && ($_REQUEST['followup_id'] == '' || $_REQUEST['followup_id'] == null)) {
|
|
echo creatingTicketNoFollowup();
|
|
} else if (($_REQUEST['followup_to_opd'] != '' && $_REQUEST['followup_to_opd'] != null) && ($_REQUEST['followup_id'] != '' && $_REQUEST['followup_id'] != null)) {
|
|
echo getTableFieldValue('followup_details', 'ticket_no', 'followup_id', $followup_id);
|
|
} else {
|
|
|
|
echo $row['ticket_no'];
|
|
}
|
|
} else {
|
|
if ($_REQUEST['followup_to_opd'] != '' && $_REQUEST['followup_to_opd'] != null) {
|
|
echo creatingTicketNoFollowup();
|
|
} else {
|
|
echo creatingTicketNoInjury();
|
|
}
|
|
} ?>" />
|
|
<div class="input-group">
|
|
|
|
|
|
<?php if ($row['ticket_no'] != '' || $row['ticket_no'] != null) {
|
|
|
|
if (($_REQUEST['followup_to_opd'] != '' && $_REQUEST['followup_to_opd'] != null) && ($_REQUEST['followup_id'] == '' || $_REQUEST['followup_id'] == null)) {
|
|
echo creatingTicketNoFollowup();
|
|
} else if (($_REQUEST['followup_to_opd'] != '' && $_REQUEST['followup_to_opd'] != null) && ($_REQUEST['followup_id'] != '' && $_REQUEST['followup_id'] != null)) {
|
|
echo getTableFieldValue('followup_details', 'ticket_no', 'followup_id', $followup_id);
|
|
} else {
|
|
|
|
echo $row['ticket_no'];
|
|
}
|
|
} else {
|
|
if ($_REQUEST['followup_to_opd'] != '' && $_REQUEST['followup_to_opd'] != null) {
|
|
echo creatingTicketNoFollowup();
|
|
} else {
|
|
echo creatingTicketNoInjury();
|
|
}
|
|
} ?>
|
|
|
|
|
|
<input id="dept_mail" type="hidden" style="height: 30px" class="form-control" name="dept_mail" value="<?php
|
|
if ($row['emp_id'] != '' || $row['emp_id'] != null) {
|
|
$em_id = $row['emp_id'];
|
|
} else {
|
|
$em_id = $_REQUEST['emp_id'];
|
|
}
|
|
|
|
echo getTableFieldValue('department', 'dept_email', 'dept_id', getTableFieldValue('patient_master', 'dept_id', 'id', $em_id)) ?>" />
|
|
|
|
<input id="appoint" type="hidden" name="appoint" value="<?php echo $_REQUEST['appointmentId'] ?>" />
|
|
<input id="emp_mail" name="emp_mail" type="hidden" value="<?php
|
|
if ($row['emp_id'] != '' || $row['emp_id'] != null) {
|
|
$em_id = $row['emp_id'];
|
|
} else {
|
|
$em_id = $_REQUEST['emp_id'];
|
|
}
|
|
getTableFieldValue('patient_master', 'offiial_email_id', 'id', $em_id); ?>" />
|
|
</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 if ($row['emp_id'] != '' || $row['emp_id'] != null) {
|
|
$emp_id = $row['emp_id'];
|
|
echo $row['emp_id'];
|
|
} else {
|
|
$emp_id = $_REQUEST['emp_id'];
|
|
echo $_REQUEST['emp_id'];
|
|
} ?>" /><input id="appointment_id" name="appointment_id" value="<?php echo $row_history['appointment_id'] ?>" type="hidden" />
|
|
|
|
<input id="followup_id" type="hidden" style="height: 30px" class="form-control" name="followup_id" value="<?php echo $followup_id ?>" />
|
|
<input type="hidden" name="doctor_attended_flag" id="doctor_attended_flag" <?php if ($rolecode == 'DOC' || $row['doctor_attended_flag'] == 'Y') { ?> value="Y" <?php } else { ?> value="N" <?php } ?>>
|
|
<input id="appointment_type" name="appointment_type" type="hidden" value="I" /> <input id="appointment_date" type="text" class="form-control" style="height: 30px" name="appointment_date" /> <span class="input-group-addon">
|
|
<i style="height: 5px" class="fa fa-clock-o bigger-110"></i>
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="appointment_date"><strong style="font-size: 11px">Clearance Time</strong></label>
|
|
|
|
<div class="input-group">
|
|
<input id="out_time" type="text" style="height: 30px" class="form-control" name="out_time" /> <span class="input-group-addon"> <i class="fa fa-clock-o bigger-110" style="height: 5px;"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class=" col-sm-3">
|
|
|
|
<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', $row['case_type'], 1) ?>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
<!-- <div class=" col-sm-2">
|
|
<label class="control-label" for="followup_to_opd"><strong style="font-size: 11px">Followup 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', ($_REQUEST['followup_to_opd'] != '' ? $_REQUEST['followup_to_opd'] : $_REQUEST['followup_to_opd']), '', '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-3">
|
|
<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="complaints"><strong style="font-size: 11px">Complaints</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
<select class="form-control chosen-select" name="complaints[]" id="complaints" multiple>
|
|
<?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 } ?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="examination_remarks"><strong style="font-size: 11px">Risk</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
<select class="form-control chosen-select" name="examination_remarks[]" id="examination_remarks" multiple>
|
|
<?php echo generateOption('examination_findings', 'examination_finding', 'id', '', '') ?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<?php
|
|
$diagnosis_config = getFieldFromTable('value', 'config', 'key_name', 'diagnosis_tag_switch');
|
|
error_log("diagnosis tag switch " . $complaint_config . " compare " . strcmp(strtolower($complaint_config), "false"));
|
|
if (!strcmp(strtolower($diagnosis_config), "false")) {
|
|
?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="Diagnosis"><strong style="font-size: 11px">Solutions <span style="color: red;">*</span></strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
|
|
<select class="form-control chosen-select" name="ailment_new[]" id="ailment_new" multiple>
|
|
<!-- <?php echo generateOptionForMultipleActive('ailment', 'ailment_name', 'ailment_id', '', '') ?> -->
|
|
|
|
<?php
|
|
$ailment_sql = "SELECT CONCAT(ailment_name , ' ( ' , ailment_code ,')') AS ailment_name , ailment_id from ailment";
|
|
|
|
generate_options($ailment_sql, $row['aliment_new'], 'ailment_id', 'ailment_name', '', '');
|
|
?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<?php
|
|
} else { ?>
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="ailment"><strong style="font-size: 11px">Diagnosis</strong></label><br>
|
|
|
|
<div>
|
|
|
|
<input type="text" class="form-control" id="ailment_new" name="ailment_new" data-placeholder="Ailments">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
<!-- <div class="space-6"></div> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="deu_date"><strong style="font-size: 11px">Injury Time</strong></label>
|
|
<div class="input-group">
|
|
<input id="injury_time" type="text" class="form-control" style="height: 30px" name="injury_time" /> <span class="input-group-addon"> <i style="height: 5px" class="fa fa-clock-o bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="ailment_system"><strong style="font-size: 11px">Injury Area
|
|
category</strong></label>
|
|
|
|
<select class="form-control" id="injury_area_cat" name="injury_area_cat">
|
|
<option value="" disabled selected>Please select an option
|
|
</option>
|
|
<option value="IN" <?php if (strcmp($row['injury_area_cat'], 'IN') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Work Related</option>
|
|
<option value="NIN" <?php if (strcmp($row['injury_area_cat'], 'NIN') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Non Work Related</option>
|
|
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="ailment_system"><strong style="font-size: 11px">Injury area type</strong></label>
|
|
|
|
<select class="form-control" id="injury_area_type" name="injury_area_type">
|
|
<option value="" disabled selected>Please select an option
|
|
</option>
|
|
<option value="M" <?php if (strcmp($row['injury_area_type'], 'M') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Manufacturing</option>
|
|
<option value="NM" <?php if (strcmp($row['injury_area_type'], 'NM') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Non Manufacturing</option>
|
|
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Injury Location</strong></label>
|
|
<input type="text" class="form-control" name="incident_location" id="incident_location" value="<?php echo $row['incident_location'] ?>" placeholder="Location where injury happend" maxLength="200">
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <div class="col-sm-6">
|
|
|
|
<label for="role"><strong style="font-size: 11px">Observation Notes</strong></label>
|
|
|
|
|
|
<textarea name="observation_note" rows="4" cols="8" id="observation_note" placeholder="Observation Note" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;text-transform: none !important;"> <?= $row["observation_note"] ?></textarea>
|
|
|
|
</div> -->
|
|
|
|
<div class="col-sm-6">
|
|
<input type="hidden" class="form-control" name="abnormalityIds" id="abnormalityIds" value="" required />
|
|
<label for="role"><strong style="font-size: 11px">Previous Incident History</strong></label>
|
|
|
|
|
|
<textarea name="pre_med_history" rows="4" cols="8" id="pre_med_history" placeholder="Previous Incident History" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;text-transform: none !important;" <?php if ($_SESSION["RoleCode"] != 'DOC') echo "disabled" ?>> <?= $row["pre_med_history"] ?></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<input type="hidden" class="form-control" name="abnormalityIds" id="abnormalityIds" value="" required />
|
|
<label for="role"><strong style="font-size: 11px">Current Condition</strong></label>
|
|
|
|
|
|
<div>
|
|
|
|
<textarea name="doc_comment" rows="4" cols="8" id="doc_comment" placeholder="Currunt Medical History" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;text-transform: none !important;" <?php if ($_SESSION["RoleCode"] != 'DOC') echo "disabled" ?>> <?= $row["doc_comment"] ?></textarea>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12 table-responsive">
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Injury</strong></label>
|
|
<table class="table table-bordered table-hover simple-table">
|
|
<thead>
|
|
<tr class="active">
|
|
|
|
<th><strong style="font-size: 11px">Type</strong></th>
|
|
<th><strong style="font-size: 11px">Part </strong></th>
|
|
<th><strong style="font-size: 11px">Classification</strong>
|
|
</th>
|
|
<th><strong style="font-size: 11px">Mechanism</strong>
|
|
</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr>
|
|
<td class="col-sm-3"><select multiple="" class="chosen-select form-control" name="injury_type_new[]" id="injury_type_new" placeholder="Injury Type"><?php echo generateOptionForMultiple('injury_type', 'injury_type_name', 'injury_type_id', $row['injury_types_new'], ''); ?></select>
|
|
</td>
|
|
<td class="col-sm-3">
|
|
<select multiple="" class="chosen-select form-control" name="injury_part" id="injury_part" placeholder="Affected Body Parts..">
|
|
<?php echo generateOptionForMultiple('injury_part', 'inj_name', 'inj_id', $row['injury_parts_new'], ''); ?></select>
|
|
</td>
|
|
<td class="col-sm-3"><select multiple="" class="chosen-select form-control" name="injury_class_new[]" id="injury_class_new" class="form-control" placeholder="Injury Classification.."><?php echo generateOptionForMultiple('injury_class', 'inj_class_name', 'inj_class_id', $row['injury_classes_new'], ''); ?></select>
|
|
</td>
|
|
<td class="col-sm-3"><select multiple="" class="chosen-select form-control" name="injury_mech_new[]" id="injury_mech_new" class="form-control" placeholder="Injury Mechanism.."><?php echo generateOptionForMultiple('injury_mechanism', 'injury_mech_name', 'injury_mech_id', $row['injury_mech'], ''); ?></select>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="remarks"><strong style="font-size: 11px">Procedures Done(if
|
|
Any)</strong></label>
|
|
<textarea id="pro_remarks" name="pro_remarks" placeholder="Procedure.." rows="3" cols="6" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['injury_procedure'] ?></textarea>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Is the Patient taking any
|
|
Medications:</strong></label>
|
|
|
|
<textarea placeholder="Enter medication details" rows="3" cols="8" id="any_medication" name="any_medication" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['any_medication'] ?></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">History of Drug
|
|
Allergies:</strong></label>
|
|
<select class="chosen-select form-control" name="drug_allergy[]" id="drug_allergy" multiple value='<?= $row['drug_allergy'] ?>' data-placeholder="Ailment System">
|
|
|
|
<?php echo generateOptionForMultiple('salt_master', 'salt_name', 'salt_id', $row['drug_allergy'], ''); ?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<input id="abnormalityIds" name="abnormalityIds" type="hidden">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Chronic Illness</strong></label>
|
|
<select multiple='' class="form-control chosen-select" name="abnormality[]" id='abnormality' onchange="selectAb()" placeholder="Abnormalities.." rows="3" cols="8" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;">
|
|
<?php echo generateOption("abnormality", "abnormality_name", "abnormality_id", "", ""); ?>
|
|
</select>
|
|
|
|
</div> -->
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<!-- <div class="row">
|
|
<?php if ($rolecode != 'DIS' || in_array('DIS', $Rolecodes) == 0) { ?>
|
|
<input type="hidden" name="medicine_disbursement" id="medicine_disbursement" value="N" />
|
|
<?php } else { ?>
|
|
<input type="hidden" name="medicine_disbursement" id="medicine_disbursement" value="Y" />
|
|
<?php } ?>
|
|
<?php
|
|
// if not doctor already consulted
|
|
if ($row['doctor_attended_flag'] != 'Y' && $rolecode != 'DOC') {
|
|
?>
|
|
<div class="col-sm-4">
|
|
<label class=" control-label " for="doctor_discussed"><strong style="font-size: 11px">Doctor Discussed?</strong>
|
|
</label>
|
|
<input <?php if ($row['doctor_discussed'] == 'Y') {
|
|
echo 'checked="checked"';
|
|
} ?> type="radio" name="doctor_discussed" id="doctor_discussed_yes" style="width:50px" value="Y" onchange="setDoctorDiscussed(this.value)"> Yes
|
|
<input <?php if ($row['doctor_discussed'] != 'Y') {
|
|
echo 'checked="checked"';
|
|
} ?> type="radio" name="doctor_discussed" id="doctor_discussed_no" value="N" style="width:50px" onchange="setDoctorDiscussed(this.value)"> No
|
|
</div>
|
|
<div id="doc_discuss_div" style="display: none;">
|
|
<div class="col-sm-8" style="display: flex; align-items: center;">
|
|
<div class="col-sm-2">
|
|
<label for="">Doctor's Name</label>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<select name="doctor_discuss_id" id="doctor_discuss_id" class="form-control">
|
|
<option value="">--Select Doctor--</option>
|
|
<?php
|
|
if (trim($doctor_discussed_id) == '' || $doctor_discussed_id == null) { ?>
|
|
<?php echo generate_options("select doctor_name,doctor_emp_id from doctors_master where doctor_emp_id != '' ", '', 'doctor_emp_id', 'doctor_name', '', '');
|
|
} else { ?>
|
|
<?php echo generate_options("select doctor_name,doctor_emp_id from doctors_master where doctor_emp_id != '' ", $doctor_discussed_id, 'doctor_emp_id', 'doctor_name', '', '');
|
|
} ?>
|
|
</select>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Remarks</strong></label>
|
|
|
|
</div>
|
|
<div class="col-sm-5">
|
|
|
|
<textarea rows="2" cols="7" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;" name="add_remarks" id="add_remarks" placeholder="Additional Remarks" maxlength="500"><?php echo $row['add_remarks'] ?></textarea>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<?php } ?>
|
|
</div> -->
|
|
<div class="space-6"></div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
|
<!-- <button type="button" class="btn" data-toggle="modal" data-target="#medDetails" onclick="loadMedData();"><i class="fa fa-info-circle"></i></button> -->
|
|
|
|
<!-- <?php if ($row['doctor_discussed'] == 'N' || $row['doctor_discussed'] == '') { ?>
|
|
<button type="button" class="btn" title="Load Treatment According To Selected Diagnosis Or Chronic Illness" id="load-treatment-btn" onclick="loadTreatment();">Load
|
|
Treatment</button>
|
|
<?php } ?> -->
|
|
<div class="loader"></div>
|
|
</div>
|
|
|
|
<!-- <div class="col-sm-6" style="display: flex; gap:5px;justify-content: end;align-items: center;">
|
|
<label for="">Days</label>
|
|
<input type="number" id="chronic_day" min="0" name="chronic_day" class="form-control" style="width: 100px;" value="<?= $chronic_days ?>">
|
|
<button type="button" class="btn" title="Load Treatment According To Chronic Illness Mapped For This Patient" id="load-chronic-treatment-btn" onclick="loadChronicTreatment();">Load Chronic
|
|
Treatment</button>
|
|
<div class="loader-chronic"></div>
|
|
</div> -->
|
|
|
|
<div class="col-sm-12 table-responsive">
|
|
|
|
<table id="treatmentTable_new<?php echo $row_history['appointment_id'] ?>" class="table table-striped table-bordered table-responsive">
|
|
<thead>
|
|
<tr class="success">
|
|
<th style="font-size: 9px; text-align: center;width:20%">
|
|
Employee
|
|
</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Status</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Division
|
|
</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Depatment</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Rest Duration
|
|
</th>
|
|
<!-- <th style="font-size: 9px; text-align: center;">Dose
|
|
Qty
|
|
</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Total
|
|
Qty</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Available
|
|
Qty</th>
|
|
<th style="font-size: 9px; text-align: center;">Qty
|
|
Issued</th>-->
|
|
<th style="font-size: 9px; text-align: center;">
|
|
<input type="hidden" value="0" id='cnt_no' name='cnt_no'>
|
|
<a onclick="addRow_new('<?php echo $row['appointment_id'] ?>')" id="addrow<?php echo $row_history['appointment_id'] ?>"><i class="ace-icon fa fa-plus-square bigger-200"></i></a>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id='emp_tb'>
|
|
<tr>
|
|
<!-- <td style="font-size: 10px"><?php echo $srno; ?></td> -->
|
|
<td style="font-size: 10px"><select id='emp_id0' name='emp_id0' class='select2' ><option value="" selected disabled >Please Select Employee</option> <?php echo generateOption('tbl_items','item_name','item_id','','') ?></select></td>
|
|
<td style="font-size: 10px"><select id='status0' name='status0' class='select2' ><option value="" selected disabled >Please Select Status</option><?=generateOption('dosage_category', 'dosage_category', 'dosage_category_id', $rows_treatement['dosage_category_id'],'')?> </select></td>
|
|
<td style="font-size: 10px">
|
|
<select id='medicine_frequency0' name='medicine_frequency0' class='select2' >
|
|
<?php echo generateOption('designation', 'designation_name', 'designation_id', '', ''); ?>
|
|
</select>
|
|
</td>
|
|
|
|
<td style="font-size: 10px">
|
|
<select id='medicine_timings0' name='medicine_timings0' class='select2' >
|
|
<?php echo generateOption('department', 'dept_name', 'dept_id', '', ''); ?>
|
|
</select>
|
|
</td>
|
|
<td style="font-size: 10px">
|
|
<input type="number" id="leaves0" name="leaves0"/>
|
|
</td>
|
|
<td style="font-size: 10px"><?php echo $rows_treatement['for_days'] ?> Days</td>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="injury_part"><strong style="font-size: 11px">Affected Body
|
|
Parts</strong></label>
|
|
<br>
|
|
<div>
|
|
<input type="text" name="injury_part_new" id="injury_part_new" class="form-control" placeholder="Affected Body Parts.." />
|
|
</div>
|
|
</div> -->
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Health Advices</strong></label>
|
|
<br>
|
|
<div>
|
|
<input type="text" name="health_advice_name_new" id="health_advice_name_new" class="form-control" placeholder="Select or Add Health Advices.." />
|
|
</div>
|
|
</div> -->
|
|
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="recommended_test_new"><strong style="font-size: 11px">Recommended Tests</strong></label>
|
|
<br>
|
|
<div>
|
|
<select name="recommended_test_new[]" id="recommended_test_new" class="form-control chosen-select" multiple onchange="loadTestParamData();">
|
|
<?php echo generate_options("select section_name, section_id FROM checkup_form_section WHERE FIND_IN_SET(section_id, (select checkup_form_section_ids FROM checkup_type WHERE checkup_type_code = 'LAB_TEST'));", '', 'section_id', 'section_name', '', ''); ?>
|
|
</select>
|
|
|
|
</div>
|
|
</div> -->
|
|
<!-- <div class="col-sm-3">
|
|
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Recommended Test Parameters</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
<select class="form-control chosen-select" name="recommended_test_param_new[]" id="recommended_test_param_new" multiple></select>
|
|
</div>
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="followup"><strong style="font-size: 11px">Follow-up date</strong></label>
|
|
|
|
<input id="followup" type="date" class="form-control" placeholder="Follow Up" name="followup" value="<?php echo $row['followup'] ?>" />
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
</div>
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="ailment_system"><strong style="font-size: 11px">Status</strong></label>
|
|
<select class=" form-control" id="health_status" name="health_status" data-placeholder="Status">
|
|
|
|
<option selected value="fit">Fit</option>
|
|
<option value="unfit_ob">Unfit-Observation</option>
|
|
<option value="unfit_ref">Unfit-Referral</option>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<label for="role"><strong style="font-size: 11px">Observation Notes</strong></label>
|
|
|
|
|
|
<textarea name="observation_note" rows="2" cols="8" id="observation_note" placeholder="Observation Note" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;text-transform: none !important;"> <?= $row["observation_note"] ?></textarea>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- <div class="row">
|
|
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="followup"><strong
|
|
style="font-size: 11px">Period Of Rest From</strong></label>
|
|
<div class="input-group">
|
|
<input id="rest_from_time" type="text" class="form-control"
|
|
style="height: 30px" name="rest_from_time" /> <span
|
|
class="input-group-addon"> <i style="height: 5px"
|
|
class="fa fa-clock-o bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="followup"><strong
|
|
style="font-size: 11px">Period Of Rest To</strong></label>
|
|
<div class="input-group">
|
|
<input id="rest_to_time" type="text" class="form-control"
|
|
style="height: 30px" name="rest_to_time" /> <span
|
|
class="input-group-addon"> <i style="height: 5px"
|
|
class="fa fa-clock-o bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral"><strong
|
|
style="font-size: 11px">Injury Remarks by Medical
|
|
Officer</strong></label>
|
|
<textarea name="injury_remarks" rows="4" cols="8"
|
|
id="injury_remarks" placeholder="Injury Remarks"
|
|
class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['injury_remarks'] ?></textarea>
|
|
</div>
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
<?php if ($row['recommended_tests_new'] != "" && $row['recommended_tests_new'] != null) { ?>
|
|
<!-- <div class="row">
|
|
<div class="col-sm-12 table-responsive">
|
|
</br>
|
|
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Doctor Recommended Test Result
|
|
:</strong></label>
|
|
</div>
|
|
<div class="col-sm-12 table-responsive">
|
|
<input type="hidden" name="recommended_tests_new" value="<?php echo $row['recommended_tests_new'] ?>">
|
|
<div class="row">
|
|
<?php $test_array = explode(",", $row['recommended_tests_new']);
|
|
for ($i = 0; $i < count($test_array); $i++) { ?>
|
|
<?php if ($i % 2 == 0) { ?>
|
|
</div>
|
|
<div class="row">
|
|
<?php } ?>
|
|
<div class="col-sm-6 table-responsive">
|
|
<?php echo $i + 1; ?> <?php echo getFieldFromTable('section_name', 'checkup_form_section', 'section_id', $test_array[$i]) ?>
|
|
<?php $test_map_array = getKeyValueMapWithWhere('doctor_recommended_test', 'test_name', 'test_result', 'appointment_id', $_REQUEST['appointmentId']); ?>
|
|
<textarea name="test_<?php echo $i ?>" rows="4" cols="4" id="test_<?php echo $i ?>" placeholder="<?php echo $test_array[$i] ?> Test Result" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $test_map_array[$test_array[$i]] ?></textarea>
|
|
</div>
|
|
|
|
<?php }
|
|
|
|
?>
|
|
</div>
|
|
</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>
|
|
|
|
|
|
|
|
|
|
<!-- sick-leave -->
|
|
<?php
|
|
|
|
$sickness_id = "";
|
|
$past_ticket_no = "";
|
|
$past_agency = "";
|
|
$past_des = "";
|
|
$past_from_date = "";
|
|
$past_to_date = "";
|
|
$past_date_absent = "";
|
|
|
|
$past_date_absent_to = "";
|
|
$past_date_return = "";
|
|
$existingAilmentList = "";
|
|
$ailment_id = "";
|
|
$height = "";
|
|
$weight = "";
|
|
$bp = "";
|
|
$pulse = "";
|
|
$chest_ex = "";
|
|
$chest_uex = "";
|
|
$nose = "";
|
|
$throat = "";
|
|
$rs = "";
|
|
$cvs = "";
|
|
$cns = "";
|
|
$sickness_status = "";
|
|
$blood = '';
|
|
$half_day = 0;
|
|
$is_fit = 0;
|
|
$fitness_status = 'APPROVED';
|
|
$certificate_type = 'rest';
|
|
$des = 'NORMAL';
|
|
$comments = '';
|
|
if (!empty($app_id) && ($_REQUEST['followup_id'] != '' && $_REQUEST['followup_id'] != null)) {
|
|
|
|
$query_sick = "select s.*, e.patient_name from sickness s, patient_master e where s.emp_id=e.id and s.followup_to_opd = '" . $_REQUEST['appointmentId'] . "' and s.followup_id = " . $_REQUEST['followup_id'] . "";
|
|
// echo ('leave='.$query_sick);
|
|
error_log($query_sick . "data sick");
|
|
if (!$result_sick = @mysqli_query($conn, $query_sick)) {
|
|
exit(mysqli_error($conn));
|
|
} else {
|
|
$row_sick = @mysqli_fetch_array($result_sick);
|
|
@extract($row_sick);
|
|
|
|
|
|
$sickness_id = $row_sick['sickness_id'];
|
|
$past_ticket_no = $row_sick['ticket_no'];
|
|
$fitness_status = $row_sick['fitness_status'];
|
|
$past_agency = $row_sick['agency'];
|
|
$past_des = $row_sick['des_future'];
|
|
$certificate_type = $row_sick['certificate_type'];
|
|
$past_from_date = $row_sick['from_date'];
|
|
$past_to_date = $row_sick['to_date'];
|
|
$past_date_absent = $row_sick['date_absent'];
|
|
$approval_date = $row_sick['approval_date'];
|
|
$comments = $row_sick['comments'];
|
|
if ($approval_date != '' && $approval_date != null && $approval_date != '0000-00-00 00-00-00') {
|
|
$approval_date = '"' . $row_sick['approval_date'] . '"';
|
|
$is_fit = 1;
|
|
}
|
|
|
|
|
|
$past_date_absent_to = $row_sick['date_absent_to'];
|
|
$past_date_return = $row_sick['date_return'];
|
|
$existingAilmentList = $row_sick['ailment_name'];
|
|
$ailment_id = $row_sick['ailment_system'];
|
|
$height = $row_sick['height'];
|
|
$weight = $row_sick['weight'];
|
|
$bp = $row_sick['bp'];
|
|
$pulse = $row_sick['pulse'];
|
|
$chest_ex = $row_sick['chest_ex'];
|
|
$chest_uex = $row_sick['chest_uex'];
|
|
$nose = $row_sick['nose'];
|
|
$throat = $row_sick['throat'];
|
|
$rs = $row_sick['rs'];
|
|
$cvs = $row_sick['cvs'];
|
|
$cns = $row_sick['cns'];
|
|
$sickness_status = $row_sick['attended_status'];
|
|
$blood = $row_sick['blood'];
|
|
$half_day = $row_sick['half_day'];
|
|
$des = $row_sick['des'];
|
|
}
|
|
}
|
|
|
|
|
|
?>
|
|
<!-- <div class="col-xs-12 table-responsive">
|
|
<div class="widget-box box box-success">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="followup"><strong style="font-size: 11px">Follow-up date</strong></label>
|
|
|
|
<input id="followup" type="datetime-local" class="form-control" placeholder="Follow Up" name="followup" value="<?php echo $row['followup'] ?>" />
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="referral_point"><strong style="font-size: 11px">Follow-up Remarks</strong></label>
|
|
|
|
<div>
|
|
|
|
<input class="form-control" id="followup_remarks" name="followup_remarks" data-placeholder="Referral Doctor" value="<?php echo $row['followup_remarks'] ?>">
|
|
|
|
</input>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div> -->
|
|
|
|
|
|
<!-- <div class="col-xs-12 table-responsive">
|
|
<div class="widget-box box box-success">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<label for="role">Sick note </label>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
|
|
|
|
<?php
|
|
|
|
if (!empty($past_ticket_no)) {
|
|
$ticket_no_sick = $past_ticket_no;
|
|
} else {
|
|
$ticket_no_sick = creatingTicketNoFitness();
|
|
}
|
|
|
|
?>
|
|
<input id="past_ticket_no" type="hidden" name="past_ticket_no" value="<?php echo $ticket_no_sick; ?>" />
|
|
<input type="hidden" class="form-control" name="sickness_id" id="sickness_id" value="<?php echo $sickness_id ?>" required />
|
|
|
|
|
|
<input id="rest_from_time" type="hidden" class="form-control" style="height: 30px" name="rest_from_time" />
|
|
|
|
<input id="rest_to_time" type="hidden" class="form-control" style="height: 30px" name="rest_to_time" />
|
|
|
|
<input class="form-control" type="hidden" name="sickness_status" id="sickness_status" value="<?php echo $sickness_status ?>" required />
|
|
|
|
<div class="form-group col-sm-3" style=" padding-left: 0px;" align='center'>
|
|
<div class="dt-button buttons-csv form-group buttons-html5 btn btn-white btn-primary btn-bold save_button" style="margin-top: 20px;">
|
|
Half Day <input type="checkbox" id='half_day' onchange='half_day_select()' value="<?php echo $half_day ?>" style="width: 40%; " <?php if ($half_day == 1) echo 'checked'; ?> name="half_day">
|
|
</input>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="form-group col-sm-3">
|
|
<label for="role">Period Of Rest From</label>
|
|
<div class="input-group form-group ">
|
|
<input class="form-control" onchange="rest_from(this)" name="date_absent" id="date_absent" type="text" /> <span class="input-group-addon">
|
|
<i class="fa fa-calendar bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-sm-3">
|
|
<label for="role">Period Of Rest To</label>
|
|
|
|
<div class="input-group">
|
|
<input class="form-control" name="date_absent_to" id="date_absent_to" type="text" onchange="rest_to(this)" />
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<input class=" form-control" type='hidden' name="certificate_type" id="certificate_type" placeholder="Certificate Type" value="<?= $certificate_type ?>">
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="appointment_id"><strong style="font-size: 11px">Leave Remarks:</strong></label>
|
|
|
|
<textarea name="injury_remarks" rows="3" cols="4" id="injury_remarks" placeholder="Injury Remarks" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $comments ?></textarea>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
<div class="col-xs-12 table-responsive">
|
|
<div class="widget-box box box-success">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="referral_point"><strong style="font-size: 11px">Referral</strong></label>
|
|
|
|
<div>
|
|
|
|
<select class="form-control select2" id="referral_point" name="referral_point" data-placeholder="Referral">
|
|
<option value="" disabled selected>Please select an option
|
|
</option>
|
|
<?= generateOption("referral_point", "referral_point_name", "referral_point_id", $row['referral'], "") ?>
|
|
|
|
<!-- <?php
|
|
$sql_driver = "SELECT CONCAT(referral_point_name ,' - ',city , ' ( ' , hospital_name ,')') AS referral_point_name , referral_point_id from referral_point where ohc_type ='" . $_SESSION['current_ohcttype'] . "' ";
|
|
error_log($sql_driver . "get_ref_data");
|
|
|
|
generate_options($sql_driver, $row['referral'], 'referral_point_id', 'referral_point_name', '', '');
|
|
?> -->
|
|
</select>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="referral_point"><strong style="font-size: 11px">Referral Remarks</strong></label>
|
|
|
|
<div>
|
|
|
|
<input class="form-control" id="referral_doc" name="referral_doc" data-placeholder="Referral remark" value="<?php echo $row['referral_doc'] ?>">
|
|
|
|
</input>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Medevac Used: Yes/No</strong></label>
|
|
|
|
|
|
<select class="form-control" id="ambulance_used" name="ambulance_used">
|
|
<option value="" disabled selected>Please select an option
|
|
</option>
|
|
<option value="Y" <?php if (strcmp($row['ambulance_used'], 'Y') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Yes</option>
|
|
<option value="N" <?php if (strcmp($row['ambulance_used'], 'N') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
No</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Date and Time:
|
|
</strong></label>
|
|
|
|
|
|
<div class="input-group" id="discharge">
|
|
<input id="discharge_time" type="text" class="form-control" style="height: 30px" name="discharge_time" /> <span class="input-group-addon"> <i style="height: 5px" class="fa fa-clock-o bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="medDetails" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">Selected Medicine Info</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table id="med-detail-table" class="table" cellspacing="0" width="100%" border="1">
|
|
<thead>
|
|
<tr>
|
|
<th> <b> Medicine</b></th>
|
|
<th> <b> precaution</b></th>
|
|
<th> <b> Composition</b></th>
|
|
<th> <b> Indication</b></th>
|
|
<th> <b> Contraindication</b></th>
|
|
<th> <b> Side Effects</b></th>
|
|
<th> <b> Alternates</b></th>
|
|
<th> <b> Prescription Medicine</b></th>
|
|
<th> <b> Interactions</b></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal for alternate medicine -->
|
|
<div id="alternative_med" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">This Medicine is not available in stock.</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<h4>Alternate Medicines List..</h4>
|
|
<div class="med-content"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
<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">
|
|
function loadTestParamData() {
|
|
let recommendedTestData = $("#recommended_test_new").val();
|
|
console.log(recommendedTestData);
|
|
if (recommendedTestData) {
|
|
$.ajax({
|
|
async: 'false',
|
|
type: 'post',
|
|
url: 'get_parameter_based_on_section.php',
|
|
data: {
|
|
sectionIds: recommendedTestData
|
|
},
|
|
success: function(data) {
|
|
|
|
|
|
data = JSON.parse(data);
|
|
|
|
console.log(data);
|
|
|
|
$('#recommended_test_param_new').empty();
|
|
|
|
// Create a placeholder option
|
|
// $('#recommended_test_param_new').append($('<option>', {
|
|
// value: '',
|
|
// text: '--select--'
|
|
// }));
|
|
|
|
$.each(data, function(sectionId, parameters) {
|
|
$.each(parameters, function(index, parameter) {
|
|
// Create an option element
|
|
var parameterName = parameter.parameter_name.toLowerCase();
|
|
|
|
var option = $('<option>', {
|
|
value: parameter.checkup_parameter_id,
|
|
text: parameterName
|
|
});
|
|
|
|
// Append the option to the select element
|
|
$('#recommended_test_param_new').append(option);
|
|
});
|
|
});
|
|
|
|
// Update the Chosen plugin to reflect the changes
|
|
$('#recommended_test_param_new').trigger('chosen:updated');
|
|
|
|
<?php if ($row['recommended_test_param_new'] != '' && $row['recommended_test_param_new'] != null) { ?>
|
|
var recommended_test_new_param = '<?= $row['recommended_test_param_new'] ?>';
|
|
dataarray_recommended_test_new_param = recommended_test_new_param.split(",");
|
|
console.log(dataarray_recommended_test_new_param);
|
|
$("#recommended_test_param_new").val(dataarray_recommended_test_new_param);
|
|
$('#recommended_test_param_new').trigger('chosen:updated');
|
|
<?php } ?>
|
|
},
|
|
error: function(data) {
|
|
console.log("error");
|
|
}
|
|
});
|
|
} else {
|
|
$('#recommended_test_param_new').empty();
|
|
$('#recommended_test_param_new').trigger('chosen:updated');
|
|
}
|
|
}
|
|
|
|
// to update diagnosis value if config is false
|
|
<?php if (!strcmp(strtolower($diagnosis_config), "false")) { ?>
|
|
var ailment_names = '<?= $row['ailments_new'] ?>';
|
|
dataarray = ailment_names.split(",");
|
|
$("#ailment_new").val(dataarray);
|
|
$('#ailment_new').trigger('chosen:updated');
|
|
<?php } ?>
|
|
|
|
// to update findings value if config is false
|
|
|
|
var examination_finding_names = '<?= $row['examination_remarks'] ?>';
|
|
dataarray = examination_finding_names.split(",");
|
|
$("#examination_remarks").val(dataarray);
|
|
$('#examination_remarks').trigger('chosen:updated');
|
|
|
|
var recommended_test_new_data = '<?= $row['recommended_tests_new'] ?>';
|
|
dataarray_recommended_test_new = recommended_test_new_data.split(",");
|
|
console.log(dataarray_recommended_test_new);
|
|
$("#recommended_test_new").val(dataarray_recommended_test_new);
|
|
$('#recommended_test_new').trigger('chosen:updated');
|
|
|
|
|
|
// to update complaints value if config is false
|
|
<?php if (!strcmp(strtolower($complaint_config), "false")) { ?>
|
|
var complaint_names = '<?= $row['complaints'] ?>';
|
|
dataarray = complaint_names.split(",");
|
|
$("#complaints").val(dataarray);
|
|
$('#complaints').trigger('chosen:updated');
|
|
<?php } ?>
|
|
|
|
|
|
|
|
var drug_allergy_names = '<?= $row['drug_allergy'] ?>';
|
|
dataarray_drug_allergy = drug_allergy_names.split(",");
|
|
$("#drug_allergy").val(dataarray_drug_allergy);
|
|
$('#drug_allergy').trigger('chosen:updated');
|
|
|
|
|
|
$('#injury_type_new').trigger("chosen:updated");
|
|
$('#injury_part_new').trigger("chosen:updated");
|
|
$('#injury_class_new').trigger("chosen:updated");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ace.vars['old_ie']) $('#appointment_date').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
<?php if (isset($row['appointment_date']) && $row['appointment_date'] != '0000-00-00 00:00:00' && ($_REQUEST['followup_id'] != '' && $_REQUEST['followup_id'] != null)) { ?>
|
|
defaultDate: new Date("<?php echo $row['appointment_date'] ?>") <?php } else { ?>
|
|
defaultDate: new Date() <?php } ?>,
|
|
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']) $('#injury_time').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
<?php if ($row['injury_time'] != '') { ?> defaultDate: new Date(
|
|
"<?php echo $row['injury_time'] ?>") <?php } else { ?>
|
|
defaultDate: new Date() <?php } ?>,
|
|
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();
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
$(".glyphicon").css("top", "");
|
|
|
|
|
|
});
|
|
|
|
function open_treatments(appointment_id) {
|
|
$('#modal-add-consultation').modal("show");
|
|
|
|
}
|
|
|
|
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 followup_ohc_note(id) {
|
|
// loadExistingAppointmentTreatment(id);
|
|
var dis = 1;
|
|
$.ajax({
|
|
url: 'followup_ohc_note.php',
|
|
data: {
|
|
id: id,
|
|
dis: dis
|
|
},
|
|
// dataType: 'json',
|
|
success(re) {
|
|
var data = JSON.parse(re)
|
|
console.log(data.injury_area_cat + "re");
|
|
if (re == null) {
|
|
|
|
} else {
|
|
|
|
console.log(data + "data");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var complaints = data.complaints;
|
|
// complaints111 = complaints.split(",");
|
|
|
|
|
|
|
|
|
|
// $("#complaints").val(complaints111);
|
|
// $('#ailment_new').trigger('chosen:updated');
|
|
|
|
// var complaint_names111 = data.complaints;
|
|
// dataarray111 = complaint_names111.split(",");
|
|
|
|
// $("#complaints").val(data.complaints);
|
|
// $('#complaints').trigger('chosen:updated');
|
|
console.log("MM");
|
|
$("#ailment_new").val(re);
|
|
$("#remarks_rece").val(data.remarks_rece);
|
|
$("#injury_area_cat").val(data.injury_area_cat);
|
|
$('#injury_area_cat').trigger('chosen:updated');
|
|
$("#referred_by").val(data.referred_by);
|
|
$('#referred_by').trigger('chosen:updated');
|
|
$("#isEmergency").val(data.IsEmergency);
|
|
$('#isEmergency').trigger('chosen:updated');
|
|
$("#isChargeable").val(data.IsChargeable);
|
|
$('#isChargeable').trigger('chosen:updated');
|
|
$("#weight").val(data.weight);
|
|
$("#height").val(data.height);
|
|
$("#bmi").val(data.bmi);
|
|
$("#sbp").val(data.sbp);
|
|
$("#dbp").val(data.dbp);
|
|
$("#temperature").val(data.temperature);
|
|
$("#resp_rate").val(data.resp_rate);
|
|
$("#heart_rate").val(data.heart_rate);
|
|
$("#urine_output").val(data.urine_output);
|
|
$("#fbs").val(data.fbs);
|
|
$("#rbs").val(data.rbs);
|
|
$("#ppbs").val(data.blood_sugar_ppbs);
|
|
$("#spo2_percent").val(data.spo2_percent);
|
|
$("#avpu").val(data.avpu);
|
|
$("#trama").val(data.trama);
|
|
$("#oxygen_supply").val(data.oxygen_supply);
|
|
$("#glasgow_coma_scale").val(data.glasgow_coma_scale);
|
|
$("#total_cholesterol").val(data.total_cholesterol);
|
|
$("#mobility").val(data.mobility);
|
|
$("#ecg_finding").val(data.ecg_findings);
|
|
$("#examination_remarks").val(data.examination_remarks);
|
|
console.log(data.examination_remarks + "examination_remarks");
|
|
$('#examination_remarks').trigger('chosen:updated');
|
|
$("#ailment_new").val(data.ailment_new);
|
|
$('#ailment_new').trigger('chosen:updated');
|
|
$("#injury_area_type").val(data.injury_area_type);
|
|
$("#incident_location").val(data.incident_location);
|
|
|
|
var injury_type_new11 = data.injury_type_new;
|
|
dataarray111 = injury_type_new11.split(",");
|
|
$("#injury_type_new").val(dataarray111);
|
|
$('#injury_type_new').trigger('chosen:updated');
|
|
|
|
|
|
|
|
var injury_parts_new11 = data.injury_parts_new;
|
|
dataarrayinjury_parts_new = injury_parts_new11.split(",");
|
|
$("#injury_part").val(dataarrayinjury_parts_new);
|
|
$('#injury_part').trigger('chosen:updated');
|
|
|
|
var injury_classes_new11 = data.injury_classes_new;
|
|
dataarrayinjury_classes_new = injury_classes_new11.split(",");
|
|
$("#injury_class_new").val(dataarrayinjury_classes_new);
|
|
$('#injury_class_new').trigger('chosen:updated');
|
|
|
|
var injury_mech_new11 = data.injury_mech;
|
|
dataarrayinjury_classes_new = injury_mech_new11.split(",");
|
|
$("#injury_mech_new").val(dataarrayinjury_classes_new);
|
|
$('#injury_mech_new').trigger('chosen:updated');
|
|
|
|
$("#pro_remarks").val(data.injury_procedure);
|
|
|
|
$("#any_medication").val(data.any_medication);
|
|
$("#drug_allergy").val(data.drug_allergy);
|
|
// $("#health_program_enrolment").val(data.health_program_enrolment);
|
|
|
|
// var health_program_enrolment11 = data.health_program_enrolment;
|
|
// dataarrayhealth_program_enrolment = health_program_enrolment11.split(",");
|
|
// $("#health_program_enrolment").val(dataarrayhealth_program_enrolment);
|
|
// $('#health_program_enrolment').trigger('chosen:updated');
|
|
|
|
|
|
var abnormalitys11 = data.abnormalitys;
|
|
abnormalitysarry = abnormalitys11.split(",");
|
|
$("#abnormality").val(abnormalitysarry);
|
|
$('#abnormality').trigger('chosen:updated');
|
|
|
|
var health_advices11 = data.health_advices_new;
|
|
dataarrayhealth_advices = health_advices11.split(",");
|
|
$("#health_advice_name_new").val(dataarrayhealth_advices);
|
|
$('#health_advice_name_new').trigger('chosen:updated');
|
|
|
|
|
|
$("#recommended_test_new").val(data.recommended_test_new);
|
|
$("#remarks").val(data.remarks);
|
|
$("#external_treatments").val(data.external_treatments);
|
|
|
|
$("#followup").val(data.followup);
|
|
$("#injury_time").val(moment(data.injury_time).format('DD/MM/YYYY h:mm A'));
|
|
$("#injury_remarks").val(data.injury_remarks);
|
|
$("#rest_from_time").val(moment(data.rest_from_time).format('DD/MM/YYYY h:mm A'));
|
|
$("#rest_to_time").val(moment(data.rest_to_time).format('DD/MM/YYYY h:mm A'));
|
|
$("#discharge_time").val(moment(data.discharge_time).format('DD/MM/YYYY h:mm A'));
|
|
$("#out_time").val(moment(data.clearance_time).format('DD/MM/YYYY h:mm A'));
|
|
$("#referral_point").val(data.referral);
|
|
$("#ambulance_used").val(data.ambulance_used);
|
|
|
|
|
|
|
|
|
|
if ($('#complaints')) {
|
|
setTimeout(function() {
|
|
var complaints = $('#complaints');
|
|
try {
|
|
complaints.tag({
|
|
placeholder: complaints.attr('placeholder'),
|
|
source: complaints,
|
|
})
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj_complaints = $('#complaints').data('tag');
|
|
var existingcomplaints = data.complaints;
|
|
|
|
|
|
|
|
|
|
if (existingcomplaints != undefined && existingcomplaints != null && existingcomplaints !=
|
|
'') {
|
|
var complaintsArr = existingcomplaints.split(",");
|
|
jQuery.each(complaintsArr, function(i, val) {
|
|
$tag_obj_complaints.add(val.toUpperCase());
|
|
});
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
complaints.after('<textarea id="' + complaints.attr('id') + '" name="' +
|
|
complaints.attr('name') + '" rows="3">' + complaints.val() +
|
|
'</textarea>').remove();
|
|
}
|
|
|
|
var y = $('#complaints').parents(".col-sm-3").width();
|
|
$('#complaints').siblings().css('width', y - 5);
|
|
}, 500);
|
|
}
|
|
|
|
if ($('#examination_remarks')) {
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
var tag_input_findings = $('#examination_remarks');
|
|
try {
|
|
tag_input_findings.tag({
|
|
placeholder: tag_input_findings.attr('placeholder'),
|
|
|
|
source: tag_input_findings,
|
|
|
|
|
|
})
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj = $('#examination_remarks').data('tag');
|
|
|
|
|
|
var existingFindings = data.examination_remarks;
|
|
|
|
if (existingFindings != undefined && existingFindings != null && existingFindings !=
|
|
'') {
|
|
var existingFindingsArr = existingFindings.split(",");
|
|
jQuery.each(existingFindingsArr, function(i, val) {
|
|
$tag_obj.add(val.toUpperCase());
|
|
});
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
tag_input_findings.after('<textarea id="' + tag_input_findings.attr('id') + '" name="' +
|
|
tag_input_findings.attr('name') + '" rows="3">' + tag_input_findings.val() +
|
|
'</textarea>').remove();
|
|
|
|
}
|
|
|
|
var y = $('#examination_remarks').parents(".col-sm-3").width();
|
|
$('#examination_remarks').siblings().css('width', y - 5);
|
|
|
|
|
|
}, 500);
|
|
}
|
|
|
|
|
|
// if ($('#ailment_new')) {
|
|
// setTimeout(function() {
|
|
|
|
// var ailment_new = $('#ailment_new');
|
|
// try {
|
|
// ailment_new.tag({
|
|
// placeholder: ailment_new.attr('placeholder'),
|
|
|
|
// source: findings,
|
|
|
|
|
|
// })
|
|
|
|
// //programmatically add/remove a tag
|
|
// var $tag_obj_ailment_new = $('#ailment_new').data('tag');
|
|
|
|
// var existingailment_new =
|
|
// data.ailment_new;
|
|
|
|
// if (existingailment_new != undefined && existingailment_new != null && existingailment_new !=
|
|
// '') {
|
|
// var ailment_newArr = existingailment_new.split(",");
|
|
// jQuery.each(ailment_newArr, function(i, val) {
|
|
// $tag_obj_ailment_new.add(val.toUpperCase());
|
|
// });
|
|
// }
|
|
|
|
// } catch (e) {
|
|
|
|
// ailment_new.after('<textarea id="' + ailment_new.attr('id') + '" name="' +
|
|
// ailment_new.attr('name') + '" rows="3">' + ailment_new.val() +
|
|
// '</textarea>').remove();
|
|
|
|
// }
|
|
|
|
// var y = $('#ailment_new').parents(".col-sm-3").width();
|
|
// $('#ailment_new').siblings().css('width', y - 5);
|
|
|
|
|
|
// }, 500);
|
|
// }
|
|
|
|
|
|
// if ($('#injury_type_new')) {
|
|
// setTimeout(function() {
|
|
|
|
// var injury_type_new = $('#injury_type_new');
|
|
// try {
|
|
// injury_type_new.tag({
|
|
// placeholder: injury_type_new.attr('placeholder'),
|
|
|
|
// source: findings,
|
|
|
|
|
|
// })
|
|
|
|
// //programmatically add/remove a tag
|
|
// var $ailment_new_new = $('#injury_type_new').data('tag');
|
|
|
|
// var existingailment_new =
|
|
// data.ailment_new;
|
|
|
|
// if (existingailment_new != undefined && existingailment_new != null && existingailment_new !=
|
|
// '') {
|
|
// var ailment_newArr = existingailment_new.split(",");
|
|
// jQuery.each(ailment_newArr, function(i, val) {
|
|
// $ailment_new_new.add(val.toUpperCase());
|
|
// });
|
|
// }
|
|
|
|
// } catch (e) {
|
|
|
|
// ailment_new.after('<textarea id="' + ailment_new.attr('id') + '" name="' +
|
|
// ailment_new.attr('name') + '" rows="3">' + ailment_new.val() +
|
|
// '</textarea>').remove();
|
|
|
|
// }
|
|
|
|
// var y = $('#ailment_new').parents(".col-sm-3").width();
|
|
// $('#ailment_new').siblings().css('width', y - 5);
|
|
|
|
|
|
// }, 500);
|
|
// }
|
|
|
|
|
|
// if ($('#health_advice_name_new')) {
|
|
// setTimeout(function() {
|
|
// var health_advice_name_new = $('#health_advice_name_new');
|
|
// try {
|
|
// health_advice_name_new.tag({
|
|
// placeholder: health_advice_name_new.attr('placeholder'),
|
|
// source: findings,
|
|
// })
|
|
|
|
// //programmatically add/remove a tag
|
|
// var $tag_obj_health_advice_name_new = $('#health_advice_name_new').data('tag');
|
|
// var existinghealth_advice_name_new =
|
|
// data.health_advices_new;
|
|
|
|
// if (existinghealth_advice_name_new != undefined && existinghealth_advice_name_new != null && existinghealth_advice_name_new !=
|
|
// '') {
|
|
// var health_advice_name_newArr = existinghealth_advice_name_new.split(",");
|
|
// jQuery.each(health_advice_name_newArr, function(i, val) {
|
|
// $tag_obj_health_advice_name_new.add(val.toUpperCase());
|
|
// });
|
|
// }
|
|
|
|
// } catch (e) {
|
|
|
|
// health_advice_name_new.after('<textarea id="' + health_advice_name_new.attr('id') + '" name="' +
|
|
// health_advice_name_new.attr('name') + '" rows="3">' + health_advice_name_new.val() +
|
|
// '</textarea>').remove();
|
|
// }
|
|
|
|
// var y = $('#health_advice_name_new').parents(".col-sm-3").width();
|
|
// $('#health_advice_name_new').siblings().css('width', y - 5);
|
|
// }, 500);
|
|
// }
|
|
|
|
// if ($('#health_advice_name_new')) {
|
|
// setTimeout(function() {
|
|
// var health_advice_name_new = $('#health_advice_name_new');
|
|
// try {
|
|
// health_advice_name_new.tag({
|
|
// placeholder: health_advice_name_new.attr('placeholder'),
|
|
// source: findings,
|
|
// })
|
|
|
|
// //programmatically add/remove a tag
|
|
// var $tag_obj_health_advice_name_new = $('#health_advice_name_new').data('tag');
|
|
// var existinghealth_advice_name_new =
|
|
// data.health_advices_new;
|
|
|
|
// if (existinghealth_advice_name_new != undefined && existinghealth_advice_name_new != null && existinghealth_advice_name_new !=
|
|
// '') {
|
|
// var health_advice_name_newArr = existinghealth_advice_name_new.split(",");
|
|
// jQuery.each(health_advice_name_newArr, function(i, val) {
|
|
// $tag_obj_health_advice_name_new.add(val.toUpperCase());
|
|
// });
|
|
// }
|
|
|
|
// } catch (e) {
|
|
|
|
// health_advice_name_new.after('<textarea id="' + health_advice_name_new.attr('id') + '" name="' +
|
|
// health_advice_name_new.attr('name') + '" rows="3">' + health_advice_name_new.val() +
|
|
// '</textarea>').remove();
|
|
// }
|
|
|
|
// var y = $('#health_advice_name_new').parents(".col-sm-3").width();
|
|
// $('#health_advice_name_new').siblings().css('width', y - 5);
|
|
// }, 500);
|
|
// }
|
|
|
|
|
|
// if ($('#recommended_test_new')) {
|
|
// setTimeout(function() {
|
|
// var recommended_test_new = $('#recommended_test_new');
|
|
// try {
|
|
// recommended_test_new.tag({
|
|
// placeholder: recommended_test_new.attr('placeholder'),
|
|
// source: findings,
|
|
// })
|
|
|
|
// //programmatically add/remove a tag
|
|
// var $tag_obj_recommended_test_new = $('#recommended_test_new').data('tag');
|
|
// var existingrecommended_test_new =
|
|
// data.recommended_tests_new;
|
|
|
|
// if (existingrecommended_test_new != undefined && existingrecommended_test_new != null && existingrecommended_test_new !=
|
|
// '') {
|
|
// var recommended_test_newArr = existingrecommended_test_new .split(",");
|
|
// jQuery.each(recommended_test_newArr, function(i, val) {
|
|
// $tag_obj_recommended_test_new.add(val.toUpperCase());
|
|
// });
|
|
// }
|
|
|
|
// } catch (e) {
|
|
|
|
// recommended_test_new.after('<textarea id="' + recommended_test_new.attr('id') + '" name="' +
|
|
// recommended_test_new.attr('name') + '" rows="3">' + recommended_test_new.val() +
|
|
// '</textarea>').remove();
|
|
// }
|
|
|
|
// var y = $('#recommended_test_new').parents(".col-sm-3").width();
|
|
// $('#recommended_test_new').siblings().css('width', y - 5);
|
|
// }, 500);
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function opd_form(id) {
|
|
$("#flex_opd_id").val(id);
|
|
$("#flex_form_opd_for").attr('method', 'POST');
|
|
$("#flex_form_opd_for").attr('action', 'opd_form.php');
|
|
$("#flex_form_opd_for").submit();
|
|
|
|
}
|
|
|
|
function convertToOPD() {
|
|
|
|
$.ajax({
|
|
url: 'update_appointment.php',
|
|
type: "POST",
|
|
data: $("#opd_form").serialize(),
|
|
success: function(data) {
|
|
BootstrapDialog.alert('Case converted to OPD successfully!');
|
|
location.href = "appointment_list.php";
|
|
return;
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error in conversion!');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jQuery(function($) {
|
|
|
|
|
|
$("#forwardButton").on("click", function() {
|
|
document.getElementById("forwardButton").style.display = 'none';
|
|
document.getElementsByClassName("loader")[0].style.display = 'block';
|
|
// var forwardButton = document.getElementById("forwardButton");
|
|
|
|
// forwardButton.removeEventListener("click", arguments.callee); // Remove the click event listener
|
|
// forwardButton.style.pointerEvents = "none"; // Disable pointer events on the link
|
|
|
|
<?php if ($rolecode == 'DOC'||$rolecode == 'RCP') { ?>
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
// validate_update('opd_form',
|
|
// '<?php echo $row['appointment_id'] ?>');
|
|
save_appointment();
|
|
|
|
|
|
|
|
<?php } else if ($rolecode == $__ROLE_DISPENSARY || in_array('DIS', $Rolecodes)) { ?>
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
validate_update('opd_form',
|
|
'<?php echo $row['appointment_id'] ?>')
|
|
<?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.'
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//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']) $('#injury_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();
|
|
});
|
|
|
|
|
|
if (!ace.vars['old_ie']) $('#out_time').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
// defaultDate: new Date(),
|
|
<?php if (isset($row['clearance_time']) && $row['clearance_time'] != '0000-00-00 00:00:00' && ($_REQUEST['followup_id'] != '' && $_REQUEST['followup_id'] != null)) { ?>
|
|
defaultDate: new Date("<?php echo $row['clearance_time'] ?>"),
|
|
<?php } else { ?>
|
|
defaultDate: new Date(),
|
|
<?php } ?>
|
|
maxDate: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
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']) $('#discharge_time').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
<?php if (isset($row['discharge_time']) && $row['discharge_time'] != '0000-00-00 00:00:00') { ?>
|
|
defaultDate: new Date("<?php echo $row['discharge_time'] ?>"),
|
|
<?php } ?>
|
|
maxDate: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
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']) $('#rest_to_time').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
<?php if (isset($row['rest_to_time']) && $row['rest_to_time'] != '0000-00-00 00:00:00') { ?>
|
|
defaultDate: new Date("<?php echo $row['rest_to_time'] ?>"),
|
|
<?php } ?>
|
|
maxDate: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
// endDate: '+30d',
|
|
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']) $('#rest_from_time').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A', //use this option to display seconds
|
|
<?php if (isset($row['rest_from_time']) && $row['rest_from_time'] != '0000-00-00 00:00:00') { ?>
|
|
defaultDate: new Date("<?php echo $row['rest_from_time'] ?>"),
|
|
<?php } ?>
|
|
maxDate: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
// endDate: '+30d',
|
|
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']) $('#followup').datetimepicker({
|
|
// format: 'DD/MM/YYYY', //use this option to display seconds
|
|
// <?php if (isset($row['followup']) && $row['followup'] != '0000-00-00' && $row['followup'] != null) { ?>
|
|
// defaultDate: new Date("<?php echo $row['followup'] ?>"),
|
|
// <?php } ?>
|
|
// maxDate: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
// // endDate: '+30d',
|
|
// 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();
|
|
// });
|
|
|
|
|
|
$(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();
|
|
});
|
|
|
|
});
|
|
|
|
function exporttopdf() {
|
|
|
|
var appointment_id_pdf = $("#appointment_id").val();
|
|
//alert(appointment_id_pdf);
|
|
window.open('injury_form_pdf.php?appointment_id_pdf=' + appointment_id_pdf + '');
|
|
|
|
}
|
|
|
|
function add_consume() {
|
|
$('#consumables').modal("show");
|
|
|
|
}
|
|
|
|
function showDetail(value) {
|
|
if (value == 'Y') {
|
|
$("#is_admitted").hide();
|
|
$("#discharge").show();
|
|
} else {
|
|
$("#is_admitted").show();
|
|
$("#discharge").hide();
|
|
}
|
|
}
|
|
|
|
function abnormality_selecter() {
|
|
var data_emp_id = '<?= $row['abnormalitys'] ?>';
|
|
if (data_emp_id != "" || data_emp_id != null)
|
|
emp_ids = data_emp_id.split(",");
|
|
var element = document.getElementById('abnormality');
|
|
for (var i = 0; i < element.options.length; i++) {
|
|
element.options[i].selected = emp_ids.indexOf(element.options[i].value) >= 0;
|
|
}
|
|
$('#abnormality').trigger('chosen:updated');
|
|
|
|
}
|
|
|
|
function selectAb() {
|
|
$("#abnormalityIds").val($('#abnormality').val());
|
|
}
|
|
window.onload = abnormality_selecter();
|
|
</script>
|
|
<?php include('opd_injury_common_code.php'); ?>
|
|
<?php include('consumables.php'); ?>
|
|
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
<?php //include('search_template.php');
|
|
if ($saved_ohc_id != $_SESSION['current_ohcttype']) {
|
|
error_log("saved ohc " . $saved_ohc_id . " curr ohc " . $_SESSION['current_ohcttype']) ?>
|
|
disableTreatmentTable();
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
function disableTreatmentTable() {
|
|
console.log("row " + num_rows_treatment);
|
|
|
|
for (let row_count = 0; row_count < num_rows_treatment; row_count++) {
|
|
console.log(row_count);
|
|
document.getElementById('treatment_item_' + row_count).disabled = 'true';
|
|
document.getElementById('treatment_item_dosage_' + row_count).disabled = 'true';
|
|
document.getElementById('timings_' + row_count).disabled = 'true';
|
|
document.getElementById('treatment_item_dosage_category_' + row_count).disabled = 'true';
|
|
document.getElementById('treatment_item_days_' + row_count).readOnly = true;
|
|
document.getElementById('dose_qty_' + row_count).readOnly = true;
|
|
document.getElementById('treatment_item_qtygvn_' + row_count).readOnly = true;
|
|
}
|
|
if (rolecode == 'DIS') {
|
|
document.getElementById('doctor_discussed_yes').disabled = 'true';
|
|
document.getElementById('doctor_discussed_no').disabled = 'true';
|
|
}
|
|
}
|
|
|
|
loadTestParamData();
|
|
|
|
});
|
|
|
|
function rest_to(val) {
|
|
$('#rest_to_time').val(val);
|
|
}
|
|
|
|
function rest_from(val) {
|
|
$('#rest_from_time').val(val);
|
|
}
|
|
$('#date_absent').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: "+1d"
|
|
|
|
})
|
|
<?php if ($past_date_absent != '' && $past_date_absent != null) { ?>
|
|
$('#date_absent').datepicker("setDate", new Date("<?php echo $past_date_absent ?>"))
|
|
<?php } ?>;
|
|
|
|
$('#date_absent_to').datepicker({
|
|
format: 'dd/mm/yyyy'
|
|
});
|
|
|
|
<?php if (isset($past_date_absent_to) && $past_date_absent_to != '' && $past_date_absent_to != null) { ?>
|
|
$('#date_absent_to').datepicker("setDate", new Date("<?php echo $past_date_absent_to ?>"))
|
|
<?php } ?>;
|
|
|
|
|
|
<?php if ($doctor_discussed_id != 0) { ?>
|
|
$("#doc_discuss_div").toggle();
|
|
<?php } ?>
|
|
function addRow_new(id){
|
|
var i=$('#cnt_no').val();
|
|
// alert(i);
|
|
i++;
|
|
$('#cnt_no').val(i);
|
|
var cnt= `<tr style=\"width:70%\"> <td style="font-size: 10px ;"><select class='emptd' id="emp_id`+i+`" name="emp_id`+i+`" class="select2" ><option value="" selected disabled >Please Select Employee</option>+ <?php echo generateOption('tbl_items','item_name','item_id','','') ?></select></td>`;
|
|
cnt+=`<td style="font-size: 10px"><select id="status`+i+`" name="status`+i+`" class="select2" ><option value="" selected disabled >Please Select Status</option><?=generateOption('dosage_category', 'dosage_category', 'dosage_category_id', $rows_treatement['dosage_category_id'],'')?> </select></td>`;
|
|
cnt+=` <td style="font-size: 10px">`;
|
|
cnt+=`<select id="medicine_frequency`+i+`" name="medicine_frequency`+i+`" class="emptd select2" > <?php echo generateOption('designation', 'designation_name', 'designation_id', '', ''); ?> </select></td><td style="font-size: 10px"><select id="medicine_timings`+i+`" name="medicine_timings`+i+`" class="emptd select2" ><?php echo generateOption('department', 'dept_name', 'dept_id', '', ''); ?></select></td><td style="font-size: 10px"><input type="number" id="leaves`+i+`" name="leaves`+i+`"/></td><td style="font-size: 10px"><?php echo $rows_treatement['for_days'] ?> Days</td></tr>`;
|
|
|
|
$('#treatmentTable_new tbody').append(cnt);
|
|
$(".emptd").width("100%");
|
|
}
|
|
</script>
|