mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 03:01:32 +00:00
1266 lines
73 KiB
PHP
Executable File
1266 lines
73 KiB
PHP
Executable File
@extends('layouts.main')
|
||
|
||
@push('styles')
|
||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||
<!-- add select2 css for searchhable drop downs -->
|
||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||
@endpush
|
||
|
||
@section('content')
|
||
<div class="row bg-title">
|
||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
|
||
<h4 class="page-title">Theatre module - anaesthetics</h4>
|
||
</div>
|
||
<div class="col-lg-8 col-sm-8 col-md-8 col-xs-12">
|
||
<ol class="breadcrumb">
|
||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||
<li><a href="{{ route('anaesthetics.index') }}">Anaesthetics</a></li>
|
||
<li class="active">Edit anaesthesia</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
@include('patients::allergies.header')
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
@include('flash::message')
|
||
|
||
@foreach ($errors->all() as $error)
|
||
<div><font color="red">{{ $error }}</font></div>
|
||
@endforeach
|
||
|
||
<div class="white-box">
|
||
<h3>EDIT ANAESTHESIA</h3><br>
|
||
{{ Form::model($anaesthesia_record,['method' => 'PUT','route' => ['anaesthetics.update',$anaesthesia_record->id],'data-toggle'=>'validator']) }}
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<div class="table-responsive">
|
||
<table class="table table-hover color-table success-table table-bordered">
|
||
<thead>
|
||
<tr>
|
||
<th>{{ __('inpatient.primary_diagnosis') }}</th>
|
||
<th>{{ __('inpatient.prompt') }}</th>
|
||
<th>{{ __('inpatient.references') }}</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="width: 30%;">
|
||
<div class="form-group">
|
||
{{ Form::select('primary_diagnosis', $diagnoses, $anaesthesia_record ? $anaesthesia_record->primary_diagnosis : "", ['class' => 'form-control select col-sm-12 compulsory', 'required', 'id' => 'primary_diagnosis']) }}
|
||
</div>
|
||
</td>
|
||
<td style="width: 45%; color: #C85F6A;"><div class="well well-sm" id="primary_diagnosis_prompt">{{ (isset($anaesthesia_record->primary_diagnosis) && $anaesthesia_record->primary_diagnosis != 0) ? $diagnoses_all->firstWhere('id',$anaesthesia_record->primary_diagnosis)->prompts : "" }} </div></td>
|
||
<td style="width: 25%">
|
||
<div class="well well-sm" id="primary_diagnosis_reference">
|
||
@if(!is_null($anaesthesia_record) && $anaesthesia_record->primary_diagnosis != 0)
|
||
@php
|
||
$reference_names = explode(",", get_name($anaesthesia_record->primary_diagnosis, 'id', 'reference_names', 'diagnoses'));
|
||
$reference_areas = explode(",", get_name($anaesthesia_record->primary_diagnosis, 'id', 'reference_areas', 'diagnoses'));
|
||
@endphp
|
||
@for($i = 0; $i < count($reference_names); $i++)
|
||
@if(isset($reference_areas[$i]) && isset($reference_names[$i]))
|
||
<a href="{{ $reference_areas[$i] }}" target='_blank'> {{ $reference_names[$i] }} </a> <span style='color: red'> | </span>
|
||
@endif
|
||
@endfor
|
||
@endif
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div class="table-responsive">
|
||
<table class="table color-table success-table table-condensed table-bordered" id="other_diagnosis_table">
|
||
<thead>
|
||
<tr>
|
||
<th class="text-center">#</th>
|
||
<th>{{ __('inpatient.other_diagnosis') }}</th>
|
||
<th>{{ __('inpatient.prompt') }}</th>
|
||
<th>{{ __('inpatient.references') }}</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@php
|
||
$other_diagnoses = [];
|
||
|
||
if($anaesthesia_record){
|
||
$other_diagnoses = @unserialize($anaesthesia_record->other_diagnoses);
|
||
}
|
||
@endphp
|
||
|
||
@if(empty($other_diagnoses))
|
||
<tr>
|
||
<td><input type="checkbox" name="chk" id="chk"></td>
|
||
<td style="width: 30%;">
|
||
{{ Form::select('other_diagnosis[]', $diagnoses, '', ['class' => 'form-control col-sm-12 sec_d']) }}
|
||
</td>
|
||
<td style="width: 45%"><div class="well well-sm" id="secondary_diagnosis_prompt1"> </div></td>
|
||
<td style="width: 25%"><div class="well well-sm" id="secondary_diagnosis_reference1"> </div></td>
|
||
</tr>
|
||
@else
|
||
@foreach($other_diagnoses as $diagnosis)
|
||
<tr>
|
||
<td><input type="checkbox" name="chk" id="chk"></td>
|
||
<td style="width: 30%;">
|
||
{{ Form::select('other_diagnosis[]', $diagnoses, $diagnosis, ['class' => 'form-control col-sm-12 select sec_d']) }}
|
||
</td>
|
||
<td style="width: 45%; color: #C85F6A;"><div class="well well-sm" id="secondary_diagnosis_prompt1">{{ is_object($diagnoses_all->firstWhere('id',$diagnosis)) ? $diagnoses_all->firstWhere('id',$diagnosis)->prompts : '' }} </div></td>
|
||
<td style="width: 25%"><div class="well well-sm" id="secondary_diagnosis_reference1">{{ is_object($diagnoses_all->firstWhere('id',$diagnosis)) ? $diagnoses_all->firstWhere('id',$diagnosis)->reference_names : '' }} </div></td>
|
||
</tr>
|
||
@endforeach
|
||
@endif
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<a class="btn btn-success btn-xs m-t-10" id="add_row" onclick="addRow('other_diagnosis_table')">{{ __('inpatient.add_row') }}</a>
|
||
<a class="btn btn-danger btn-xs m-t-10" id="delete_row" onclick="deleteRow('other_diagnosis_table')">{{ __('inpatient.delete_row') }}</a>
|
||
</div>
|
||
|
||
@php $surgery_complete = false; @endphp
|
||
@if(!is_null($surgery_done))
|
||
@php $surgery_complete = true; @endphp
|
||
<input type="hidden" name="surgery_id" value="{{ $surgery_done->id }}">
|
||
@endif
|
||
|
||
{{ Form::hidden('patient_id', $patient_id) }}
|
||
{{ Form::hidden('episode_id', $episode_id) }}
|
||
<input type="hidden" name="surgery_complete" value="{{ $surgery_complete }}">
|
||
|
||
<div class="col-sm-4">
|
||
<br><br>
|
||
<div class="form-group">
|
||
{{ Form::label('procedure_id','Surgical procedure') }}
|
||
{{ Form::select('procedure_id', $procedures, $anaesthesia_record->procedure_id,['class' => 'form-control compulsory', 'required', 'data-error'=>'','id'=>'procedure_id']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('anaesthetist','Anaesthetist') }}
|
||
{{ Form::select('anaesthetist',$all_staff,$anaesthesia_record->anaesthetist,['class' => 'form-control compulsory', 'required', 'data-error'=>'','id'=>'anaesthetist']) }}
|
||
<div class="help-block with-errors"></div>
|
||
<a href="#modal_new_doctor" data-toggle="modal" id="new_doctor_modal"><small>add new doctor</small></a>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('anaesthetic_commence_time','Time anaesthesia commenced') }}
|
||
{{ Form::time('anaesthetic_commence_time',$anaesthesia_record->time_commenced,['class' => 'form-control compulsory', 'required', 'data-error'=>'','id'=>'anaesthetic_commence_time']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('mallampati_score',__('anaesthetics.mallampati_score')) }}
|
||
(<a href="#modal_new_mallampati" data-toggle="modal" id="new_mallampati_modal">Click To View Mallampati Details</a>)
|
||
<select class="form-control" name="mallampati_score" id="mallampati_score">
|
||
<option value="">- Select -</option>
|
||
<option value="I" {!! $anaesthesia_record->mallampati_score == "I" ? "selected" : "" !!}>Class I</option>
|
||
<option value="II" {!! $anaesthesia_record->mallampati_score == "II" ? "selected" : "" !!}>Class II</option>
|
||
<option value="III" {!! $anaesthesia_record->mallampati_score == "III" ? "selected" : "" !!}>Class III</option>
|
||
<option value="IV" {!! $anaesthesia_record->mallampati_score == "IV" ? "selected" : "" !!}>Class IV</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('asa_classfication',__('anaesthetics.asa_classification')) }}
|
||
(<a href="#modal_new_asa" data-toggle="modal" id="new_asa_modal">Click To View ASA Classification Details</a>)
|
||
<select class="form-control compulsory" name="asa_classification" required id="asa_classification">
|
||
<option value="">- select -</option>
|
||
<option value="1" {!! $anaesthesia_record->asa_classification == "1" ? "selected" : "" !!}>ASA 1</option>
|
||
<option value="2" {!! $anaesthesia_record->asa_classification == "2" ? "selected" : "" !!}>ASA 2</option>
|
||
<option value="3" {!! $anaesthesia_record->asa_classification == "3" ? "selected" : "" !!}>ASA 3</option>
|
||
<option value="4" {!! $anaesthesia_record->asa_classification == "4" ? "selected" : "" !!}>ASA 4</option>
|
||
<option value="5" {!! $anaesthesia_record->asa_classification == "5" ? "selected" : "" !!}>ASA 5</option>
|
||
<option value="6" {!! $anaesthesia_record->asa_classification == "6" ? "selected" : "" !!}>ASA 6</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group row" id="sundries_used_div">
|
||
@php
|
||
$sundries_unserialized_array = @unserialize($anaesthesia_record->sundries_used);
|
||
|
||
$used_sundries_ids_array = isset($sundries_unserialized_array['sundries']) ? $sundries_unserialized_array['sundries'] : [];
|
||
|
||
$used_sundries_quantities_array = isset($sundries_unserialized_array['quantity']) ? $sundries_unserialized_array['quantity'] : [];
|
||
@endphp
|
||
|
||
@if(!empty($used_sundries_ids_array))
|
||
@for($i=0; $i < count($used_sundries_ids_array) ; $i++)
|
||
<div class="col-sm-8">
|
||
{{ Form::label('sundries_used','Sundries used') }}
|
||
{{ Form::select('sundries_used[]',$sundries_array,$used_sundries_ids_array[$i],['class' => 'form-control sundries_sutures', 'data-error'=>'']) }}
|
||
</div>
|
||
<div class="col-sm-4">
|
||
{{ Form::label('sundries_quantity_used','Quantity used') }}
|
||
{{ Form::number('sundries_quantity_used[]',$used_sundries_quantities_array[$i],['class' => 'form-control', 'data-error'=>'']) }}
|
||
</div>
|
||
@endfor
|
||
@else
|
||
<div class="col-sm-8">
|
||
{{ Form::label('sundries_used','Sundries used') }}
|
||
{{ Form::select('sundries_used[]',$sundries_array,'',['class' => 'form-control sundries_sutures', 'data-error'=>'','id'=>'vicryl_sutures_used']) }}
|
||
</div>
|
||
<div class="col-sm-4">
|
||
{{ Form::label('sundries_quantity_used','Quantity used') }}
|
||
{{ Form::number('sundries_quantity_used[]','',['class' => 'form-control', 'data-error'=>'']) }}
|
||
</div>
|
||
@endif
|
||
</div>
|
||
<span class="label label-info label-sm"><a href="#" id="addOption" style="color: #fff">Add other sundries used</a></span><br><br>
|
||
|
||
<div class="form-group row" id="extras_used_div">
|
||
@php
|
||
$theatre_extras_used = @unserialize($anaesthesia_record->extras_used);
|
||
|
||
$extras_array = isset($theatre_extras_used['extras']) ? $theatre_extras_used['extras'] : [];
|
||
|
||
$extras_cost_array = isset($theatre_extras_used['cost']) ? $theatre_extras_used['cost'] : [];
|
||
@endphp
|
||
|
||
@if(count($extras_array) > 0)
|
||
@for($j = 0; $j < count($extras_array); $j++)
|
||
<div class="col-sm-8">
|
||
{{ Form::label('extras_used','Extras used') }}
|
||
{{ Form::text('extras_used[]','',['class' => 'form-control', 'data-error'=>'']) }}
|
||
</div>
|
||
<div class="col-sm-4">
|
||
{{ Form::label('extras_cost','Cost') }}
|
||
{{ Form::number('extras_cost[]',$extras_cost_array[$j],['class' => 'form-control', 'data-error'=>'']) }}
|
||
</div>
|
||
@endfor
|
||
@else
|
||
<div class="col-sm-8">
|
||
{{ Form::label('extras_used','Extras used') }}
|
||
{{ Form::text('extras_used[]','',['class' => 'form-control', 'data-error'=>'']) }}
|
||
</div>
|
||
<div class="col-sm-4">
|
||
{{ Form::label('extras_cost','Cost') }}
|
||
{{ Form::number('extras_cost[]','',['class' => 'form-control', 'data-error'=>'']) }}
|
||
</div>
|
||
@endif
|
||
</div>
|
||
<span class="label label-info label-sm"><a href="#" id="addOptionExtras" style="color: #fff">Add other extras used</a></span><br><br>
|
||
|
||
<div class="form-group" id="wrapper">
|
||
<div class="row input_fields_wrap1 copy1">
|
||
<div class="col-md-4">
|
||
<label class="">{{ __('anaesthetics.other_drugs_given') }}</label>
|
||
{{ Form::select('drugs[]', $drugs, '', ['class' => 'form-control select','style'=>'margin-bottom: 5px;']) }}
|
||
</div>
|
||
<div class="col-md-2">
|
||
<label class="">{{ __('anaesthetics.dose') }}</label>
|
||
{{ Form::number('dose[]', '', ['class' => 'form-control']) }}
|
||
</div>
|
||
<div class="col-md-2">
|
||
<label class="">{{ __('anaesthetics.units') }}</label>
|
||
{{ Form::select("units[]", $units, "", ["class" => "form-control select"]) }}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<label><span class="label label-info label-sm" id="add-drug-row" style="padding: 2px">{{ __('anaesthetics.add_more_drugs') }}</span></label>
|
||
</div>
|
||
|
||
<div class="col-sm-4">
|
||
<br><br>
|
||
<div class="form-group">
|
||
{{ Form::label('checklist_confirmed_by','WHO Safe Surgery Checklist confirmed by') }}
|
||
{{ Form::select('checklist_confirmed_by',$all_staff,$anaesthesia_record->checklist_confirmed_by,['class' => 'form-control compulsory', 'required', 'data-error'=>'','id' => 'checklist_confirmed_by']) }}
|
||
<div class="help-block with-errors"></div>
|
||
<a href="#modal_new_nurse" data-toggle="modal" id="new_nurse_modal"><small>add new nurse</small></a>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('anaesthesia_type','Type of anaesthesia') }}
|
||
{{ Form::select('anaesthesia_type',$anaesthesia_types, $anaesthesia_record->anaesthesia_type,['class' => 'form-control compulsory', 'required', 'data-error'=>'','id' => 'anaesthesia_type']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
@php
|
||
$anaesthesia_type = $anaesthesia_record->anaesthesia_type;
|
||
$procedure = \Streamline\Models\Procedure::find($anaesthesia_type);
|
||
$procedure_slug = $procedure->slug;
|
||
$induction_array = $anaesthesia_record->induction ? explode(",", $anaesthesia_record->induction) : [];
|
||
@endphp
|
||
|
||
@if($procedure_slug == "General")
|
||
<div id="general_div1">
|
||
<div class="form-group">
|
||
{{ Form::label('induction','Induction') }}
|
||
{{ Form::select('induction[]',$anaesthesia_inductions,$induction_array, ['class' => 'form-control', 'id' => 'induction', 'multiple' => 'true']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
</div>
|
||
@else
|
||
<div id="general_div1" style="display: none;">
|
||
<div class="form-group">
|
||
{{ Form::label('induction','Induction') }}
|
||
{{ Form::select('induction[]',$anaesthesia_inductions,$induction_array,['class' => 'form-control', 'id' => 'induction', 'multiple' => 'true']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
|
||
<div id="for_all_div1">
|
||
<table class="table-borderless table-condensed">
|
||
<tr>
|
||
@php
|
||
$anaesthesia_checklist = unserialize($anaesthesia_record->anaesthesia_checklist);
|
||
@endphp
|
||
<td><input type="checkbox" name="adrenaline" {!! $anaesthesia_checklist['adrenaline'] == '1' ? 'checked="true"' : '' !!}> Adrenaline</td>
|
||
<td> <input type="checkbox" name="atropine" {!! $anaesthesia_checklist['atropine'] == '1' ? 'checked="true"' : '' !!}> Atropine </td>
|
||
<td><input type="checkbox" name="diazepam" {!! $anaesthesia_checklist['diazepam'] == '1' ? 'checked="true"' : '' !!}> Diazepam </td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="checkbox" name="ergometrine" {!! $anaesthesia_checklist['ergometrine'] == '1' ? 'checked="true"' : '' !!}> Ergometrine </td>
|
||
<td><input type="checkbox" name="ephedrine" {!! $anaesthesia_checklist['ephedrine'] == '1' ? 'checked="true"' : '' !!}> Ephedrine</td>
|
||
<td><input type="checkbox" name="hydralazine" {!! $anaesthesia_checklist['hydralazine'] == '1' ? 'checked="true"' : '' !!}> Hydralazine</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="checkbox" name="misoprostol" {!! $anaesthesia_checklist['misoprostol'] == '1' ? 'checked="true"' : '' !!}> Misoprostol</td>
|
||
<td><input type="checkbox" name="oxygen" {!! $anaesthesia_checklist['oxygen'] == '1' ? 'checked="true"' : '' !!}> Oxygen </td>
|
||
<td><input type="checkbox" name="oxytocin" {!! $anaesthesia_checklist['oxytocin'] == '1' ? 'checked="true"' : '' !!}> Oxytocin</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="checkbox" name="paracetamol" {!! $anaesthesia_checklist['paracetamol'] == '1' ? 'checked="true"' : '' !!}> Paracetamol Suppository</td>
|
||
<td><input type="checkbox" name="tranexamic_acid" {!! $anaesthesia_checklist['tranexamic_acid'] == '1' ? 'checked="true"' : '' !!}> Tranexamic acid</td>
|
||
</tr>
|
||
</table>
|
||
<br>
|
||
<div class="form-group">
|
||
{{ Form::label('antibiotics','Antibiotics') }}
|
||
@php
|
||
$antibiotics_array = explode(',', $anaesthesia_record->antibiotics);
|
||
@endphp
|
||
<div id="selected_antibiotics">
|
||
@if(!empty($antibiotics_array))
|
||
@for($i = 0; $i < count($antibiotics_array); $i++)
|
||
{{ Form::select('antibiotics[]',$anti_biotics,$antibiotics_array[$i],['class' => 'form-control compulsory antibiotics', 'required', 'data-error'=>'', 'style' => 'width: 85%; display: inline-block']) }}
|
||
@endfor
|
||
@else
|
||
{{ Form::select('antibiotics[]',$anti_biotics,'',['class' => 'form-control compulsory antibiotics', 'required', 'data-error'=>'', 'style' => 'width: 85%; display: inline-block']) }}
|
||
@endif
|
||
|
||
<a class="add_antibiotics label-info label" style="float: right; color: white"><small>Add <sup>+</sup></small></a><br>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('airway','Airway') }}
|
||
{{ Form::select('airway', $airways, $anaesthesia_record->airway,['class' => 'form-control compulsory', 'required', 'data-error'=>'','id' => 'airway']) }}
|
||
<div class="help-block with-errors"></div>
|
||
<a href="#modal_new_airway" data-toggle="modal" id="new_airway_modal"><small> Add new</small></a>
|
||
</div>
|
||
</div>
|
||
|
||
@if($procedure_slug == "General")
|
||
<div id="ett_div" class="form-group">
|
||
{{ Form::label('ett','ETT (mm)') }}
|
||
{{ Form::select('ett',$anaesthesia_etts,$anaesthesia_record->ETT,['class' => 'form-control', 'data-error'=>'','id' => 'ett']) }}
|
||
</div>
|
||
@else
|
||
<div id="ett_div" class="form-group" style="display: none;">
|
||
{{ Form::label('ett','ETT (mm)') }}
|
||
{{ Form::select('ett',$anaesthesia_etts,$anaesthesia_record->ETT,['class' => 'form-control', 'data-error'=>'','id' => 'ett']) }}
|
||
</div>
|
||
@endif
|
||
|
||
@php
|
||
$agent_used_array = $anaesthesia_record->agent_used ? explode(",", $anaesthesia_record->agent_used) : [];
|
||
$technique_array = $anaesthesia_record->technique ? explode(",", $anaesthesia_record->technique) : [];
|
||
@endphp
|
||
|
||
<div id="regional_local_div1" style="display: none;">
|
||
<div class="form-group">
|
||
{{ Form::label('agent_used','Agent used') }}
|
||
{{ Form::select('agent_used',$anaesthetic_agents,$agent_used_array,['class' => 'form-control', 'multiple'=>'true', 'id' => 'agent_used']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('technique','Technique') }}
|
||
{{ Form::select('technique',$anaesthetic_techniques,$technique_array,['class' => 'form-control', 'multiple'=>'true', 'id' => 'technique']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-sm-4">
|
||
<br><br>
|
||
@if($procedure_slug == "General" || $procedure_slug == "Regional" || $procedure_slug == "Local" || $procedure_slug == "Spinal")
|
||
@php $monitoring_signs = unserialize($anaesthesia_record->monitoring_signs); @endphp
|
||
<div id="regional_local_div2">
|
||
<div class="alert alert-info">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
MONITORING in addition to routine manual pulse, respiration,bp,auscultation in all patients.
|
||
</div>
|
||
<!--In database as Monitoring_Signs-->
|
||
<table class="table table-responsive table-condensed table-striped">
|
||
<tbody>
|
||
<tr>
|
||
<td>Continuous SaO2</td>
|
||
<td> <input type="checkbox" name="continuos_sao2" value="Continuous SaO2" {!! $monitoring_signs['continuos_sao2'] == '1' ? 'checked="true"' : '' !!}></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Intermittent SaO2</td>
|
||
<td><input type="checkbox" name="intermittent_sao2" value="Intermittent SaO2" {!! $monitoring_signs['intermittent_sao2'] == '1' ? 'checked="true"' : '' !!}></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Full vital signs monitor</td>
|
||
<td><input type="checkbox" name="full_vital_monitor" value="Full vital signs monitor" {!! $monitoring_signs['full_vital_monitor'] == '1' ? 'checked="true"' : '' !!}></td>
|
||
</tr>
|
||
<tr>
|
||
<td>End tidal CO2</td>
|
||
<td><input type="checkbox" name="end_tidal_co2" value="End tidal CO2" {!! $monitoring_signs['end_tidal_co2'] == '1' ? 'checked="true"' : '' !!}></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
</div>
|
||
@else
|
||
<div id="regional_local_div2" style="display: none;">
|
||
<div class="alert alert-info">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
MONITORING in addition to routine manual pulse, respiration,bp,auscultation in all patients.
|
||
</div>
|
||
<!--In database as Monitoring_Signs-->
|
||
<table class="table table-responsive table-condensed table-striped">
|
||
<tbody>
|
||
<tr>
|
||
<td>Continuous SaO2</td>
|
||
<td> <input type="checkbox" name="continuos_sao2" value="Continuous SaO2"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Intermittent SaO2</td>
|
||
<td><input type="checkbox" name="intermittent_sao2" value="Intermittent SaO2"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Full vital signs monitor</td>
|
||
<td><input type="checkbox" name="full_vital_monitor" value="Full vital signs monitor"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>End tidal CO2</td>
|
||
<td><input type="checkbox" name="end_tidal_co2" value="End tidal CO2"></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
</div>
|
||
@endif
|
||
|
||
@if($procedure_slug == "Spinal")
|
||
<div id="spinal_div">
|
||
<div class="form-group">
|
||
{{ Form::label('needle_type','Type of needle used') }}
|
||
{{ Form::select('needle_type',$needle_types,$anaesthesia_record->needle_type,['class' => 'form-control', 'data-error'=>'','id' => 'needle_type']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
@php
|
||
$agent_used_array = $anaesthesia_record->agent_used ? explode(",", $anaesthesia_record->agent_used) : [];
|
||
$technique_array = $anaesthesia_record->technique ? explode(",", $anaesthesia_record->technique) : [];
|
||
@endphp
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('agent_used','Agent used') }}
|
||
{{ Form::select('agent_used',$anaesthetic_agents,$agent_used_array,['class' => 'form-control', 'multiple'=>'true','id' => 'agent_used']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('volume_administered','Volume administered (mls)') }}
|
||
{{ Form::number('volume_administered',$anaesthesia_record->volume_administered,['class' => 'form-control compulsory', 'step'=>'0.1','id' => 'volume_administered']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
</div>
|
||
@else
|
||
<div id="spinal_div" style="display: none;">
|
||
<div class="form-group">
|
||
{{ Form::label('needle_type','Type of needle used') }}
|
||
{{ Form::select('needle_type',$needle_types,$anaesthesia_record->needle_type,['class' => 'form-control', 'data-error'=>'','id' => 'needle_type']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
@php
|
||
$agent_used_array = $anaesthesia_record->agent_used ? explode(",", $anaesthesia_record->agent_used) : [];
|
||
$technique_array = $anaesthesia_record->technique ? explode(",", $anaesthesia_record->technique) : [];
|
||
@endphp
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('agent_used','Agent used') }}
|
||
{{ Form::select('agent_used',$anaesthetic_agents,$agent_used_array,['class' => 'form-control', 'multiple'=>'true','id' => 'agent_used']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('volume_administered','Volume administered (mls)') }}
|
||
{{ Form::number('volume_administered',$anaesthesia_record->volume_administered,['class' => 'form-control compulsory', 'step'=>'0.1','id' => 'volume_administered']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
|
||
@if($procedure_slug == "General")
|
||
<div id="general_div2">
|
||
<div class="form-group">
|
||
{{ Form::label('muscle_relaxant','Muscle relaxants') }}
|
||
{{ Form::select('muscle_relaxant',$muscle_relaxants,$anaesthesia_record->muscle_relaxant,['class' => 'form-control', 'data-error'=>'','id' => 'muscle_relaxant']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('volatile_liquid_anaethetics', __('anaesthetics.volatile_liquid_anaethetics')) }}
|
||
{{ Form::select('volatile_liquid_anaethetics',$volatile_liquid_anaethetics,$anaesthesia_record->volatile_liquid_anaethetics,['class' => 'form-control', 'data-error'=>'','id' => 'volatile_liquid_anaethetics']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('volatile_liquid_anaesthetic_used',__('anaesthetics.volatile_liquid_anaesthetic_used')) }}
|
||
{{ Form::number('volatile_liquid_anaesthetic_used',$anaesthesia_record->volatile_liquid_anaesthetic_used,['class' => 'form-control compulsory', 'step'=>'0.1','id' => 'volatile_liquid_anaesthetic_used']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div id="tank_div" class="alert alert-info" style="display: none;">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
Approximate equivalents
|
||
<table class="table-condensed table-borderless">
|
||
<tr>
|
||
<td>1 Tank = 150mls</td>
|
||
<td>3/4 = 110mls</td>
|
||
</tr>
|
||
<tr>
|
||
<td>1/2 = 75mls</td>
|
||
<td>1/4 = 40mls</td>
|
||
<td>1/6 = 25mls</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
@else
|
||
<div id="general_div2" style="display: none;">
|
||
<div class="form-group">
|
||
{{ Form::label('muscle_relaxant','Muscle relaxants') }}
|
||
{{ Form::select('muscle_relaxant',$muscle_relaxants,$anaesthesia_record->muscle_relaxant,['class' => 'form-control', 'data-error'=>'','id' => 'muscle_relaxant']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('volatile_liquid_anaethetics', __('anaesthetics.volatile_liquid_anaethetics')) }}
|
||
{{ Form::select('volatile_liquid_anaethetics',$volatile_liquid_anaethetics,$anaesthesia_record->volatile_liquid_anaethetics,['class' => 'form-control', 'data-error'=>'','id' => 'volatile_liquid_anaethetics']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('volatile_liquid_anaesthetic_used',__('anaesthetics.volatile_liquid_anaesthetic_used')) }}
|
||
{{ Form::number('volatile_liquid_anaesthetic_used',$anaesthesia_record->volatile_liquid_anaesthetic_used,['class' => 'form-control compulsory', 'step'=>'0.1','id' => 'volatile_liquid_anaesthetic_used']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div id="tank_div" class="alert alert-info" style="display: none;">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
Approximate equivalents
|
||
<table class="table-condensed table-borderless">
|
||
<tr>
|
||
<td>1 Tank = 150mls</td>
|
||
<td>3/4 = 110mls</td>
|
||
</tr>
|
||
<tr>
|
||
<td>1/2 = 75mls</td>
|
||
<td>1/4 = 40mls</td>
|
||
<td>1/6 = 25mls</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
|
||
<div id="for_all_div2">
|
||
<div class="form-group">
|
||
@php
|
||
$analgesic_array = explode(",", $anaesthesia_record->analgesic);
|
||
@endphp
|
||
{{ Form::label('analgesic','Analgesics') }}
|
||
{{ Form::select('analgesic[]',$analgesics,$analgesic_array,['class' => 'form-control', 'data-error'=>'','id' => 'analgesic', 'multiple' => 'true']) }}
|
||
<div class="help-block with-errors"></div>
|
||
<a href="#modal_new_analgesic" data-toggle="modal" id="new_analgesic_modal"><small>add new</small></a>
|
||
</div>
|
||
|
||
@php
|
||
$iv_fluids_array = unserialize($anaesthesia_record->iv_fluids);
|
||
$fluids_array = []; $units_array = [];
|
||
|
||
if(!empty($iv_fluids_array)){
|
||
$fluids_array = $iv_fluids_array['iv_fluids'];
|
||
$units_array = $iv_fluids_array['units'];
|
||
}
|
||
@endphp
|
||
|
||
<div class="form-group">
|
||
<fieldset class="field">
|
||
<legend>Iv fluids given during surgery</legend>
|
||
<div class="row">
|
||
<div class="col-sm-2">
|
||
<a class="add_iv_fluid_button label-info label pull-right" style="font-size: smaller; color: white">Add<sup>+</sup></a>
|
||
</div>
|
||
<div class="col-sm-10">
|
||
<div class="input_fields_wrap">
|
||
<div class="separator bottom row">
|
||
<table id="iv_fluids_table" class="table-borderless table-condensed" style="display: none">
|
||
<tr><th>Name</th><th>Units</th></tr>
|
||
@foreach($iv_fluid_ids as $k => $v)
|
||
<tr><td>{{ get_name($v, "id", "name", "iv_fluids") }}</td><td>{{ $iv_fluid_units[$k] }} mls</td></tr>
|
||
@endforeach
|
||
</table>
|
||
|
||
@if(!empty($iv_fluids_array))
|
||
@for($i=0; $i < count($iv_fluids_array); $i++)
|
||
{{ Form::select('iv_fluid_id[]',$iv_fluids,isset($iv_fluids_array[$i]) ? $iv_fluids_array[$i] : '',['class' => 'form-control col-sm-7']) }}
|
||
<input type="number" name="iv_fluid_units[]" id="iv_fluid_units" class="form-control col-sm-3" value="{{ isset($units_array[$i]) ? $units_array[$i] : "" }}">(mls)<br>
|
||
@endfor
|
||
@endif
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('blood_given','Blood given (units)') }}
|
||
{{ Form::number('blood_given',$anaesthesia_record->blood_given,['class' => 'form-control compulsory', 'step'=>'0.1','id' => 'blood_given']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
{{ Form::label('comments','Comments') }}
|
||
{{ Form::textarea('comments',$anaesthesia_record->comments,['class' => 'form-control', 'data-error'=>'','cols'=>'4']) }}
|
||
<div class="help-block with-errors"></div>
|
||
</div>
|
||
|
||
<div class="alert-danger">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
If any risks identified for future procedures, please note them in Alerts box on top of Patient Home page.
|
||
</div>
|
||
|
||
<div>
|
||
<input type="hidden" name="episode_id" value="{{ $episode_id }}">
|
||
<input type="hidden" name="patient_id" value="{{ $patient_id }}"><br>
|
||
<button type="submit" class="btn btn-icon btn-success">Update</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- start of bootstrap modals -->
|
||
<div class="modal fade" id="modal_new_mallampati" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog modal-lg" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel1">Mallampati Score</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<table class="table bordered">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('mallampati_class', 1, false, ['id'=>'mallampati_class_1']) }} Class I (Easy)
|
||
</td>
|
||
<td>
|
||
Visualisation of the fauces, uvula, and both anterior and posterior pillars
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-1-left-illustration.png') }}">
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-1-right-illustration.png') }}">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('mallampati_class', 2, false, ['id'=>'mallampati_class_2']) }} Class II
|
||
</td>
|
||
<td>
|
||
Visualisation of the soft palate, fauces and uvula
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-2-left-illustration.png') }}">
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-2-right-illustration.png') }}">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('mallampati_class', 3, false, ['id'=>'mallampati_class_3']) }} Class III
|
||
</td>
|
||
<td>
|
||
Visualisation of the soft palate and the base of the uvula
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-3-left-illustration.png') }}">
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-3-right-illustration.png') }}">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('mallampati_class', 4, false, ['id'=>'mallampati_class_4']) }} Class IV
|
||
</td>
|
||
<td>
|
||
The soft palate is not visible at all
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-4-left-illustration.png') }}">
|
||
</td>
|
||
<td>
|
||
<img src="{{ asset('uploads/resources/class-4-right-illustration.png') }}">
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<input type="button" class="btn btn-success" id="submitMallampti" value="Save"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="modal_new_asa" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog modal-lg" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel1">American Society of Anesthesiologists (ASA) CLASSIFICATION</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<table class="table bordered">
|
||
<thead>
|
||
<tr>
|
||
<th style="width: 10%"> </th>
|
||
<th style="width: 90%"> </th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('asa_classification_radio', 1, false, ['id'=>'asa_1']) }} ASA 1
|
||
</td>
|
||
<td>
|
||
Healthy patients
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('asa_classification_radio', 2, false, ['id'=>'asa_2']) }} ASA 2
|
||
</td>
|
||
<td>
|
||
Mild to moderate systemic disease caused by the surgical condition or by other pathological processes, and medically well controlled
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('asa_classification_radio', 3, false, ['id'=>'asa_3']) }} ASA 3
|
||
</td>
|
||
<td>
|
||
Severe disease process which limits activity but is not incapacitating
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('asa_classification_radio', 4, false, ['id'=>'asa_4']) }} ASA 4
|
||
</td>
|
||
<td>
|
||
Severe incapacitating disease that is a constant threat to life
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('asa_classification_radio', 5, false, ['id'=>'asa_5']) }} ASA 5
|
||
</td>
|
||
<td>
|
||
Moribund patient not expected to survive 24 hours with or without an operation
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
{{ Form::radio('asa_classification_radio', 6, false, ['id'=>'asa_6']) }} ASA 6
|
||
</td>
|
||
<td>
|
||
Declared brain-dead patient whose organs are being removed for donor purposes
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<input type="button" class="btn btn-success" id="submitASA" value="Save"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="modal_new_nurse" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel1">Register a new nurse</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group">
|
||
<label>First Name</label>
|
||
<input class="form-control compulsory" id="nurse_fname" name="nurse_fname" type="text" />
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label>Last Name</label>
|
||
<input class="form-control compulsory" id="nurse_lname" name="nurse_lname" type="text" />
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||
<input type="button" class="btn btn-success" id="submitNurse" value="Save"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="modal_new_doctor" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel1">Register a new doctor</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group">
|
||
<label>First Name</label>
|
||
<input class="form-control compulsory" id="doc_fname" name="doc_fname" type="text" />
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label>Last Name</label>
|
||
<input class="form-control compulsory" id="doc_lname" name="doc_lname" type="text" />
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||
<input type="button" class="btn btn-success" id="submitDoctor" value="Save"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="modal_new_airway" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel1">Register a new airway</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group">
|
||
<label>Name</label>
|
||
<input class="form-control compulsory" id="airway_name" name="airway_name" type="text" />
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||
<input type="button" class="btn btn-success" id="submitAirway" value="Save"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="modal_new_analgesic" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel1">Register a new analgesic</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group">
|
||
<label>Name</label>
|
||
<input class="form-control compulsory" id="analgesic_name" name="analgesic_name" type="text" />
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||
<input type="button" class="btn btn-success" id="submitAnalgesic" value="Save"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- end of bootstrap modals -->
|
||
@endsection
|
||
|
||
@push('scripts')
|
||
<!-- pull in select2 for auto searchable drop downs -->
|
||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||
<script type="text/javascript">
|
||
$(document).ready(function () {
|
||
$('#procedure_id,#anaesthetist,#checklist_confirmed_by,.antibiotics').select2({
|
||
placeholder: "-- select --"
|
||
});
|
||
|
||
$('.select2-selection.select2-selection--single').css('height','calc(3.85rem)');
|
||
$('.select2-selection.select2-selection--single').css('padding-top','5px');
|
||
$('.select2-selection.select2-selection--single').css('border-left', '3px solid #F08080');/*add compulsory class*/
|
||
$('.select2-selection.select2-selection--single.sec_d').css('border-left', '3px solid #aaa');
|
||
$('.select2-selection__arrow').css('top','3px');
|
||
|
||
$("#analgesic,#agent_used,#technique,#induction").select2({
|
||
placeholder: "-- select --",
|
||
width: "100%"
|
||
});
|
||
|
||
$(".add_antibiotics").click(function (e) {
|
||
var anti_biotics_options = {!! json_encode($anti_biotics) !!};
|
||
var anti_biotics_dropdown = "";
|
||
for (var key in anti_biotics_options) {
|
||
if (anti_biotics_options.hasOwnProperty(key)) {
|
||
anti_biotics_dropdown += "<option value='"+key + "'>" + anti_biotics_options[key] + "</option>";
|
||
}
|
||
}
|
||
$("#selected_antibiotics").append("<br><div class='separator top'><select name='antibiotics[]' class='form-control compulsory' style='width: 85%; display: inline-block'><option value=''>-- Select --</option>"+ anti_biotics_dropdown +"</select> <a class='remove_field' style='color: maroon;'><sup>X</sup></a></div>");
|
||
});
|
||
|
||
$("#selected_antibiotics").on("click", ".remove_field", function (e) {
|
||
e.preventDefault();
|
||
$(this).parent('div').remove();
|
||
});
|
||
|
||
$("#anaesthesia_type").change(function () {
|
||
procedure_id = $("#anaesthesia_type").val();
|
||
$.ajax({
|
||
type: "post",
|
||
url: "/get_procedure_slug",
|
||
data: {procedure_id: procedure_id},
|
||
cache: false,
|
||
success: function (result) {
|
||
var slug = result;
|
||
/* display according to procedure slug */
|
||
if (slug == "Spinal") { // Spinal
|
||
$("#spinal_div").show();
|
||
$("#general_div1").hide();
|
||
$("#general_div2").hide();
|
||
$("#regional_local_div1").hide();
|
||
$("#regional_local_div2").show();
|
||
$("#tank_div").hide();
|
||
$("#ett_div").hide();
|
||
$("#for_all_div1").show();
|
||
$("#for_all_div2").show();
|
||
|
||
$("#spinal_div :not(:checkbox, .exclude_required)").attr('required', true);
|
||
$("#for_all_div1 :not(:checkbox, .exclude_required)").attr('required', true);
|
||
$("#for_all_div2 :not(:checkbox, .exclude_required)").attr('required', true);
|
||
|
||
$("#general_div1 :input").removeAttr("required");
|
||
$("#general_div2 :input").removeAttr("required");
|
||
$("#regional_local_div1 :input").removeAttr("required");
|
||
$("#tank_div :input").removeAttr("required");
|
||
} else if (slug == "General") { // General
|
||
$("#spinal_div").hide();
|
||
$("#general_div1").show();
|
||
$("#general_div2").show();
|
||
$("#regional_local_div1").hide();
|
||
$("#regional_local_div2").show();
|
||
$("#ett_div").show();
|
||
$("#tank_div").show();
|
||
$("#for_all_div1").show();
|
||
$("#for_all_div2").show();
|
||
|
||
$("#general_div1 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#general_div2 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#tank_div :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#for_all_div1 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#for_all_div2 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
|
||
$("#spinal_div :input").removeAttr("required");
|
||
$("#regional_local_div1:input").removeAttr("required");
|
||
} else if (slug == "Regional" || slug == "Local") { // Regional or Local infiltration
|
||
$("#spinal_div").hide();
|
||
$("#general_div1").hide();
|
||
$("#general_div2").hide();
|
||
$("#ett_div").hide();
|
||
$("#regional_local_div1").show();
|
||
$("#regional_local_div2").show();
|
||
$("#tank_div").hide();
|
||
$("#for_all_div1").show();
|
||
$("#for_all_div2").show();
|
||
|
||
$("#regional_local_div1 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#regional_local_div2 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#for_all_div1 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
$("#for_all_div2 :not(:checkbox, .exclude_required)").attr("required", true);
|
||
|
||
$("#spinal_div :input").removeAttr("required");
|
||
$("#general_div1 :input").removeAttr("required");
|
||
$("#general_div2 :input").removeAttr("required");
|
||
$("#tank_div :input").removeAttr("required");
|
||
} else if (slug == "None") { //None
|
||
$("#spinal_div").hide();
|
||
$("#general_div1").hide();
|
||
$("#general_div2").hide();
|
||
$("#ett_div").hide();
|
||
$("#regional_local_div1").hide();
|
||
$("#regional_local_div2").hide();
|
||
$("#tank_div").hide();
|
||
$("#for_all_div1").hide();
|
||
$("#for_all_div2").hide();
|
||
|
||
$("#spinal_div :input").removeAttr("required");
|
||
$("#general_div1 :input").removeAttr("required");
|
||
$("#general_div2 :input").removeAttr("required");
|
||
$("#regional_local_div1 :input").removeAttr("required");
|
||
$("#regional_local_div2 :input").removeAttr("required");
|
||
$("#tank_div :input").removeAttr("required");
|
||
$("#for_all_div1 :input").removeAttr("required");
|
||
$("#for_all_div2 :input").removeAttr("required");
|
||
} else {
|
||
$("#spinal_div").hide();
|
||
$("#general_div1").hide();
|
||
$("#general_div2").hide();
|
||
$("#ett_div").hide();
|
||
$("#regional_local_div1").hide();
|
||
$("#regional_local_div2").hide();
|
||
$("#tank_div").hide();
|
||
$("#for_all_div1").hide();
|
||
$("#for_all_div2").hide();
|
||
|
||
$("#spinal_div :input").removeAttr("required");
|
||
$("#general_div1 :input").removeAttr("required");
|
||
$("#general_div2 :input").removeAttr("required");
|
||
$("#regional_local_div1 :input").removeAttr("required");
|
||
$("#regional_local_div2 :input").removeAttr("required");
|
||
$("#tank_div :input").removeAttr("required");
|
||
$("#for_all_div1 :input").removeAttr("required");
|
||
$("#for_all_div2 :input").removeAttr("required");
|
||
}
|
||
/* end display according to slug */
|
||
}
|
||
});
|
||
});
|
||
|
||
var max_iv_fluid_fields = 10; //maximum input boxes allowed
|
||
var iv_fluid_wrapper = $(".input_fields_wrap"); //Fields iv_fluid_wrapper
|
||
var add_iv_fluid_button = $(".add_iv_fluid_button"); //Add button ID
|
||
var x1 = 1; //initial text box count
|
||
|
||
// Adding iv fluids
|
||
$(add_iv_fluid_button).click(function (e) { //on add input button click
|
||
e.preventDefault();
|
||
var iv_fluids_options = {!! json_encode($iv_fluids) !!};
|
||
var iv_fluids_dropdown = "";
|
||
for (var key in iv_fluids_options) {
|
||
if (iv_fluids_options.hasOwnProperty(key)) {
|
||
iv_fluids_dropdown += "<option value='"+key + "'>" + iv_fluids_options[key] + "</option>";
|
||
}
|
||
}
|
||
if (x1 < max_iv_fluid_fields) { //max input box allowed
|
||
x1++; //text box increment
|
||
$(iv_fluid_wrapper).append("<br><div class='row'><select name='iv_fluid_id[]' class='form-control col-sm-7'><option value=''>-- select --</option>"+ iv_fluids_dropdown +"</select> <input type='number' name='iv_fluid_units[]' id='iv_fluid_units' class='form-control col-sm-3'><div col-sm-2><small>(mls)</small>" + "<a href='#' class='remove_field' style='color: maroon'><sup>X</sup></a></div></div>");
|
||
}
|
||
});
|
||
// Removing added iv fluids
|
||
$(iv_fluid_wrapper).on("click", ".remove_field", function (e) { //user click on remove text
|
||
e.preventDefault();
|
||
$(this).parent('div').parent('div').remove();
|
||
x1--;
|
||
});
|
||
|
||
$('#submitNurse').click(function () {
|
||
var lname = $('#nurse_lname').val();
|
||
var fname = $('#nurse_fname').val();
|
||
if (lname == '' || fname == '') {
|
||
alert("Please fill out the nurse name");
|
||
} else {
|
||
$.ajax({
|
||
type: "post",
|
||
url: "/add_new_nurse",
|
||
data: {lname: lname, fname: fname},
|
||
cache: false,
|
||
success: function (result) {
|
||
//return the id of the saved nurse in the users table and preselect it
|
||
$('#checklist_confirmed_by').append($('<option>', {
|
||
value: result,
|
||
text: fname
|
||
}));
|
||
$('#checklist_confirmed_by').val(result);//preselect the newly added nurse
|
||
$('#modal_new_nurse').modal('hide'); //manually hide the modal
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
$('#submitDoctor').click(function () {
|
||
var lname = $('#doc_lname').val();
|
||
var fname = $('#doc_fname').val();
|
||
if (lname == '' || fname == '') {
|
||
alert("Please fill out the doctor name");
|
||
} else {
|
||
$.ajax({
|
||
type: "post",
|
||
url: "/add_new_doctor",
|
||
data: {lname: lname, fname: fname},
|
||
cache: false,
|
||
success: function (result) {
|
||
//return the id of the saved doctor in the users table and preselect it
|
||
$('#anaesthetist').append($('<option>', {
|
||
value: result,
|
||
text: fname
|
||
}));
|
||
$('#anaesthetist').val(result);//preselect the newly added doc
|
||
$('#modal_new_doctor').modal('hide'); //manually hide the modal
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
$('#submitAirway').click(function () {
|
||
var name = $('#airway_name').val();
|
||
if (name == '') {
|
||
alert("Please fill out the name");
|
||
} else {
|
||
$.ajax({
|
||
type: "post",
|
||
url: "/add_new_airway",
|
||
data: {name: name},
|
||
cache: false,
|
||
success: function (result) {
|
||
$('#airway').append($('<option>', {
|
||
value: result,
|
||
text: name
|
||
}));
|
||
$('#airway').val(result);//preselect the newly added airway
|
||
$('#modal_new_airway').modal('hide'); //manually hide the modal
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
$('#submitAnalgesic').click(function () {
|
||
var name = $('#analgesic_name').val();
|
||
if (name == '') {
|
||
alert("Please fill out the name");
|
||
} else {
|
||
$.ajax({
|
||
type: "post",
|
||
url: "/add_new_analgesic",
|
||
data: {name: name},
|
||
cache: false,
|
||
success: function (result) {
|
||
$('#analgesic').append($('<option>', {
|
||
value: result,
|
||
text: name
|
||
}));
|
||
$('#analgesic').val(result);//preselect the newly added analgesic
|
||
$('#modal_new_analgesic').modal('hide'); //manually hide the modal
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
/* do this much better dynamic addition :) */
|
||
var max_fields1 = 24; //maximum divs allowed
|
||
var x1 = 1; //initial div count
|
||
$("#add-drug-row").on("click", function (e) {
|
||
e.preventDefault();
|
||
if (x1 < max_fields1) {
|
||
x1++;
|
||
var copy1 = $('.copy1').clone();
|
||
copy1.attr("class", 'row input_fields_wrap1');
|
||
copy1.attr("id", 'copy1' + x1);
|
||
copy1.append('<a href="#" class="remove_field1" style="color: maroon"><sup>X</sup></a>');
|
||
copy1.insertAfter('.copy1');
|
||
}
|
||
});
|
||
|
||
$("#wrapper").on("click", ".remove_field1", function (e) {
|
||
e.preventDefault();
|
||
$(this).parent('div').remove();
|
||
x1--;
|
||
});
|
||
|
||
/*
|
||
* -- End adding rows of drugs
|
||
*/
|
||
$('#submitMallampti').click(function () {
|
||
var mall_class_1 = $('#mallampati_class_1').val();
|
||
var mall_class_2 = $('#mallampati_class_2').val();
|
||
var mall_class_3 = $('#mallampati_class_3').val();
|
||
var mall_class_4 = $('#mallampati_class_4').val();
|
||
|
||
if (mall_class_1 == '' || mall_class_2 == '') {
|
||
alert("Please fill out the mallampati score name");
|
||
} else {
|
||
if (document.getElementById("mallampati_class_1").checked) {
|
||
$('#mallampati_score').val("I"); //preselect the newly added nurse
|
||
} else if(document.getElementById("mallampati_class_2").checked){
|
||
$('#mallampati_score').val("II");
|
||
} else if(document.getElementById("mallampati_class_3").checked){
|
||
$('#mallampati_score').val("III");
|
||
} else if(document.getElementById("mallampati_class_4").checked){
|
||
$('#mallampati_score').val("IV");
|
||
}
|
||
$('#modal_new_mallampati').modal('hide'); //manually hide the modal
|
||
}
|
||
});
|
||
|
||
$('#submitASA').click(function () {
|
||
var asa_1 = $('#asa_1').val();
|
||
var asa_2 = $('#asa_2').val();
|
||
var asa_3 = $('#asa_3').val();
|
||
var asa_4 = $('#asa_4').val();
|
||
var asa_5 = $('#asa_5').val();
|
||
var asa_6 = $('#asa_6').val();
|
||
|
||
if (asa_1 == '' || asa_2 == '' || asa_3 == '' || asa_4 == '' || asa_4 == '' || asa_5 == '' || asa_6 == '') {
|
||
alert("Please fill out the mallampati score name");
|
||
} else {
|
||
if (document.getElementById("asa_1").checked) {
|
||
$('#asa_classification').val(1); //preselect the newly added nurse
|
||
} else if(document.getElementById("asa_2").checked){
|
||
$('#asa_classification').val(2);
|
||
} else if(document.getElementById("asa_3").checked){
|
||
$('#asa_classification').val(3);
|
||
} else if(document.getElementById("asa_4").checked){
|
||
$('#asa_classification').val(4);
|
||
} else if(document.getElementById("asa_5").checked){
|
||
$('#asa_classification').val(5);
|
||
} else if(document.getElementById("asa_6").checked){
|
||
$('#asa_classification').val(6);
|
||
}
|
||
$('#modal_new_asa').modal('hide'); //manually hide the modal
|
||
}
|
||
});
|
||
|
||
$("#addOption").click(function(e) {
|
||
e.preventDefault();
|
||
$("#sundries_used_div").append("<br>");
|
||
$("#sundries_used_div").append("<div class='col-sm-8'><label for='sundries_used'>Other Sundries used</label><select class='form-control sundries_sutures' onclick='select2set()' name='sundries_used[]'>"+options+"</select></div><div class='col-sm-4'><label for='quantity_used'>Quantity used</label><input class='form-control' name='sundries_quantity_used[]' type='number'></div>");
|
||
});
|
||
|
||
$("#addOptionExtras").click(function(e) {
|
||
e.preventDefault();
|
||
$("#extras_used_div").append("<br>");
|
||
$("#extras_used_div").append("<div class='col-sm-8'><label for='extras_used'>Other Extras Used</label><input type='text' class='form-control' name='extras_used[]'></div><div class='col-sm-4'><label for='extras_cost'>Cost</label><input class='form-control' name='extras_cost[]' type='number'></div>");
|
||
});
|
||
});
|
||
</script>
|
||
@endpush |