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

{{ __('triage.edit_triage') }}

@include('patients::allergies.header')
@include('flash::message')
{{ __('triage.triage') }} ({{ $age_group_display }}) {{ __('triage.for_episode') }} : {{ streamline_date(get_name($episode_id, 'id', 'created_at', 'patient_episodes')) }}

{{ Form::model($triage, ['method' => 'PUT', 'route' => ['triage.update', $triage], 'data-toggle' => 'validator']) }} {{ Form::hidden('episode_id', $episode_id) }} {{ Form::hidden('patient_id', $patient_id) }} @php $alert1 = '
' . __('triage.sick_children_warning') . '
'; $alert2 = '
' . __('triage.poison_warning') . '
'; $symptoms_array = []; @endphp @php $option_symptoms = ''; $option_symptoms_periods = ''; $symptom_counter = 1; @endphp @if (!are_symptoms_on_consultation())
@php $symptoms_array = explode(",", $triage->symptoms); $symptoms_duration_array = explode(",", $triage->symptom_duration); foreach ($symptoms as $key => $value){ $option_symptoms .= ""; } foreach ($symptoms_periods as $key => $value){ $option_symptoms_periods .= ""; } @endphp @if(empty($symptoms_array) || count($symptoms_array) != count($symptoms_duration_array)) @else @for($i = 0; $i < count($symptoms_array); $i++) @php $duration_array = explode(" ", $symptoms_duration_array[$i]); @endphp @endfor @endif
{{ __('triage.symptoms') }} {{ __('triage.add_new') }} {{ __('triage.duration') }} {{ __('triage.prompt') }} {{ __('triage.reference_text') }}
{{ Form::select('symptoms[]', $symptoms, $symptoms_array[$i], ['id' => 'symptoms_' . $i, 'class' => 'form-control col-sm-12 compulsory initial_symptoms_select', 'onchange' => 'showPrompt(this.value, ' . $i . ')']) }}
{{ __('triage.add_row') }}
@endif @if (is_tuberculosis_screening_enabled()) @include('patients::triage.edit_tb_screening') @endif @if (is_hiv_screening_tool_enabled()) @include('patients::triage.edit.edit_hiv_screening') @endif @if (is_gbv_screening_tool_enabled()) @include('patients::triage.edit.edit_gbv_screening') @endif
@if ($age_group == 5) @else @endif @include('patients::triage.edit.observations_changed')
{{ __('triage.observation') }} {{ __('triage.value') }} {{ __('triage.normal_range') }}KEWS NEWSKEWS
@if (between($years, 16, 50)) @include('patients::triage.edit.family_planning_questions') @endif @if (between($years, 0, 12)) @include('patients::triage.edit.emergency_signs') @endif
@if ($age_group == 1 || $age_group == 2) @else @endif
@if (!is_add_attendance_to_consultation_enabled())
{{ __('triage.patient_attendance') }}
{{ __('triage.re_attendance_or_new') }}
new_attendance)) checked @endif/> {{ __('triage.new_attendance') }} re_attendance)) checked @endif/> {{ __('triage.re_attendance') }}
@endif @if (between($years, 0, 12)) @include('patients::triage.edit.priority_signs') @endif

{{ __('triage.triage_grade') }}


{{ Form::radio('triage_grade', 1, $triage->severe_grade == 1, ['required', 'id' => 'triage_grade_green']) }} {{ __('triage.green') }}
{{ Form::radio('triage_grade', 2, $triage->severe_grade == 2, ['required', 'id' => 'triage_grade_yellow']) }} {{ __('triage.yellow') }}
{{ Form::radio('triage_grade', 3, $triage->severe_grade == 3, ['required', 'id' => 'triage_grade_red']) }} {{ __('triage.red') }}

{{ __('triage.referral_clinic_allocation') }}

{{ Form::label('referral_hospital', __('triage.referred_by')) }} {{ Form::select('referral_hospital', $referral_hospitals, $triage->referral, ['class' => 'form-control compulsory', 'required', 'id' => 'referral_hospital']) }} {{ __('triage.add_new') }}
{{ Form::label('clinic_allocation', __('triage.clinic_allocation')) }} @if (is_numeric(get_name($episode_id, 'id', 'clinic_id', 'patient_episodes'))) {{ Form::select('clinic_allocation', $clinics, get_name($episode_id, 'id', 'clinic_id', 'patient_episodes'), ['class' => 'form-control col-sm-12 compulsory', 'required']) }} @else {{ Form::select('clinic_allocation', $clinics, '', ['class' => 'form-control col-sm-12 compulsory', 'required']) }} @endif

{{ __('triage.comment') }}



{{ Form::button(__('triage.submit_triage'), ['type' => 'submit', 'class' => 'btn btn-success col-sm-12', 'id' => 'submit_triage']) }}

{{ __('triage.triage_done_by') }} : {{ ucwords(Auth::user()->first_name) . ' ' . ucwords(Auth::user()->last_name) }}
{{ Form::close() }}
@endsection @push('scripts') @endpush