1622 lines
90 KiB
PHP
1622 lines
90 KiB
PHP
<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
|
|
|
|
<!-- page specific pl styles -->
|
|
<link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
|
|
<link rel="stylesheet" href="assets/css/chosen.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datetimepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />
|
|
<link rel="stylesheet" href="adminlte/bower_components/bootstrap/less/type.less" />
|
|
<script src="assets/js/jquery-ui.custom.min.js"></script>
|
|
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
|
<script src="assets/js/chosen.jquery.min.js"></script>
|
|
<script src="assets/js/spinbox.min.js"></script>
|
|
<script src="assets/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-timepicker.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
|
|
<script src="assets/js/dataTables.buttons.min.js"></script>
|
|
<script src="assets/js/buttons.flash.min.js"></script>
|
|
<script src="assets/js/buttons.html5.min.js"></script>
|
|
<script src="assets/js/buttons.print.min.js"></script>
|
|
<script src="assets/js/buttons.colVis.min.js"></script>
|
|
<script src="assets/js/dataTables.select.min.js"></script>
|
|
|
|
|
|
<script src="assets/js/moment.min.js"></script>
|
|
<script src="assets/js/daterangepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
|
|
<script src="assets/js/jquery.knob.min.js"></script>
|
|
<script src="assets/js/autosize.min.js"></script>
|
|
<script src="assets/js/jquery.inputlimiter.min.js"></script>
|
|
<script src="assets/js/jquery.maskedinput.min.js"></script>
|
|
<script src="assets/js/bootstrap-tag.min.js"></script>
|
|
<script src="assets/js/ace-elements.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$(".glyphicon").css("top", "");
|
|
|
|
|
|
});
|
|
|
|
function open_treatments(appointment_id) {
|
|
$('#modal-add-consultation').modal("show");
|
|
|
|
}
|
|
</script>
|
|
<?php
|
|
include('includes/config/config.php');
|
|
$rolecode = $_SESSION['RoleCode'];
|
|
|
|
if (isset($_REQUEST['appointmentId'])) {
|
|
$sql = "select * from employee_appointment where appointment_id='" . $_REQUEST['appointmentId'] . "'";
|
|
// echo "query:".$sql;
|
|
$result = mysqli_query($conn, $sql);
|
|
$num_rows = @mysqli_num_rows($result);
|
|
$row = null;
|
|
|
|
// echo fhfh;
|
|
if ($num_rows > 0) {
|
|
$row = @mysqli_fetch_array($result);
|
|
}
|
|
$sql_for_treatment = "select * from treatment where appointment_id='" . $_REQUEST['appointmentId'] . "' 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='" . $_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")) {
|
|
|
|
$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 ?>;
|
|
</script>
|
|
|
|
|
|
<form id="opd_form" method="post">
|
|
<div class="widget-box box box-success" id="opd_form_pdf" style="margin-left: 5px; margin-right: 50px; width: 99%">
|
|
<div class="widget-header" data-action="fullscreen">
|
|
<h5 class="widget-title">Patient OPD > <?php echo $patient_name ?> <a target="_blank" href="emp_dashboard.php?flex_patient_id=<?php echo $row['emp_id'] ?>"><i style="font-size: 17px;" class="glyphicon glyphicon-user"></i></a>
|
|
</h5>
|
|
|
|
|
|
<div class="widget-toolbar" style="float: right">
|
|
|
|
<div class="clearfix">
|
|
|
|
<div class="pull-right tableTools-container">
|
|
|
|
<div class="dt-buttons btn-overlap btn-group ">
|
|
<a class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold save_button" style="float: left;" onclick="add_consume();"><i class="fa fa-medkit bigger-110 red" onclick="add_consume();"></i>CONSUMABLES</a>
|
|
|
|
<a href="<?php echo $_REQUEST['returnPage'] . '&backButon=back' ?>" class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold save_button" style="float: left;">Back</a> <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=""><span><i class="fa fa-floppy-o bigger-110 green"></i> <span class="hidden">Save</span></span></a>
|
|
|
|
<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>
|
|
|
|
<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') { ?> 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 box box-danger">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<div class="col-sm-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Emergency?</strong></label> <select class="form-control" style="height: 30px;" 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-sm-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Chargeable?</strong></label> <select class="form-control" style="height: 30px;" 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-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Weight</strong></label>
|
|
<input type="number" style="height: 30px;" min="0" max="1000" placeholder="WEIGHT(kg)" id="weight" name="weight" onchange="calculateBMI()" value="<?php echo $row['weight'] ?>">
|
|
</div>
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Height</strong></label>
|
|
<input type="number" min="0" max="1000" style="height: 30px;" id="height" name="height" placeholder="HEIGHT (cms)" min="0" max="1000" onchange="calculateBMI()" value="<?php echo $row['height'] ?>">
|
|
</div>
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">BMI</strong></label>
|
|
<input type="number" style="height: 30px;width: 85px" id="bmi" name="bmi" placeholder="BMI(KG/m2)" min="0" max="200" value="<?php echo $row['bmi'] ?>">
|
|
</div>
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">SBP</strong></label>
|
|
<input type="number" style="height: 30px;" min="0" max="1000" placeholder="SBP" id="sbp" name="sbp" value="<?php echo $row['bp_sbp'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">DBP</strong></label>
|
|
<input type="number" min="0" max="1000" style="height: 30px;" id="DBP" name="dbp" placeholder="DBP" min="0" max="1000" value="<?php echo $row['bp_dbp'] ?>">
|
|
</div>
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Temperature</strong></label>
|
|
<input type="number" style="height: 30px;width: 85px" min="0" max="1000" placeholder="Temp.(F)" id="temperature" name="temperature" value="<?php echo $row['temperature'] ?>" maxlength="10">
|
|
</div>
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">R Rate</strong></label>
|
|
<input type="number" style="height: 30px;" min="0" max="1000" placeholder="Respiratory rate" id="resp_rate" name="resp_rate" value="<?php echo $row['respiratory_rate'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Heart Rate</strong></label>
|
|
<input type="number" style="height: 30px;" id="heart_rate" name="heart_rate" placeholder="Heart Rate(BPM)" min="0" max="200" value="<?php echo $row['heart_rate'] ?>">
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Urine</strong></label>
|
|
<input type="number" min="0" max="1000" style="height: 30px;width: 85px" id="urine_output" name="urine_output" placeholder="Urine Output" value="<?php echo $row['urine_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" style="height: 30px;" 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-sm-12">
|
|
|
|
|
|
<div class="col-xs-1" style="margin-left: -12px;">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">RBS</strong></label>
|
|
<input type="number" min="0" max="1000" style="height: 30px;" 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" style="height: 30px;" 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" style="height: 30px;" 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" style="height: 30px;width: 85px" 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" style="height: 30px;" 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" style="height: 30px;" 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" style="height: 30px;" 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" style="height: 30px;" id="mobility" name="mobility" placeholder="Mobility" value="<?php echo $row['mobility'] ?>" maxlength="10">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
|
|
|
|
<?php if ($rolecode == 'DOC' || $rolecode == 'DIS' || ($row['doctor_attended_flag'] == 'Y')) { ?>
|
|
|
|
<div class="space-6"></div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="injury_part"><strong style="font-size: 11px">Affected Body Parts</strong></label>
|
|
<input type="text" name="injury_part_new" id="injury_part_new" class="form-control" placeholder="Affected Body Parts.." />
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Health Advices</strong></label>
|
|
<input type="text" name="health_advice_name_new" id="health_advice_name_new" class="form-control" placeholder="Select or Add Health Advices.." />
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Recommended Tests</strong></label>
|
|
<input type="text" name="recommended_test_new" id="recommended_test_new" value="" class="form-control" placeholder="Select or Add Lab Tests" />
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Additional Precautions</strong></label>
|
|
<textarea name="remarks" placeholder="Additional Precautions.." rows="3" cols="8" id="remarks" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['remarks'] ?></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
<div class="row"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 table-responsive">
|
|
<div class="widget-box box box-warning">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="appoint"><strong style="font-size: 11px">Medical Record No</strong></label>
|
|
<input id="ticket_no" type="hidden" style="height: 30px" class="form-control" name="ticket_no" value="<?php echo $row['ticket_no']; ?>" /> <input id="appoint" type="hidden" style="height: 30px" class="form-control" name="appoint" value="<?php echo $_REQUEST['appointmentId'] ?>" />
|
|
|
|
<div class="input-group">
|
|
|
|
<?php echo $row['ticket_no']; ?>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="appointment_date"><strong
|
|
style="font-size: 11px">Token No</strong></label>
|
|
|
|
<div class="input-group">
|
|
<input id="token_no" name="token_no" type="text"
|
|
value="<?php echo $row['ticket_no']; ?>" />
|
|
</div>
|
|
|
|
</div> -->
|
|
<input id="template_name" name="template_name" type="hidden" />
|
|
|
|
<div class="col-sm-2">
|
|
<label class="control-label" for="appointment_date"><strong style="font-size: 11px">In time</strong></label>
|
|
|
|
<div class="input-group">
|
|
<input id="emp_id" name="emp_id" type="hidden" value="<?php echo $row['emp_id'] ?>" /> <input id="appointment_id" name="appointment_id" value="<?php echo $row_history['appointment_id'] ?>" type="hidden" />
|
|
<input id="appointment_type" name="appointment_type" type="hidden" value="O" /> <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>
|
|
|
|
<input type="hidden" name="shift_type" id="shift_type" value="<?php echo $row['shift_type']; ?>">
|
|
</div>
|
|
|
|
</div>
|
|
<?php if ($_SESSION['RoleCode'] == 'DIS') { ?>
|
|
<div class="col-sm-2">
|
|
<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">Case Type
|
|
</label>
|
|
|
|
|
|
<select class="form-control" id="case_type" name="case_type">
|
|
|
|
<option value="">None</option>
|
|
<option value="NEW" <?php if (strcmp($row['case_type'], 'NEW') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
New Case</option>
|
|
<option value="REP" <?php if (strcmp($row['case_type'], 'REP') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Repeat</option>
|
|
<option value="FUP" <?php if (strcmp($row['case_type'], 'FUP') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Follow up</option>
|
|
<option value="EFUP" <?php if (strcmp($row['case_type'], 'EFUP') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Executive Follow up</option>
|
|
<option value="MED" <?php if (strcmp($row['case_type'], 'MED') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Medication</option>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
<div class=" col-sm-3">
|
|
<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', '', '', '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">
|
|
<?php
|
|
$complaint_config = getFieldFromTable('value', 'config', 'key_name', 'complaint_tag_switch');
|
|
error_log("complaints_config tag switch " . $complaint_config . " compare " . strcmp(strtolower($complaint_config), "false"));
|
|
if (!strcmp(strtolower($complaint_config), "false")) {
|
|
?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Complaints</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
<select class="form-control chosen-select" name="complaints[]" id="complaints" multiple>
|
|
<?php echo generateOption('complaints', 'complaint', 'complaint_id', '', '') ?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<?php
|
|
} else { ?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Complaints</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
|
|
<input type="text" class="form-control" id="complaints" name="complaints" data-placeholder="Complaints" />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
<?php
|
|
$examination_remarks_config = getFieldFromTable('value', 'config', 'key_name', 'examination_tag_switch');
|
|
error_log("examination_remarks_config tag switch " . $examination_remarks_config . " compare " . strcmp(strtolower($examination_remarks_config), "false"));
|
|
if (!strcmp(strtolower($examination_remarks_config), "false")) {
|
|
?>
|
|
<div class="col-sm-3">
|
|
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Examination
|
|
Findings</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
|
|
} else { ?>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Examination
|
|
Findings</strong></label>
|
|
<br>
|
|
|
|
<div>
|
|
|
|
<input type="text" class="form-control" id="examination_remarks" name="examination_remarks" data-placeholder="Examination findings" />
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="ailment_system"><strong style="font-size: 11px">Body System</strong></label> <select class="chosen-select form-control" id="ailment_system_new" name="ailment_system_new[]" multiple data-placeholder="Ailment System">
|
|
|
|
<?php echo generateOptionForMultiple('ailment_system', 'ailment_sys_name', 'ailment_sys_id', $row['ailment_systems_new'], ''); ?>
|
|
</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="form-field-8"><strong style="font-size: 11px">Diagnosis</strong></label>
|
|
<br>
|
|
|
|
|
|
<div>
|
|
<select class="form-control chosen-select" name="ailment_new[]" id="ailment_new" multiple>
|
|
<?php echo generateOption('ailment', 'ailment_name', 'ailment_id', '', '') ?>
|
|
</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 name="ailment[]" type="hidden" data-placeholder="Ailments" value="<?php echo $row['ailment_ids'] ?>">
|
|
<input type="text" class="form-control" id="ailment_new" name="ailment_new" data-placeholder="Ailments">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php if ($rolecode == 'DIS') { ?>
|
|
<input type="hidden" name="medical_disbursement_flag" id="medical_disbursement_flag" value="Y"> <input type="hidden" name="medicine_disbursement" id="medicine_disbursement" value="Y">
|
|
<?php } ?>
|
|
|
|
<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 } ?>>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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">Disease Type</strong></label>
|
|
<select class=" form-control" id="disease_type" name="disease_type" data-placeholder="Disease Type">
|
|
<option value="" disabled selected>Select Disease type</option>
|
|
<option value="COMM" <?php if (strcmp($row['disease_type'], 'COMM') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Communicable</option>
|
|
<option value="NON-COMM" <?php if (strcmp($row['disease_type'], 'NON-COMM') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Non Communicable</option>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="space-6"></div>
|
|
|
|
<div class="row"> -->
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="followup_to_opd">Referred To
|
|
</label>
|
|
|
|
|
|
<select class="form-control" id="referred_to" name="referred_to">
|
|
<option value="">None</option>
|
|
<option value="DEPT" <?php if (strcmp($row['referred_to'], 'DEPT') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Department</option>
|
|
<option value="HR" <?php if (strcmp($row['referred_to'], 'HR') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
HR</option>
|
|
<option value="IR" <?php if (strcmp($row['referred_to'], 'IR') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
IR</option>
|
|
<option value="HOS" <?php if (strcmp($row['referred_to'], 'HOS') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Hospital</option>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="ailment_system"><strong
|
|
style="font-size: 11px">Body System</strong></label> <select
|
|
class="chosen-select form-control" id="ailment_system_new"
|
|
name="ailment_system_new[]"
|
|
data-placeholder="Ailment System">
|
|
<option value=""disabled selected>Select body System</option>
|
|
<?php echo generateOptionForMultiple('ailment_system', 'ailment_sys_name', 'ailment_sys_id', $row['ailment_systems_new'], ''); ?>
|
|
</select>
|
|
</div> -->
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Remarks/Follow-up Investigation
|
|
Details</strong></label>
|
|
|
|
<textarea rows="3" cols="6" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;" name="remarks_rece" id="remarks_rece" placeholder="Remarks/Follow-up Invetigation Details" maxlength="500"><?php echo $row['remarks_rece'] ?></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Is the Patient taking any
|
|
Medications - Give Details:</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>
|
|
|
|
|
|
<textarea placeholder="Enter drug allergies" rows="3" cols="8" id="drug_allergy" name="drug_allergy" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['drug_allergy'] ?></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="form-field-8"><strong style="font-size: 11px">Remarks</strong></label>
|
|
|
|
<textarea rows="3" cols="6" 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 class="col-sm-3">
|
|
<label class="control-label" for="followup_to_opd">Clinical Opinion
|
|
</label>
|
|
|
|
|
|
<select class="form-control" id="clinical_opinion" name="clinical_opinion">
|
|
<option value="">Please select an option</option>
|
|
<option value="OC" <?php if (strcmp($row['clinical_opinion'], 'OC') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Occupational Cases</option>
|
|
<option value="ORC" <?php if (strcmp($row['clinical_opinion'], 'ORC') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Occupation Related Case</option>
|
|
<option value="NOC" <?php if (strcmp($row['clinical_opinion'], 'NOC') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Non Occupational Communicable</option>
|
|
<option value="NONC" <?php if (strcmp($row['clinical_opinion'], 'NONC') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Non Occupational Non Communicable</option>
|
|
<option value="SCC" <?php if (strcmp($row['clinical_opinion'], 'SCC') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Safety Concern Case</option>
|
|
<option value="SEN" <?php if (strcmp($row['clinical_opinion'], 'SEN') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Sensitization</option>
|
|
<option value="OM" <?php if (strcmp($row['clinical_opinion'], 'OM') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
OHC Management</option>
|
|
<option value="ER" <?php if (strcmp($row['clinical_opinion'], 'ER') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Ext Referral</option>
|
|
<option value="ONC" <?php if (strcmp($row['clinical_opinion'], 'ONC') == 0) {
|
|
echo "selected";
|
|
} ?>>
|
|
Ongoing Case</option>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- </div> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<input name="health_advice_name[]" type="hidden" data-placeholder="Ailments" value="<?php echo $row['health_advices'] ?>"> <input name="recommended_test[]" type="hidden" data-placeholder="Ailments" value="<?php echo $row['tests'] ?>">
|
|
<input name="isEmergency" type="hidden" data-placeholder="Ailments" value="<?php echo $row['IsEmergency'] ?>">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-6"></div>
|
|
|
|
</div>
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<?php if ($rolecode == 'DIS') { ?>
|
|
<!--<div class="col-sm-6">
|
|
<label class="control-label " for="medicine_disbursement"><strong
|
|
style="font-size: 11px">Medicine Disbursement</strong> </label>
|
|
<input
|
|
<?php if ($row['medi_disbursement'] == 'Y') {
|
|
echo 'checked="checked"';
|
|
} ?>
|
|
type="radio" name="medicine_disbursement"
|
|
id="medicine_disbursement_yes" value="Y"
|
|
onchange="setFieldDisableOrEnable(this.value)"> Yes
|
|
<input
|
|
<?php if ($row['medi_disbursement'] == 'N') {
|
|
echo 'checked="checked"';
|
|
} ?>
|
|
type="radio" name="medicine_disbursement"
|
|
id="medicine_disbursement_no" value="N"
|
|
onchange="setFieldDisableOrEnable(this.value)"> No
|
|
</div>-->
|
|
<?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 == 'DIS') {
|
|
?>
|
|
<div class="col-sm-6">
|
|
<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" 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" onchange="setDoctorDiscussed(this.value)"> No
|
|
</div>
|
|
<?php $sql_doc = "select a.patient_name from patient_master a left join employee_appointment b a.id = b.emp_id left join tbl_users c on b.doctor_last_attended = c.user_id where a.id = '" . $row['emp_id'] . "'";
|
|
|
|
$result_doc = @mysqli_query($conn, $sql_doc);
|
|
$row_doc = @mysqli_fetch_array($result_doc);
|
|
|
|
if ($row['doctor_discussed'] == 'Y') { ?>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<input type="text" name="doc_name" id="doc_name" value="<?php echo $row_doc['patient_name'] ?>">
|
|
</div>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12 table-responsive">
|
|
<table id="treatmentTable<?php echo $row_history['appointment_id'] ?>" class="table table-striped table-bordered" style="padding: 2px; margin: 2px;">
|
|
<thead>
|
|
<tr class="success">
|
|
<th style="font-size: 9px; text-align: center;">Medicine
|
|
</th>
|
|
<th style="font-size: 9px; text-align: center;">
|
|
Frequency</th>
|
|
<th style="font-size: 9px; text-align: center;">Timing
|
|
</th>
|
|
<th style="font-size: 9px; text-align: center;">Admin.
|
|
Route</th>
|
|
<th style="font-size: 9px; text-align: center;">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;"></th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<div class="col-sm-12 table-responsive">
|
|
<label class="control-label" for="referral"><strong style="font-size: 11px">Additional Recommendations(If
|
|
Any)</strong></label>
|
|
<textarea name="external_treatments" rows="4" cols="8" id="external_treatments" placeholder="Additional Treatment Recommendations" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['external_treatments'] ?></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="followup"><strong style="font-size: 11px">Follow-up</strong></label>
|
|
<textarea id="followup" rows="4" cols="8" name="followup" placeholder="Follow Up" class="autosize-transition form-control" style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['followup'] ?></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 $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>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-xs-9 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-4">
|
|
<label class="control-label" for="referral"><strong style="font-size: 11px">Referral</strong></label>
|
|
|
|
<div>
|
|
|
|
<input type="text" class="form-control" id="referral" name="referral" data-placeholder="Ailments">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Patient Admitted in Hospital: Yes/ No
|
|
(If yes give details of hospital and time at which reached the
|
|
hospital)</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 class="col-sm-4">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Ambulance 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>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-xs-3 table-responsive">
|
|
<div class="widget-box box box-danger">
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label class="control-label" for="form-field-select-1"><strong style="font-size: 11px">Ecg Findings</strong></label>
|
|
|
|
<textarea style="resize:none;" name="ecg_finding" id="ecg_finding" cols="30" rows="5" class="form-control"><?= $row['ecg_findings'] ?></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php //include('search_template.php');
|
|
?>
|
|
</form>
|
|
|
|
|
|
<form id="pdfform" target="_blank">
|
|
<input type="hidden" id="appointment_id_pdf" value="<?php echo $row['appointment_id'] ?>" name="appointment_id_pdf">
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
// getting tag field to calculate ailment body system
|
|
let tag = $('#ailment_new').data('tag');
|
|
|
|
$(document).on('change', tag, function() {
|
|
let body_system_val = $("#ailment_system_new").val();
|
|
let tag_val = $("#ailment_new").val();
|
|
$.ajax({
|
|
type: 'post',
|
|
url: 'append_bodysystem.php',
|
|
data: {
|
|
tag: tag_val,
|
|
body_system: body_system_val
|
|
},
|
|
success: function(data) {
|
|
if (data != undefined || data != null) {
|
|
dataarray = JSON.parse(data);
|
|
// console.log(dataarray);
|
|
$("#ailment_system_new").val(dataarray);
|
|
$('#ailment_system_new').trigger('chosen:updated');
|
|
}
|
|
|
|
},
|
|
error: function(data) {
|
|
console.log("something went wrong in updating body system");
|
|
}
|
|
});
|
|
});
|
|
// 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 examination findings value if config is false
|
|
<?php if (!strcmp(strtolower($examination_remarks_config), "false")) { ?>
|
|
var examination_finding_names = '<?= $row['examination_remarks'] ?>';
|
|
dataarray = examination_finding_names.split(",");
|
|
console.log(dataarray);
|
|
$("#examination_remarks").val(dataarray);
|
|
$('#examination_remarks').trigger('chosen:updated');
|
|
<?php } ?>
|
|
|
|
// 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 } ?>
|
|
|
|
//$('#ailment_new').trigger('chosen:updated');
|
|
// $('#complaints').trigger('chosen:updated');
|
|
// $('#examination_remarks').trigger('chosen:updated');
|
|
// $('#referral').trigger('chosen:updated');
|
|
$('#ailment_system_new').trigger('chosen:updated');
|
|
|
|
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 exporttopdf() {
|
|
|
|
|
|
document.forms['pdfform'].action = "opd_form_pdf.php";
|
|
document.forms['pdfform'].method = "post";
|
|
document.forms['pdfform'].submit();
|
|
}
|
|
|
|
|
|
function showDetail(value) {
|
|
if (value == 'Y') {
|
|
$("#is_admitted").hide();
|
|
$("#discharge").show();
|
|
} else {
|
|
$("#is_admitted").show();
|
|
$("#discharge").hide();
|
|
}
|
|
}
|
|
|
|
jQuery(function($) {
|
|
$("#forwardButton").on("click", function() {
|
|
<?php if ($rolecode == 'DOC') { ?>
|
|
BootstrapDialog.show({
|
|
title: 'Forward',
|
|
|
|
message: '<select class="form-control" id="forward_status" style="margin-left:100px;width:60%">' +
|
|
'<option value="PHP">Forward To Dipensary</option>' +
|
|
'<option value="MRP">Forward To Lab</option>' +
|
|
'<option value="DET">Forward To dispensary for IPD</option>' +
|
|
'<option value="CLS">Save & Close</option>',
|
|
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
validate_update('opd_form',
|
|
'<?php echo $row['appointment_id'] ?>')
|
|
|
|
}
|
|
}]
|
|
});
|
|
<?php } else if ($rolecode == $__ROLE_DISPENSARY) { ?>
|
|
BootstrapDialog.show({
|
|
title: 'Forward',
|
|
|
|
message: '<select class="form-control" id="forward_status" style="margin-left:100px;width:60%">' +
|
|
'<option value="CLS">Save & Close</option>' +
|
|
'<option value="DRP">Forward To Doctor</option>',
|
|
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
$("#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');
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
autosize($('textarea[class*=autosize]'));
|
|
|
|
$('textarea.limited').inputlimiter({
|
|
remText: '%n character%s remaining...',
|
|
limitText: 'max allowed : %n.'
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.date-picker').datepicker({
|
|
autoclose: true,
|
|
todayHighlight: true
|
|
})
|
|
//show datepicker when clicking on the icon
|
|
.next().on(ace.click_event, function() {
|
|
$(this).prev().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("<?php echo $row['appointment_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
|
|
<?php if (isset($row['clearance_time']) && $row['clearance_time'] != '0000-00-00 00:00:00') { ?>
|
|
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();
|
|
});
|
|
|
|
|
|
$('#colorpicker1').colorpicker();
|
|
//$('.colorpicker').last().css('z-index', 2000);//if colorpicker is inside a modal, its z-index should be higher than modal'safe
|
|
|
|
$('#simple-colorpicker-1').ace_colorpicker();
|
|
//$('#simple-colorpicker-1').ace_colorpicker('pick', 2);//select 2nd color
|
|
//$('#simple-colorpicker-1').ace_colorpicker('pick', '#fbe983');//select #fbe983 color
|
|
//var picker = $('#simple-colorpicker-1').data('ace_colorpicker')
|
|
//picker.pick('red', true);//insert the color if it doesn't exist
|
|
|
|
|
|
$(".knob").knob();
|
|
|
|
|
|
|
|
|
|
|
|
/////////
|
|
$('#modal-form input[type=file]').ace_file_input({
|
|
style: 'well',
|
|
btn_choose: 'Drop files here or click to choose',
|
|
btn_change: null,
|
|
no_icon: 'ace-icon fa fa-cloud-upload',
|
|
droppable: true,
|
|
thumbnail: 'large'
|
|
})
|
|
|
|
//chosen plugin inside a modal will have a zero width because the select element is originally hidden
|
|
//and its width cannot be determined.
|
|
//so we set the width after modal is show
|
|
$('#modal-form').on('shown.bs.modal', function() {
|
|
if (!ace.vars['touch']) {
|
|
$(this).find('.chosen-container').each(function() {
|
|
// $(this).find('a:first-child').css('width' , '210px');
|
|
// $(this).find('.chosen-drop').css('width' , '210px');
|
|
// $(this).find('.chosen-search input').css('width' , '200px');
|
|
});
|
|
}
|
|
})
|
|
/**
|
|
//or you can activate the chosen plugin after modal is shown
|
|
//this way select element becomes visible with dimensions and chosen works as expected
|
|
$('#modal-form').on('shown', function () {
|
|
$(this).find('.modal-chosen').chosen();
|
|
})
|
|
*/
|
|
|
|
|
|
|
|
$(document).one('ajaxloadstart.page', function(e) {
|
|
autosize.destroy('textarea[class*=autosize]')
|
|
|
|
$('.limiterBox,.autosizejs').remove();
|
|
$('.daterangepicker.dropdown-menu,.colorpicker.dropdown-menu,.bootstrap-datetimepicker-widget.dropdown-menu')
|
|
.remove();
|
|
});
|
|
|
|
});
|
|
|
|
jQuery(function($) {
|
|
$("#prescripstionButton").on("click", function() {
|
|
var template_content = $("#template_content").html()
|
|
BootstrapDialog.show({
|
|
title: 'Template',
|
|
|
|
message: template_content,
|
|
|
|
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
$("#template_name").val($("#myInput").val());
|
|
validate_template();
|
|
$(".close").click();
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
$('#new_diagnosis').click(function() {
|
|
$("#opd_form").submit(function(e) {
|
|
e.preventDefault();
|
|
});
|
|
$(".save_button").show();
|
|
$("#ailment_id").val("");
|
|
$("#ailment_name").val("");
|
|
$("#ailment_desc").val("");
|
|
|
|
$('#modal-add-diagnosis').modal("show");
|
|
});
|
|
|
|
function save_diagnosis() {
|
|
$.ajax({
|
|
url: 'save_diagnosis.php',
|
|
type: "POST",
|
|
data: $("#diagnosis_form").serialize(),
|
|
success: function(data) {
|
|
setDiagnosisList();
|
|
BootstrapDialog.alert('Diagnosis Saved Successfully.');
|
|
|
|
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Diagnosis');
|
|
return;
|
|
}
|
|
});
|
|
$('#modal-add-diagnosis').modal("hide");
|
|
}
|
|
|
|
/*function setDiagnosisList(){
|
|
|
|
$.ajax({
|
|
url : 'select_diagnosis_list.php',
|
|
type : "POST",
|
|
async:'false',
|
|
dataType:'json',
|
|
success : function(data) {
|
|
var content="";
|
|
if(data!=null && data!=""){
|
|
for(var i=0;i<data.length;i++){
|
|
content=content+"<option value="+data[i].ailment_id+">"+data[i].ailment_name+"</option>"
|
|
}
|
|
$("#ailment_new").html(content);
|
|
$('#ailment_new').trigger('chosen:updated');
|
|
}
|
|
|
|
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error In Fetching');
|
|
return;
|
|
}
|
|
});
|
|
|
|
}*/
|
|
|
|
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 getPrescription(prescription_id) {
|
|
//id ='<?php $_REQUEST['prescription_id']; ?>';
|
|
//alert(prescription_id);
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "prescription_details.php",
|
|
data: {
|
|
prescription_id: prescription_id
|
|
},
|
|
dataType: "json",
|
|
success: function(data) {
|
|
for (var z = 0; z < data.length; z++) {
|
|
// $('#Ailments').val(data[z].ailments_new);
|
|
var element = document.getElementById('ailment_new');
|
|
var element2 = document.getElementById('ailment_system_new');
|
|
|
|
dataarray = data[z].ailments_new.split(",");
|
|
dataarray2 = data[z].ailment_systems_new.split(",");
|
|
// dataarray3=data[z].external_treatments.split(",");
|
|
|
|
for (var i = 0; i < element.options.length; i++) {
|
|
|
|
element.options[i].selected = dataarray.indexOf(element.options[i].value) >= 0;
|
|
|
|
}
|
|
|
|
for (var i = 0; i < element2.options.length; i++) {
|
|
|
|
element2.options[i].selected = dataarray2.indexOf(element2.options[i].value) >= 0;
|
|
|
|
}
|
|
|
|
$('#external_treatments').val(data[z].external_treatments);
|
|
$('#referral').val(data[z].referral);
|
|
$('#followup').val(data[z].follow_up);
|
|
|
|
|
|
|
|
$('#ailment_new').trigger('chosen:updated');
|
|
$('#ailment_system_new').trigger('chosen:updated');
|
|
$('#external_treatments').trigger('chosen:updated');
|
|
|
|
|
|
|
|
|
|
//ontact1').val(data.contact1);
|
|
|
|
|
|
|
|
}
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Update Details');
|
|
//return;
|
|
}
|
|
});
|
|
getTreatmentDetail(prescription_id);
|
|
}
|
|
|
|
function getTreatmentDetail(prescription_id) {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "treatment_details.php",
|
|
data: {
|
|
prescription_id: prescription_id
|
|
},
|
|
dataType: "json",
|
|
success: function(data) {
|
|
$("#treatmentTable tr:gt(0)").remove();
|
|
$("#treatmentTable tfoot").append(
|
|
'<input type="hidden" name="count_treatment_item" id="count_treatment_item" >');
|
|
var count = 0;
|
|
var treatment_item_dosage =
|
|
"<?php echo generateOption('medicine_frequency', 'medicine_frequency', 'frequency_id', $row_treatment['frequency_id'], ''); ?>"
|
|
var treatment_item =
|
|
"<?php echo generate_options("SELECT item_id,trim(concat(ifnull(form_name,''),' ',item_name)) item_name FROM tbl_items i left join medicine_form f on i.item_form_id=f.form_id where status='1' and is_prescription!='1' order by item_name", $row_treatment['item_id'], 'item_id', 'item_name', '', ''); ?>"
|
|
var dosage_category =
|
|
"<?php echo generateOption("dosage_category", "dosage_category", "dosage_category_id", $row_treatment['dosage_category_id'], ''); ?>"
|
|
for (var z = 0; z < data.length; z++) {
|
|
var content = "";
|
|
|
|
content +=
|
|
"<tr><td><select style=\"width:100%\" class=\"select2 form-control\" id=\"treatment_item" +
|
|
'_' + count + "\" name=\"treatment_item" + count +
|
|
"\" onchange=\"getItemDetails(this.value,'current_stock" + "_" + count +
|
|
"','current_stock_div" + count + "','" + appointment_id + "', '" + count +
|
|
"');\" data-placeholder=\"Treatment...\">"
|
|
content += "" + treatment_item + "</select></td>"
|
|
content += "<td class=\"col-sm-2\">"
|
|
content +=
|
|
"<select style=\"width:100%\" class=\"select2 form-control\" id=\"treatment_item_dosage" +
|
|
'_' + count + "\" name=\"treatment_item_dosage" + count +
|
|
"\" data-placeholder=\"Dosages...\" onchange=\"getFrequenceyQty(this.value,'frequency_qty" +
|
|
"_" + count + "','dosage" + "_" + count + "','" + appointment_id + "', '" + count +
|
|
"');\">"
|
|
content += "<option value=''>N/A</option>";
|
|
content += "" + treatment_item_dosage + ""
|
|
content += "</select>"
|
|
content += "<td class=\"col-sm-2\">"
|
|
content += "<select class=\"select2 form-control\" id=\"treatment_item_dosage_category" +
|
|
'_' + count +
|
|
"\" class=\"form-control chosen-select\" name=\"treatment_item_dosage_category" +
|
|
count + "\" value='<?php echo $row_treatment['dosage_category_id'] ?>'>"
|
|
content += "<option value=''>N/A</option>";
|
|
|
|
content += "" + dosage_category + "</td>"
|
|
content += "</select>"
|
|
content += "<input type=\"hidden\" name=\"treatment_id" + count + "\" id=\"treatment_id" +
|
|
'_' + count + "\" value=\"<?php echo $row_treatment['treatment_id'] ?>\"></td>"
|
|
content += "<td class=\"col-sm-1\"style='width:5%'>"
|
|
content +=
|
|
"<input type=\"number\" style=\"height:25px;font-size:11px;width;45px\" class=\"form-control\" name=\"treatment_item_days" +
|
|
count + "\" id=\"treatment_item_days" + '_' + count +
|
|
"\" value=\"<?php echo $row_treatment['for_days'] ?>\" onchange=\"updateTotalMedicineQtyNew('frequency_qty" +
|
|
"_" + count + "','treatment_item_days" + '_' + count + "'," + count + ");\"/></td>"
|
|
content += "<td class=\"col-sm-1\" style=\"width:5%;\">"
|
|
content +=
|
|
"<input class=\"form-control\" type=\"text\" value=\"<?php echo $row_treatment['item_qty'] ?>\" name=\"frequency_qty" +
|
|
count + "\" id=\"frequency_qty" + '_' + count + "\" />"
|
|
content += "<input type=\"hidden\" name=\"dosage" + count + "\" id=\"dosage" + '_' + count +
|
|
"\" />"
|
|
content += "<input type=\"hidden\" name=\"treatment_item_total" + count +
|
|
"\" value=\"<?php echo $row_treatment['item_qty'] ?>\" id=\"treatment_item_total" +
|
|
'_' + count + "\" />"
|
|
content += "</td>"
|
|
|
|
|
|
content += "<td class=\"col-sm-1\" style=\"width:5%\">"
|
|
content += "<div style=\"text-align:right\" id=\"current_stock_div" + count + "\">"
|
|
content += "<?php echo $current_stock ?> <?php echo $unitMap[$unit_id] ?>"
|
|
content += "</div>"
|
|
content += "<input type=\"hidden\" name=\"current_stock" + count + "\" id=\"current_stock" +
|
|
'_' + count + "\" />"
|
|
|
|
content += "</td>"
|
|
content +=
|
|
"<td style=\"width:5%\"><label><i class=\"ace-icon fa fa-trash-o bigger-130\"></i></label></td></tr>"
|
|
//$("#treatmentTable tbody").append(content);
|
|
$("#treatmentTable tbody").append(content);
|
|
getItemDetails(data[z].item_id, "current_stock_" + count, "current_stock_div" + count, '',
|
|
count);
|
|
$("#treatment_item" + '_' + count).val(data[z].item_id)
|
|
$("#treatment_item_dosage" + '_' + count).val(data[z].frequency_id)
|
|
$("#treatment_item_dosage_category" + '_' + count).val(data[z].dosage_category_id)
|
|
$('.select2').select2();
|
|
$("#count_treatment_item").val(count);
|
|
|
|
// $("#treatment_item"+'_'+count).trigger('chosen:updated');
|
|
count++;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Update Details');
|
|
//return;
|
|
}
|
|
});
|
|
}
|
|
|
|
function add_consume() {
|
|
$('#consumables').modal("show");
|
|
|
|
}
|
|
</script>
|
|
<?php include('opd_injury_common_code.php'); ?>
|
|
<?php include('add_diagnosis.php'); ?>
|
|
<?php include('consumables.php'); ?>
|