updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
@@ -0,0 +1,462 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-6 col-md-7 col-sm-7 col-xs-12">
<h4 class="page-title">{{ __('triage.triage_started') }}
: {{ streamline_date(get_name($episode_id, 'id', 'created_at', 'patient_episodes')) }}</h4>
</div>
<div class="col-lg-6 col-sm-5 col-md-5 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('triage.dashboard') }}</a></li>
<li><a href="{{ route('patient_episodes.index') }}">{{ __('triage.patient_home') }}</a></li>
<li class="active">{{ __('triage.triage') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="white-box">
<h4>{{ __('triage.patient_details') }}</h4>
<hr>
<div class="row">
<div class="col-md-4">
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>{{ __('triage.patient_number') }}</th>
<td>{{ $patient->number }}</td>
</tr>
<tr>
<th>{{ __('triage.triage_grade') }}</th>
<td><?php echo severe_grade($triage->severe_grade) ?></td>
</tr>
<tr>
<th>{{ __('triage.clinic_allocation') }}</th>
<td>{{ isset($clinics[$triage->clinic_allocation]) ? $clinics[$triage->clinic_allocation] : '' }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-4">
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>{{ __('triage.referral') }}</th>
<td>{{ isset($referral_hospitals[$triage->referral]) ? $referral_hospitals[$triage->referral] : '' }}</td>
</tr>
<tr>
<th>{{ __('triage.triage_done_by') }}</th>
<td>@php echo get_full_name($triage->created_by, "id", "first_name", "last_name", "users"); @endphp</td>
</tr>
<tr>
<th>{{ __('triage.triage_done_on') }}</th>
<td>{{ $triage->created_at->format('jS M y \a\t g:ia') }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-4">
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>{{ __('triage.patient_attendance') }}</th>
<td>
@if($triage->new_attendance==1)
{{ __('triage.new_attendance') }}
@elseif($triage->re_attendance==1)
{{ __('triage.re_attendance') }}
@else
{{ __('triage.unknown') }}
@endif
</td>
</tr>
<tr>
<th>{{ __('triage.comment') }}</th>
<td>{{ $triage->comments }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<h4>{{ __('triage.observations') }}</h4>
<hr>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('triage.observation') }}</th>
<th>{{ __('triage.value') }}</th>
</tr>
</thead>
<tbody>
@php $observation_explode = explode(",", $triage->observations); @endphp
@for ($x = 0; $x < count($observation_explode); $x++)
<tr>
@php $values_explode = explode("=", $observation_explode[$x]); @endphp
<td>{{ $x+1 }}</td>
@foreach ($values_explode as $value)
<td>{{ $value }}</td>
@endforeach
</tr>
@endfor
</tbody>
</table>
</div>
<div class="col-sm-4">
@if(!are_symptoms_on_consultation())
<h4>{{ __('triage.symptoms') }}</h4>
<hr>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>{{ __('triage.symptoms') }}</th>
<th>{{ __('triage.duration') }}</th>
</tr>
</thead>
<tbody>
<tr>
@php
$symptoms_explode = explode(",", $triage->symptoms);
$duration_explode = explode(",", $triage->symptom_duration);
@endphp
@for ($i = 0; $i < count($symptoms_explode); $i++)
<tr>
<td>{{ $symptoms[$symptoms_explode[$i]] ?? '' }}</td>
<td>{{ $duration_explode[$i] ?? '' }}</td>
</tr>
@endfor
</tr>
</tbody>
</table>
@endif
@if ($discharge_mortality && between($age_diff_months, 0, 6) && is_smart_discharge_enabled())
<hr>
<table class="table table-bordered table-striped">
<tr>
<td class="text-center" colspan="2"><h4>Post Discharge Mortality Risk</h4></td>
</tr>
<tr>
<td>{{ Form::label('hospital_travel_duration', 'How long did it take you to travel to the hospital?') }}</td>
<td>
@php $arr = ['1' => '< 30 mins','2' => '30 mins 1 hour','3' => '1 - 4 hours','4' => '> 4 hours']; @endphp
{{ $discharge_mortality->hospital_travel_duration_below_6 ? $arr[$discharge_mortality->hospital_travel_duration_below_6] : "Not Recorded" }}
</td>
</tr>
<tr>
<td>{{ Form::label('illness_duration', 'What is the duration of the present illness at the time of admission?') }}</td>
<td>
@php $arr = ['1' => '< 48 hours','2' => '48 hours - 7 days','3' => '7 days - 1 month','4' => 'More than a month']; @endphp
{{ $discharge_mortality->illness_duration_at_admission_below_6 ? $arr[$discharge_mortality->illness_duration_at_admission_below_6] : "Not Recorded" }}
</td>
</tr>
</table>
@endif
@if ($discharge_mortality && $discharge_mortality->child_with_proven_infection == 1 && between($age_diff_months, 7, 60) && is_smart_discharge_enabled())
<hr>
<table class="table table-bordered table-striped">
<tr>
<td class="text-center" colspan="2"><h4>Post Discharge Mortality Risk</h4></td>
</tr>
<tr>
<td>
{{ Form::label('last_hospitalization', 'Time since last hospitalization') }}
</td>
<td>
@php $arr = ['1' => 'Less than 7 days ago','2' => '7 to 30 days ago','3' => '30 days to 1 year ago','4' => 'More than 1 year ago','5' => 'Never']; @endphp
{{ $discharge_mortality->last_hospitalization ? $arr[$discharge_mortality->last_hospitalization] : "Not Recorded" }}
</td>
</tr>
<tr>
<td>
{{ Form::label('safe_water', 'Do you boil, filter (good sand/ceramic) or disinfect (using bleach/waterguard) all drinking water?') }}
</td>
<td>
@if($discharge_mortality->filter_water == 1)
Yes
@else
No
@endif
</td>
</tr>
<tr>
<td>{{ Form::label('child_mosquito_net', 'Does your child sleep under a mosquito net?') }}</td>
<td>
@php $arr = ['1' => 'Never','2' => 'Sometimes','3' => 'Always']; @endphp
{{ $discharge_mortality->child_mosquito_net ? $arr[$discharge_mortality->child_mosquito_net] : "Not Recorded" }}
</td>
</tr>
<tr>
<td>{{ Form::label('hospital_travel_duration', 'How long did it take you to travel to the hospital?') }}</td>
<td>
@php $arr = ['1' => '< 30 mins','2' => '30 mins 1 hour','3' => '1 - 4 hours','4' => '> 4 hours']; @endphp
{{ $discharge_mortality->hospital_travel_duration ? $arr[$discharge_mortality->hospital_travel_duration] : "Not Recorded" }}
</td>
</tr>
<tr>
<td>{{ Form::label('mother_education_level', 'What is the education level of the childs mother?') }}</td>
<td>
@php $arr = ['1' => 'No school','2' => '<= P3','3' => 'P4-P7','4' => 'S1-S6','5' => 'Post secondary (including post S4 technical school)','6' => 'Do not know']; @endphp
{{ $discharge_mortality->mother_education_level ? $arr[$discharge_mortality->mother_education_level] : "Not Recorded" }}
</td>
</tr>
<tr>
<td>Eye movement</td>
<td>{{ ['1' => 'Watches or follows','0' => 'Fails to watch or follow'][$discharge_mortality->bcs_eye_movement] ?? '' }}</td>
</tr>
<tr>
<td>Best motor response</td>
<td>{{ ['0' => 'No response or inappropriate response','1' => 'Withdraws limb from pain stimulus','2' => 'Localizes painful stimulus'][$discharge_mortality->bcs_best_mortal] ?? '' }}</td>
</tr>
<tr>
<td>Best verbal response</td>
<td>{{ ['0' => 'No vocal response to pain','1' => 'Moan or abnormal cry with pain','2' => 'Cries appropriately with pain (or speaks if verbal)'][$discharge_mortality->bcs_best_verbal] ?? '' }}</td>
</tr>
<tr>
<td>Mother's age</td>
<td>{{ $discharge_mortality->maternal_age }}</td>
</tr>
</table>
@endif
@if ($triage->any_tb_sysmptoms == 1)
<table class="tb_questions_table table table-striped table-bordered">
<tr>
<td class="text-center" colspan="2"><h4>TB SCREENING</h4></td>
</tr>
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>{{ $triage->cough_for_2_weeks == 1 ? "Yes" : "No" }}</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>{{ $triage->fever_for_2_weeks == 1 ? "Yes" : "No" }}</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticable weight loss of more than 3 Kg?</td>
<td>{{ $triage->tb_weight_loss == 1 ? "Yes" : "No" }}</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Poor weight gain in the last one month ?</td>
<td>{{ $triage->tb_poor_weight_gain == 1 ? "Yes" : "No" }}</td>
</tr>
<tr class="excessive_night_sweats_tb_question">
<td>Excessive night sweats for three weeks or more ?</td>
<td>{{ $triage->tb_excessive_night_sweats == 1 ? "Yes" : "No" }}</td>
</tr>
<tr class="excessive_night_sweats_tb_question">
<td>Contact with a person with pulmonary TB or chronic cough ?</td>
<td>{{ $triage->tb_contact_with_tb_person == 1 ? "Yes" : "No" }}</td>
</tr>
</table>
@endif
@if(is_smart_triage_enabled() && $nutrition)
<table class="table table-striped table-bordered">
<tr>
<td class="text-center" colspan="2"><h4>Nutritional Status</h4></td>
</tr>
<tr class="cough_tb_question">
<td>{{ $nutrition->text }}</td>
<td>{{ $nutrition->reason }}</td>
</tr>
</table>
@endif
</div>
<div class="col-sm-4">
@if(!$triage_without_etat)
@if (between($years, 16, 50) && $triage->fp_too_sick == 0)
<h4>{{ __('triage.family_planning') }}</h4>
<table class="table table-striped table-bordered">
<tr>
<td>1</td>
<td>{{ __('triage.too_sick') }}</td>
@if(is_null($triage->fp_too_sick))
<td> N/A</td>
@else
<td>{{ ($triage->fp_too_sick == 1) ? __('triage.yes') : __('triage.no') }}</td>
@endif
</tr>
<tr>
<td>2</td>
<td>{{ __('triage.sexually_active') }}</td>
@if(is_null($triage->sexually_active))
<td> N/A</td>
@else
<td>{{ ($triage->sexually_active == 1) ? __('triage.yes') : __('triage.no') }}</td>
@endif
</tr>
<tr>
<td>3</td>
<td>{{ __('triage.pregnant') }}</td>
@if(is_null($triage->pregnant))
<td> N/A</td>
@else
<td>{{ ($triage->pregnant == 1) ? __('triage.yes') : __('triage.no') }}</td>
@endif
</tr>
<tr>
<td>4</td>
<td>{{ __('triage.menopause') }}</td>
@if(is_null($triage->menopause))
<td> N/A</td>
@else
<td>{{ ($triage->menopause == 1) ? __('triage.yes') : __('triage.no') }}</td>
@endif
</tr>
<tr>
<td>5</td>
<td>{{ __('triage.family_planning_method') }}</td>
<td>{{ isset($triage->fp_method) ? $family_planning_methods[$triage->fp_method] : "N/A" }}</td>
</tr>
<tr>
<td>6</td>
<td>{{ __('triage.action') }}</td>
<td>{{ isset($triage->fp_action) ? $triage->fp_action : "N/A" }}</td>
</tr>
</table>
@endif
@if (between($years, 0, 12))
<h4>{{ __('triage.emergency_signs') }}</h4>
<hr>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th colspan="2" class="text-center">{{ __('triage.airway') }}</th>
</tr>
@foreach($airway as $key => $value)
<tr>
<th>{{ $key }}</th>
<td>{{ ucfirst($value) }}</td>
</tr>
@endforeach
<tr>
<th colspan="2" class="text-center">{{ __('triage.circulation') }}</th>
</tr>
@foreach($circulation as $key => $value)
<tr>
<th>{{ $key }}</th>
<td>{{ ucfirst($value) }}</td>
</tr>
@endforeach
<tr>
<th colspan="2" class="text-center">{{ __('triage.neurological') }}</th>
</tr>
@foreach($neurological as $key => $value)
<tr>
<th>{{ $key }}</th>
<td>{{ ucfirst($value) }}</td>
</tr>
@endforeach
<tr>
<th colspan="2" class="text-center">{{ __('triage.dehydration') }}</th>
</tr>
@foreach($dehydration as $key => $value)
<tr>
<th>{{ $key }}</th>
<td>{{ ucfirst($value) }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@if (between($years, 0, 12) && count($priority_signs) > 0)
<h4>{{ __('layout.priority_signs') }}</h4>
<hr>
<table class="table table-striped table-bordered">
<tbody>
@foreach($priority_signs as $priority_sign)
<tr>
<td>{{ $priority_sign }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@else
<h4>Notes</h4>
<hr>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>{{ __('triage.choose_blood_group') }}</th>
<td>{{ $triage->blood_group }}</td>
</tr>
<tr>
<th>{{ __('triage.rhesus_factor') }}</th>
<td>
@if($triage->rhesus_factor == 1)
{{ __('triage.positive') }}
@elseif($triage->rhesus_factor == 2)
{{ __('triage.negative') }}
@else
{{ __('triage.unknown') }}
@endif
</td>
</tr>
<tr>
<th>{{ __('triage.observation_notes') }}</th>
<td>{{ ($triage->observation_notes) ?? "No notes available" }}</td>
</tr>
<tr>
<th>{{ __('triage.nursing_notes') }}</th>
<td>{{ ($triage->nursing_notes) ?? "No notes available" }}</td>
</tr>
</tbody>
</table>
</div>
@endif
</div>
</div>
<hr>
<div>
@php $clinic_slug = get_name($triage->clinic_allocation, "id", "slug", "clinics"); @endphp
@if($clinic_slug == "diabetes")
{{ Form::open(['route' => 'diabetes_clinic.clinic_registration']) }}
{{ Form::button(__('triage.go_to_diabetes'),['type'=>'submit','class'=>'btn btn-success btn-block']) }}
{{ Form::close() }}
@endif
</div>
@if(Auth::user()->can('edit-patient-triage'))
<a href="/triage/{{ $triage->id }}/edit/" class="btn btn-success"> Modify Triage </a>
@endif
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
@endpush