@extends('layouts.main') @push('styles') @endpush @section('content')

{{ __('anaesthetics.theatre_module_anaesthetics') }}

@include('patients::allergies.header')
@if(isset($anaesthesia_records) && count($anaesthesia_records) > 0)
{{ __('anaesthetics.previous_anaesthesia_started_on') }} {{ streamline_date(get_name($episode_id, 'id', 'created_at', 'patient_episodes')) }} @foreach($anaesthesia_records as $anaesthesia) @endforeach
{{ __('anaesthetics.procedure') }} {{ __('anaesthetics.surgery') }} {{ __('anaesthetics.anaesthetist') }} {{ __('anaesthetics.time_of_commencement') }} {{ __('anaesthetics.date') }}
{{ get_name($anaesthesia->procedure_id,'id','name','procedures') }} {!! $anaesthesia->surgery_id != null ? 'Done' : 'Not done' !!} {{ get_name($anaesthesia->anaesthetist,'id','first_name','users') }} {{ $anaesthesia->time_commenced }} {{ streamline_date($anaesthesia->created_at) }} {{ __('anaesthetics.view_details') }} Edit Anaethesia
@endif
@include('flash::message') @php $consultation = \Streamline\Models\Consultation::where(['episode_id' => $episode_id, 'patient_id' => $patient_id])->first(); @endphp @foreach ($errors->all() as $error)
{{ $error }}
@endforeach

{{ __('anaesthetics.create_new_anaesthesia') }}


{{ Form::open(['route' => 'anaesthetics.store','data-toggle'=>'validator']) }}
{{ __('inpatient.primary_diagnosis') }} {{ __('inpatient.prompt') }} {{ __('inpatient.references') }}
{{ Form::select('primary_diagnosis', $diagnoses, $consultation ? $consultation->primary_diagnosis : "", ['class' => 'form-control select_field col-sm-12 compulsory', 'required', 'id' => 'primary_diagnosis']) }}
{{ (isset($consultation->primary_diagnosis) && $consultation->primary_diagnosis != 0) ? $diagnoses_all->firstWhere('id',$consultation->primary_diagnosis)->prompts : "" }} 
@if(!is_null($consultation) && $consultation->primary_diagnosis != 0) @php $reference_names = explode(",", get_name($consultation->primary_diagnosis, 'id', 'reference_names', 'diagnoses')); $reference_areas = explode(",", get_name($consultation->primary_diagnosis, 'id', 'reference_areas', 'diagnoses')); @endphp @for($i = 0; $i < count($reference_names); $i++) @if(isset($reference_areas[$i]) && isset($reference_names[$i])) {{ $reference_names[$i] }} | @endif @endfor @endif
{{ __('consultations.add_new_diagnosis') }}

@php $other_diagnoses = []; if($consultation){ $other_diagnoses = @unserialize($consultation->other_diagnoses); } @endphp @if(empty($other_diagnoses)) @else @foreach($other_diagnoses as $diagnosis) @endforeach @endif
# {{ __('inpatient.other_diagnosis') }} {{ __('inpatient.prompt') }} {{ __('inpatient.references') }}
{{ Form::select('other_diagnosis[]', $diagnoses, '', ['class' => 'form-control col-sm-12 sec_d']) }}
 
 
{{ Form::select('other_diagnosis[]', $diagnoses, $diagnosis, ['class' => 'form-control col-sm-12 select sec_d']) }}
{{ is_object($diagnoses_all->firstWhere('id',$diagnosis)) ? $diagnoses_all->firstWhere('id',$diagnosis)->prompts : '' }} 
{{ is_object($diagnoses_all->firstWhere('id',$diagnosis)) ? $diagnoses_all->firstWhere('id',$diagnosis)->reference_names : '' }} 
{{ __('inpatient.add_row') }} {{ __('inpatient.delete_row') }}
@php $surgery_complete = false; @endphp @if(!is_null($surgery_done)) @php $surgery_complete = true; @endphp @endif


{{ Form::label('procedure_id',__('anaesthetics.surgical_procedure')) }} {{ Form::select('procedure_id',$procedures,$surgery_complete ? $surgery_done->procedure_id : "",['class' => 'form-control compulsory', 'required', 'data-error'=>'','id'=>'procedure_id']) }}
{{ Form::label('anaesthetist',__('anaesthetics.anaesthetist')) }} {{ Form::select('anaesthetist',$doctors,'',['class' => 'form-control compulsory', 'required', 'data-error'=>'','id'=>'anaesthetist']) }}
add new doctor
{{ Form::label('anaesthetic_commence_time',__('anaesthetics.time_anaesthesia_commenced')) }} {{ Form::time('anaesthetic_commence_time','',['class' => 'form-control compulsory', 'required', 'data-error'=>'','id'=>'anaesthetic_commence_time']) }}
{{ Form::label('mallampati_score',__('anaesthetics.mallampati_score')) }} (Click To View Mallampati Details)
{{ Form::label('asa_classfication',__('anaesthetics.asa_classification')) }} (Click To View ASA Classification Details)
{{ Form::label('sundries_used','Sundries used') }} {{ Form::select('sundries_used[]',$sundries_array,'',['class' => 'form-control sundries_sutures select_field', 'data-error'=>'','id'=>'vicryl_sutures_used']) }}
{{ Form::label('sundries_quantity_used','Quantity used') }} {{ Form::number('sundries_quantity_used[]','',['class' => 'form-control', 'data-error'=>'']) }}
Add other sundries used

{{ Form::label('extras_used','Extras used') }} {{ Form::text('extras_used[]','',['class' => 'form-control', 'data-error'=>'']) }}
{{ Form::label('extras_cost','Cost') }} {{ Form::number('extras_cost[]','',['class' => 'form-control', 'data-error'=>'']) }}
Add other extras used



{{ Form::label('checklist_confirmed_by', __('anaesthetics.who_surgery_confirmed_by')) }} {{ Form::select('checklist_confirmed_by',$nurses,'',['class' => 'form-control compulsory', 'required', 'data-error'=>'','id' => 'checklist_confirmed_by']) }}
add new nurse
{{ Form::label('anaesthesia_type', __('anaesthetics.type_of_anaethesia')) }} {{ Form::select('anaesthesia_type',$anaesthesia_types,'',['class' => 'form-control compulsory', 'required', 'data-error'=>'','id' => 'anaesthesia_type']) }}


{{ Form::label('comments', __('anaesthetics.comments')) }} {{ Form::textarea('comments','',['class' => 'form-control', 'data-error'=>'','cols'=>'4']) }}
{{ __('anaesthetics.any_risks_alert') }}

{{ Form::select('drugs[]', $drugs, '', ['class' => 'form-control select select_field','style'=>'margin-bottom: 5px;']) }}
{{ Form::number('dose[]', '', ['class' => 'form-control']) }}
{{ Form::select("units[]", $units, "", ["class" => "form-control select"]) }}
@include('patients::consultations.add_diagnosis') @endsection @push('scripts') @endpush