987 lines
40 KiB
PHP
987 lines
40 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 visitors_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);
|
|
}
|
|
?>
|
|
<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">Visitor OPD - <?php echo $patient_name?></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 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-10 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-3">
|
|
<label class="control-label" for="appoint"><strong
|
|
style="font-size: 11px">Ticket 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['token_no']?>" />
|
|
</div>
|
|
|
|
</div>
|
|
<input id="template_name" name="template_name" type="hidden"
|
|
/>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="appointment_date"><strong
|
|
style="font-size: 11px">Visit Date</strong></label>
|
|
|
|
<div class="input-group">
|
|
|
|
<input id="emp_id" name="emp_id" type="hidden"
|
|
value="<?php echo $row['emp_id']?>" /> <input type="hidden"
|
|
name="appointment_id" id="appointment_id"
|
|
value="<?php echo $_REQUEST['appointmentId']?>" /> <input
|
|
id="appointment_type" name="appointment_type"
|
|
type="hidden" value="VO" /> <input id="appointment_date"
|
|
type="text" style="height: 30px" class="form-control"
|
|
name="appointment_date" /> <span
|
|
class="input-group-addon"> <i
|
|
class="fa fa-clock-o bigger-110" style="height: 5px"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</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">
|
|
<?php if ($rolecode !='DOC' && $row['doctor_attended_flag']=='Y'){?>
|
|
|
|
<?php echo ($row['followup_to_opd']=='0')?"None":$row['followup_to_opd']?>
|
|
<input type="hidden" id="followup_to_opd" name="followup_to_opd"value="<?php echo $row['followup_to_opd']?>" />
|
|
<?php }else{?>
|
|
<select id="followup_to_opd" name="followup_to_opd">
|
|
<option value="">None</option>
|
|
<?php echo generateOptionWithWhereClause('visitors_employee_appointment',"CONCAT(ticket_no,' ',DATE_FORMAT(appointment_date,'%d-%b-%Y %l:%i %p '))",'appointment_id', $row['followup_to_opd'], '', 'emp_id',$row['emp_id']); ?>
|
|
</select>
|
|
<?php }?>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="form-field-8"><strong
|
|
style="font-size: 11px">Complaints</strong></label>
|
|
|
|
<textarea rows="3" cols="6"
|
|
class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"
|
|
name="complaints" id="complaints" placeholder="Complaints"
|
|
maxlength="500"><?php echo $row['complaints']?></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
<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>
|
|
|
|
|
|
<?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="col-sm-4">
|
|
<label class="control-label" for="form-field-8"><strong
|
|
style="font-size: 11px">Examination Findings</strong></label>
|
|
|
|
<textarea rows="3" cols="6"
|
|
class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"
|
|
id="examination_remarks" name="examination_remarks"
|
|
placeholder="On Examination Symptoms" maxlength="500"><?php echo $row['examination_remarks']?></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="ailment"><strong
|
|
style="font-size: 11px">Diagnosis</strong></label><br>
|
|
|
|
|
|
|
|
<select multiple="" class="chosen-select form-control"
|
|
id="ailment_new" name="ailment_new[]" data-placeholder="Ailments">
|
|
<?php echo $row['ailments_new']; echo generateOptionForMultiple('ailment','ailment_name','ailment_id',$row['ailments_new']); ?>
|
|
</select>
|
|
|
|
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="ailment_system"><strong
|
|
style="font-size: 11px">Ailment System</strong></label>
|
|
<select multiple="" class="chosen-select form-control"
|
|
id="ailment_system_new" name="ailment_system_new[]" data-placeholder="Ailment System">
|
|
<?php echo generateOptionForMultiple('ailment_system','ailment_sys_name','ailment_sys_id',$row['ailment_systems_new']); ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<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 }?>
|
|
</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;">
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<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="referral"><strong
|
|
style="font-size: 11px">Referral</strong></label>
|
|
<textarea name="referral" rows="4" cols="8" id="referral"
|
|
placeholder="Referral"
|
|
class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['referral']?></textarea>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<label class="control-label" for="followup"><strong
|
|
style="font-size: 11px">Follow-up</strong></label>
|
|
<textarea id="followup" rows="4" cols="8" name="followup"
|
|
placeholder="Follow Up"
|
|
class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"><?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-2 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">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>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div>
|
|
<input type="number" style="height: 30px;" class="col-xs-4" min="0" max="1000"
|
|
placeholder="SBP" id="sbp" name="sbp"
|
|
value="<?php echo $row['bp_sbp']?>">
|
|
<input type="number" min="0" max="1000"
|
|
style="height: 30px;" class="col-xs-4" id="DBP" name="dbp"
|
|
placeholder="DBP" value="<?php echo $row['bp_dbp']?>">
|
|
<input
|
|
type="number" style="height: 30px;" class="col-xs-4"
|
|
id="heart_rate" name="heart_rate" placeholder="Heart Rate" min="0" max="1000"
|
|
value="<?php echo $row['heart_rate']?>">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div>
|
|
<input type="number" style="height: 30px;" class="col-xs-4" min="0" max="1000"
|
|
placeholder="FBS" id="fbs" name="fbs"
|
|
value="<?php echo $row['blood_sugar_fbs']?>">
|
|
<input type="number"
|
|
style="height: 30px;" class="col-xs-4" id="rbs" name="rbs" min="0" max="1000"
|
|
placeholder="RBS" value="<?php echo $row['blood_sugar_rbs']?>">
|
|
<input
|
|
type="number" style="height: 30px;" class="col-xs-4" min="0" max="1000"
|
|
id="ppbs" name="ppbs" placeholder="PPBS"
|
|
value="<?php echo $row['blood_sugar_ppbs']?>">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div>
|
|
<input type="text" style="height: 30px;" class="col-xs-6"
|
|
placeholder="Temperature" id="temperature" name="temperature" min="0" max="1000"
|
|
value="<?php echo $row['temperature']?>" maxlength="10">
|
|
<input type="text" min="0" max="1000"
|
|
style="height: 30px;" class="col-xs-6" id="spo2_percent" name="spoc2_percent"
|
|
placeholder="SPOC2 Percent" value="<?php echo $row['spo2_percent']?>" maxlength="10">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<?php if ($rolecode=='DOC' || ($row['doctor_attended_flag']=='Y')) {?>
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label class="control-label" for="injury_part"><strong
|
|
style="font-size: 11px">Affected Body Parts</strong></label>
|
|
</div>
|
|
<div class="col-sm-12">
|
|
<input type="text" name="injury_part_new"
|
|
id="injury_part_new" class="form-control"
|
|
placeholder="Affected Body Parts.." />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label class="control-label" for="additional_advices"><strong style="font-size: 11px">Health
|
|
Advices</strong></label>
|
|
|
|
</div>
|
|
<div class="col-sm-12">
|
|
|
|
<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="space-6"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label class="control-label" for="additional_advices"><strong
|
|
style="font-size: 11px">Recommended Tests</strong></label>
|
|
</div>
|
|
<div class="col-sm-12">
|
|
<input type="text" name="recommended_test_new"
|
|
id="recommended_test_new" value="" class="form-control"
|
|
placeholder="Select or Add Lab Tests" />
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<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 class="col-sm-12 table-responsive">
|
|
<label class="control-label" for="followup_remarks"><strong
|
|
style="font-size: 11px">Follow-Up Remarks(If Any)</strong></label>
|
|
<textarea name="followup_remarks" rows="4" cols="8"
|
|
id="followup_remarks"
|
|
placeholder="Followup Remarks"
|
|
class="autosize-transition form-control"
|
|
style="overflow: hidden; overflow-wrap: break-word;"><?php echo $row['followup_remarks']?></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">
|
|
$('#ailment_new').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="visitors_opd_form_pdf.php";
|
|
document.forms['pdfform'].method="post";
|
|
document.forms['pdfform'].submit();
|
|
}
|
|
|
|
|
|
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 Medical Room</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']?>')
|
|
$(".close").click();
|
|
}
|
|
}]
|
|
});
|
|
<?php }else{ ?>
|
|
$("#attendedStatus").val('CLS');
|
|
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(),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function(){
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
|
|
$('#colorpicker1').colorpicker();
|
|
//$('.colorpicker').last().css('z-index', 2000);//if colorpicker is inside a modal, its z-index should be higher than modal'safe
|
|
|
|
$('#simple-colorpicker-1').ace_colorpicker();
|
|
//$('#simple-colorpicker-1').ace_colorpicker('pick', 2);//select 2nd color
|
|
//$('#simple-colorpicker-1').ace_colorpicker('pick', '#fbe983');//select #fbe983 color
|
|
//var picker = $('#simple-colorpicker-1').data('ace_colorpicker')
|
|
//picker.pick('red', true);//insert the color if it doesn't exist
|
|
|
|
|
|
$(".knob").knob();
|
|
|
|
|
|
|
|
|
|
|
|
/////////
|
|
$('#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();
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
});
|
|
|
|
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='0' 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\" class=\"form-control\" name=\"treatment_item_days"+count+"\" id=\"treatment_item_days"+'_'+count+"\" value=\"1\" 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 class=\"col-sm-1\" style=\"width:5%\" id=\"qty_td"+count+"\">"
|
|
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;
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
<?php include('opd_injury_common_code.php'); ?>
|