Import latest app updates from streamline

An updated set of source files and initialization was provided by streamline to
address issues observed during initial testing. These files have been updated in
order to generate a new set of app images.
This commit is contained in:
2024-04-11 11:16:51 -07:00
parent cb4c6b4c1a
commit 4a89356390
10435 changed files with 107737 additions and 1220538 deletions
@@ -1,5 +1,4 @@
@if (session()->has('patient_id') || session()->has('patients_id'))
@endif
@push('scripts')
@@ -9,89 +8,120 @@
@push('styles')
<style type="text/css">
/* Important part used by allergies */
.allergy-modal-dialog{
.allergy-modal-dialog {
overflow-y: initial !important
}
.allergy-modal-body{
.allergy-modal-body {
height: 250px;
overflow-y: auto;
}
@media (min-width: 768px) {
.allergy-modal-dialog {
width: 90%;
max-width:1200px;
max-width: 1200px;
}
}
</style>
@endpush
<div class="row">
<div @if(is_smart_discharge_enabled()) class="col-sm-6" @else class="col-sm-8" @endif>
<div @if (is_smart_discharge_enabled()) class="col-sm-6" @else class="col-sm-8" @endif>
<div>
@php
$known_patient_allergies = \Streamline\Models\Allergy::where('patient_id' , $patient->id)->orderBy('created_at','desc')->take(2)->get();
$known_patient_alerts = \Streamline\Models\Alert::where('patient_id' , $patient->id)->orderBy('created_at','desc')->take(2)->get();
$categories = \Streamline\Models\PatientCategory::pluck("name", "id");
$known_patient_allergies = \Streamline\Models\Allergy::where('patient_id', $patient->id)
->orderBy('created_at', 'desc')
->take(2)
->get();
$known_patient_alerts = \Streamline\Models\Alert::where('patient_id', $patient->id)
->orderBy('created_at', 'desc')
->take(2)
->get();
$categories = \Streamline\Models\PatientCategory::pluck('name', 'id');
$drug_categories_array = DB::table('drug_categories')->pluck('name', 'id');
$drug_categories = \Streamline\Models\DrugCategory::orderBy('name', 'asc')->get();
@endphp
<!-- <a href="#" class="btn-action fa fa-plus-square"><i></i></a> --><span class="count label label-inverse"><strong>{{ __('allergies.category') }} :</strong>
{{ isset($categories[$patient->category_id]) ? $categories[$patient->category_id] : "N/A" }}
</span>
<div class="row">
<div class="col-sm-10">
<table class="table-bordered table-condensed table-striped">
<tbody>
<tr>
<th style="color: black">{{ __('allergies.patient_number') }}</th>
<th style="color: black">{{ __('allergies.full_names') }}</th>
<th style="color: black">{{ __('allergies.gender') }}</th>
<th class="hidden-phone" style="color: black">{{ __('allergies.age') }}</th>
<th style="color: black">{{ __('allergies.national_id') }}</th>
</tr>
</tbody>
<tbody>
<tr>
<td>{{ $patient->number }}</td>
<td>
{!! insurance_flag($patient->id) !!}
@if(patient_insurance_status($patient->id) == 1)
<small style="color:#069">({{ __('patients.joined_chi_scheme') }} {{patient_duration_on_chi_sheme($patient->id)}})</small>
@endif
</td>
<td>{{ $patient->gender == 1 ? __('allergies.male') : __('allergies.female') }}</td>
<td>{{ get_patients_age($patient->date_of_birth) }}</td>
<td>{!! ($patient->national_id == null || $patient->national_id == "") ? "<span class='label label-info'>National ID Missing</span>" : strtoupper($patient->national_id) !!}</td>
</tr>
</tbody>
</table>
<!-- <a href="#" class="btn-action fa fa-plus-square"><i></i></a> -->
<span class="count label label-inverse mx-4 px-4">
<strong>{{ __('allergies.category') }} :</strong>
{{ $categories[$patient->category_id] ?? 'N/A' }}
</span>
<div class="row consultation-pat-row">
<div class="col-sm-9 consultation-pat mb-2" style="overflow-x: auto; overflow-y: hidden;">
<div class="row consultation-pat-table h-100 align-items-stretch" style="flex-wrap: nowrap;">
<div class="col p-0">
<div class="card h-100 m-0">
<div class="card-header w-100">{{ __('allergies.patient_number') }}</div>
<div class="card-body">{{ $patient->number }}</div>
</div>
</div>
<div class="col p-0">
<div class="card h-100 m-0">
<div class="card-header w-100">{{ __('allergies.full_names') }}</div>
<div class="card-body">{!! insurance_flag($patient->id) !!}
@if (patient_insurance_status($patient->id) == 1)
<small style="color:#069">({{ __('patients.joined_chi_scheme') }}
{{ patient_duration_on_chi_sheme($patient->id) }})</small>
@endif
</div>
</div>
</div>
<div class="col p-0">
<div class="card h-100 m-0">
<div class="card-header w-100">{{ __('allergies.gender') }}</div>
<div class="card-body">
{{ $patient->gender == 1 ? __('allergies.male') : __('allergies.female') }}</div>
</div>
</div>
<div class="col p-0">
<div class="card h-100 m-0">
<div class="card-header w-100">{{ __('allergies.age') }}</div>
<div class="card-body">{{ get_patients_age($patient->date_of_birth) }}</div>
</div>
</div>
<div class="col p-0">
<div class="card h-100 m-0">
<div class="card-header w-100">{{ __('allergies.national_id') }}</div>
<div class="card-body">{!! $patient->national_id == null || $patient->national_id == ''
? "<span class='label label-info'>National ID Missing</span>"
: strtoupper($patient->national_id) !!}</div>
</div>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="button-box">
<div class="col-sm-3 mb-2">
<div class="button-box h-100">
<a class="img" href="#modal-photo" data-toggle="modal" style="color: whitesmoke">
@if(!is_null($patient->photo) && $patient->photo != "")
<img src='{{ asset($patient->photo) }}' class="img-rounded center" style='height: 59px; width: 100%' />
@else
<img src="/uploads/streamline_images/person-place-holder.jpg" class="img-rounded center" style='height: 100%; width: 100%' />
@endif
<div class="center img-pat-profile"
style="height: 100%; width: 100%; background: url(@if (!is_null($patient->photo) && $patient->photo != '') {{ asset($patient->photo) }} @else {{ asset('/uploads/streamline_images/person-place-holder.jpg') }} @endif) center no-repeat; background-size: auto 100%; min-height: 110px; position: relative;">
<!-- img-rounded -->
<i class="fa fa-refresh"
style="display: none; position: absolute; right: -10px; top: -10px"></i>
</div>
</a>
</div>
<div class="modal fade" id="modal-photo" tabindex="-1" role="dialog" aria-labelledby="modal-photoLabel1">
<div class="modal fade" id="modal-photo" tabindex="-1" role="dialog"
aria-labelledby="modal-photoLabel1">
<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">&times;</span></button>
<h4 class="modal-title" id="modal-photoLabel1">{{ __('allergies.insured_patient_photo') }}</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-photoLabel1">
{{ __('allergies.insured_patient_photo') }}</h4>
</div>
<div class="modal-body">
<div class="col-sm-12">
<img src='{{ asset($patient->photo) }}' class="img-rounded center" style="margin: auto" />
<div class="col-sm-12 text-center">
<img src="@if (!is_null($patient->photo) && $patient->photo != '') {{ asset($patient->photo) }} @else {{ asset('/uploads/streamline_images/person-place-holder.jpg') }} @endif"
class="img-rounded center" style="margin: auto" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">{{ __('allergies.close') }}</button>
<button type="button" class="btn btn-danger btn-sm"
data-dismiss="modal">{{ __('allergies.close') }}</button>
</div>
</div>
</div>
@@ -105,29 +135,36 @@
<div class="col-sm-12">
<div>
<div class="button-box">
<button type="button" class="btn btn-danger btn-rounded btn-sm" data-toggle="modal" data-target="#modal-allergies" style="line-height: 10px; font-size: 11px;">{{ __('allergies.allergies') }} <i class="fa fa-plus-circle"></i></a></button>
<button type="button"
class="btn btn-danger btn-rounded btn-sm mb-1 d-flex justify-content-between align-items-center"
data-toggle="modal" data-target="#modal-allergies"
style="line-height: 10px; font-size: 11px; gap: 10px;">{{ __('allergies.allergies') }} <i
class="fa fa-plus-circle"></i></button>
</div>
<div class="modal fade" id="modal-allergies" tabindex="-1" role="dialog" aria-labelledby="modal-allergiesLabel1">
<div class="modal fade" id="modal-allergies" tabindex="-1" role="dialog"
aria-labelledby="modal-allergiesLabel1">
<div class="modal-dialog modal-lg allergy-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">&times;</span></button>
<h4 class="modal-title" id="modal-allergiesLabel1">{{ __('allergies.add_allergies_patient') }}</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-allergiesLabel1">
{{ __('allergies.add_allergies_patient') }}</h4>
</div>
<div class="modal-body allergy-modal-body">
<div class="container-fluid">
<h4>{{ __('allergies.currently_known') }}</h4>
<div class="row">
@php $allergic_drugs_ids_array = []; @endphp
@if(count($known_patient_allergies) > 0 )
@foreach($known_patient_allergies as $allergy)
@if (count($known_patient_allergies) > 0)
@foreach ($known_patient_allergies as $allergy)
@php $allergic_drugs_ids_array = explode(',' , $allergy->names); @endphp
@endforeach
@php $chunked_allergy_array = array_chunk($allergic_drugs_ids_array, 1, true) @endphp
@foreach($chunked_allergy_array as $items)
@foreach ($chunked_allergy_array as $items)
<div class="col-md-4">
@foreach($items as $item)
@if(isset($drug_categories_array[$item]))
@foreach ($items as $item)
@if (isset($drug_categories_array[$item]))
&#8226 {{ $drug_categories_array[$item] }} <br>
@endif
@endforeach
@@ -139,60 +176,70 @@
<br>
<div class="row">
<form>
<h4>{{ __('allergies.allergic_reactions') }}</h4>
@foreach($drug_categories->chunk(9) as $chunk)
@foreach($chunk as $drug_category)
@foreach ($drug_categories->chunk(9) as $chunk)
@foreach ($chunk as $drug_category)
<div class="col-md-4">
<!-- if it is a known allergy then check the checkbox -->
@if(in_array($drug_category->id,$allergic_drugs_ids_array))
<input class='patient_allergies' name='allergies[]' type='checkbox' checked="true" value='{{ $drug_category->id }}'/> {{ $drug_category->name }}
@if (in_array($drug_category->id, $allergic_drugs_ids_array))
<input class='patient_allergies' name='allergies[]'
type='checkbox' checked="true"
value='{{ $drug_category->id }}' />
{{ $drug_category->name }}
@else
<input class='patient_allergies' name='allergies[]' type='checkbox' value='{{ $drug_category->id }}'/> {{ $drug_category->name }}
<input class='patient_allergies' name='allergies[]'
type='checkbox'
value='{{ $drug_category->id }}' />
{{ $drug_category->name }}
@endif
<br/>
<br />
</div>
@endforeach
@endforeach
<!-- <hr> -->
<input type="hidden" id="allergy_patient_id" name="allergy_patient_id" value="<?php echo $patient->id; ?>">
<!-- <button type="button" id="submit_allergies" class="btn btn-success btn-sm">Submit Allergies</button>
<div class="separator bottom"></div>
<form> -->
@endforeach
<!-- <hr> -->
<input type="hidden" id="allergy_patient_id"
name="allergy_patient_id" value="<?php echo $patient->id; ?>" />
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="submit_allergies" class="btn btn-success btn-sm">{{ __('allergies.submit_allergies') }}</button>
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">{{ __('allergies.close') }}</button>
</form>
<button type="button" id="submit_allergies"
class="btn btn-success btn-sm">{{ __('allergies.submit_allergies') }}</button>
<button type="button" class="btn btn-danger btn-sm"
data-dismiss="modal">{{ __('allergies.close') }}</button>
</div>
</div>
</div>
</div>
<table class="table-bordered table-condensed table-striped" id="allergies_drugs_table">
<table class="table-bordered table-condensed table-striped w-100 mb-3 br-5"
id="allergies_drugs_table"
style="border-collapse: collapse; border-spacing: 0; border-spacing: 0;">
<tbody>
<td style="font-weight: normal;">
<div id="patient_allergies_tab">
@if(count($allergic_drugs_ids_array) > 0)
@if(isset($allergic_drugs_ids_array[0]) && isset($drug_categories_array[$allergic_drugs_ids_array[0]]))
&#8226 <small style="color: red;">{{ $drug_categories_array[$allergic_drugs_ids_array[0]] }}</small><br>
@endif
<tr style="border-spacing: 0;">
<td style="font-weight: normal; border-spacing: 0;">
<div id="patient_allergies_tab">
@if (count($allergic_drugs_ids_array) > 0)
@if (isset($allergic_drugs_ids_array[0]) && isset($drug_categories_array[$allergic_drugs_ids_array[0]]))
&#8226 <small
style="color: red;">{{ $drug_categories_array[$allergic_drugs_ids_array[0]] }}</small><br>
@endif
@if(isset($allergic_drugs_ids_array[1]) && isset($drug_categories_array[$allergic_drugs_ids_array[1]]))
&#8226 <small style="color: red;">{{ $drug_categories_array[$allergic_drugs_ids_array[1]] }}</small><br>
@if (isset($allergic_drugs_ids_array[1]) && isset($drug_categories_array[$allergic_drugs_ids_array[1]]))
&#8226 <small
style="color: red;">{{ $drug_categories_array[$allergic_drugs_ids_array[1]] }}</small><br>
@endif
@else
<small
style="color: blue;">{{ __('allergies.no_recorded_allergies') }}</small>
@endif
@else
<small style="color: blue;">{{ __('allergies.no_recorded_allergies') }}</small>
</div>
@if (count($allergic_drugs_ids_array) > 0)
<a href="/allergies">{{ __('allergies.view_all') }}</a>
@endif
</div>
@if(count($allergic_drugs_ids_array) > 0) <a href="/allergies">{{ __('allergies.view_all') }}</a> @endif
</td>
</td>
</tr>
</tbody>
</table>
</div>
@@ -204,19 +251,27 @@
<div class="col-sm-12">
<div>
<div class="button-box">
<button type="button" class="btn btn-danger btn-rounded btn-sm" data-toggle="modal" data-target="#modal-alerts" style="line-height: 10px; font-size: 11px;">{{ __('allergies.alerts') }} <i class="fa fa-plus-circle"></i></button>
<button type="button"
class="btn btn-danger btn-rounded btn-sm mb-1 d-flex justify-content-between align-items-center"
data-toggle="modal" data-target="#modal-alerts"
style="line-height: 10px; font-size: 11px; gap: 10px;">{{ __('allergies.alerts') }} <i
class="fa fa-plus-circle"></i></button>
</div>
<div class="modal fade" id="modal-alerts" tabindex="-1" role="dialog" aria-labelledby="modal-alertsLabel1">
<div class="modal fade" id="modal-alerts" tabindex="-1" role="dialog"
aria-labelledby="modal-alertsLabel1">
<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">&times;</span></button>
<h4 class="modal-title" id="modal-alertsLabel1">{{ __('allergies.alerts_for_patient') }}</h4>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-alertsLabel1">
{{ __('allergies.alerts_for_patient') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<form>
<input type="hidden" id="alert_patient_id" name="alert_patient_id" value="{{ $patient->id }}">
<input type="hidden" id="alert_patient_id" name="alert_patient_id"
value="{{ $patient->id }}">
<div class="control-group">
<label for="alerts">{{ __('allergies.enter_alert') }}</label>
@@ -229,32 +284,42 @@
</div>
</div>
<div class="modal-footer">
<input type="submit" id="submit_alerts" class = "btn btn-success btn-sm" value="{{ __('allergies.submit_alert') }}" />
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">{{ __('allergies.close') }}</button>
<input type="submit" id="submit_alerts" class = "btn btn-success btn-sm"
value="{{ __('allergies.submit_alert') }}" />
<button type="button" class="btn btn-danger btn-sm"
data-dismiss="modal">{{ __('allergies.close') }}</button>
</div>
</div>
</div>
</div>
<table class="table-bordered table-condensed table-striped">
<table class="table-bordered table-condensed table-striped w-100 mb-3 br-5"
style="border-collapse: collapse; border-spacing: 0;">
<tbody>
<td style="font-weight: normal">
<div id="patient_alerts_tab">
@if(isset($known_patient_alerts) && count($known_patient_alerts) > 0)
@if(isset($known_patient_alerts[0]))
&#8226 <small style="color: red;">{{ $known_patient_alerts[0]->alerts }}</small><br>
@endif
<tr style="border-spacing: 0;">
<td style="font-weight: normal">
<div id="patient_alerts_tab">
@if (isset($known_patient_alerts) && count($known_patient_alerts) > 0)
@if (isset($known_patient_alerts[0]))
&#8226 <small
style="color: red;">{{ $known_patient_alerts[0]->alerts }}</small><br>
@endif
@if(isset($known_patient_alerts[1]))
&#8226 <small style="color: red;">{{ $known_patient_alerts[1]->alerts }}</small><br>
@endif
@else
<small style="color: blue;">{{ __('allergies.no_recorded_alerts') }}</small>
@endif
</div>
@if (isset($known_patient_alerts[1]))
&#8226 <small
style="color: red;">{{ $known_patient_alerts[1]->alerts }}</small><br>
@endif
@else
<small
style="color: blue;">{{ __('allergies.no_recorded_alerts') }}</small>
@endif
</div>
@if(isset($known_patient_alerts) && count($known_patient_alerts) > 0) <a href="/alerts/view_alerts">View All</a> @endif
</td>
@if (isset($known_patient_alerts) && count($known_patient_alerts) > 0)
<a href="/alerts/view_alerts">View All</a>
@endif
</td>
</tr>
</tbody>
</table>
</div>
@@ -268,41 +333,47 @@
$age_diff_months = $dob->diffInMonths(Carbon\Carbon::now());
@endphp
@if($age_diff_months < 61 && is_smart_discharge_enabled())
@if ($age_diff_months < 61 && is_smart_discharge_enabled())
<div class="col-sm-2">
<div class="button-box">
<a class="btn btn-danger btn-rounded btn-sm" style="line-height: 10px; font-size: 11px;">Post Discharge Risk of Mortality</a>
<a class="btn btn-danger btn-rounded btn-sm mb-1 d-flex justify-content-between align-items-center gap-2"
style="line-height: 10px; font-size: 11px; gap: 10px;">
Post Discharge Risk of Mortality
</a>
</div>
<table class="table-bordered table-condensed table-striped">
<tbody>
<tr>
<td>
@if(is_patient_currently_admitted($patient->id))
{!! get_post_discharge_mortality_risk($patient->id) !!}
@else
@php
// just generate the row without displaying anything
$disregard_this = get_post_discharge_mortality_risk($patient->id);
@endphp
Patient is not admitted
@endif
</td>
</tr>
<table class="table-bordered table-condensed table-striped w-100 br-5">
<tbody class="br-5">
<tr class="br-5">
<td class="br-5">
@if (is_patient_currently_admitted($patient->id))
{!! get_post_discharge_mortality_risk($patient->id) !!}
@else
@php
// just generate the row without displaying anything
$disregard_this = get_post_discharge_mortality_risk($patient->id);
@endphp
Patient is not admitted
@endif
</td>
</tr>
</tbody>
</table>
</div>
@endif
</div>
<div id="saved_allergies_alert" class="myadmin-alert alert-success myadmin-alert-top-right"><a href="#" class="closed">&times;</a>
<div id="saved_allergies_alert" class="myadmin-alert alert-success myadmin-alert-top-right"><a href="#"
class="closed">&times;</a>
<h4>{{ __('allergies.allergies_updated') }}</h4>
</div>
<div id="saved_alerts_alert" class="myadmin-alert alert-success myadmin-alert-top-right"><a href="#" class="closed">&times;</a>
<div id="saved_alerts_alert" class="myadmin-alert alert-success myadmin-alert-top-right"><a href="#"
class="closed">&times;</a>
<h4>{{ __('allergies.alerts_updated') }}</h4>
</div>
<div class="modal fade" id="all_allergies_modal" tabindex="-1" role="dialog" aria-labelledby="modal-successLabel1">
<div class="modal fade" id="all_allergies_modal" tabindex="-1" role="dialog"
aria-labelledby="modal-successLabel1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
@@ -316,9 +387,9 @@
$allergy_count = count($allergic_drugs_ids_array);
@endphp
@for($i=0 ; $i < $allergy_count ; $i++)
@for ($i = 0; $i < $allergy_count; $i++)
<li class="col-sm-3">
<small>{{ isset($drug_categories_array[$allergic_drugs_ids_array[$i]]) ? $drug_categories_array[$allergic_drugs_ids_array[$i]] : "" }}</small>
<small>{{ isset($drug_categories_array[$allergic_drugs_ids_array[$i]]) ? $drug_categories_array[$allergic_drugs_ids_array[$i]] : '' }}</small>
</li>
@endfor
@@ -330,7 +401,8 @@
<div class="modal-footer">
<div class="control-group" style="vertical-align: center;">
<div class="controls">
<button type="button" class="btn btn-success" data-dismiss="modal">{{ __('allergies.ok') }}</button>
<button type="button" class="btn btn-success"
data-dismiss="modal">{{ __('allergies.ok') }}</button>
</div>
</div>
</div>
@@ -364,9 +436,12 @@
$.ajax({
type: 'POST',
url: '/store_patient_allergies',
data: {patient_allergies:patient_allergies, allergy_patient_id:allergy_patient_id},
data: {
patient_allergies: patient_allergies,
allergy_patient_id: allergy_patient_id
},
cache: false,
success: function (response) {
success: function(response) {
//display success notification modal
$("#saved_allergies_alert").fadeToggle(350);
@@ -374,19 +449,21 @@
let drug_categories_array = {!! json_encode($drug_categories_array) !!};
let patientAllergiesTabHtml = "";
if (typeof patient_allergies[0] !== 'undefined'){
patientAllergiesTabHtml += "&#8226 <small style=\"color: red;\">" + drug_categories_array[patient_allergies[0]] + "</small><br>";
if (typeof patient_allergies[0] !== 'undefined') {
patientAllergiesTabHtml += "&#8226 <small style=\"color: red;\">" +
drug_categories_array[patient_allergies[0]] + "</small><br>";
}
if (typeof patient_allergies[1] !== 'undefined'){
patientAllergiesTabHtml += "&#8226 <small style=\"color: red;\">" + drug_categories_array[patient_allergies[1]] + "</small><br>";
if (typeof patient_allergies[1] !== 'undefined') {
patientAllergiesTabHtml += "&#8226 <small style=\"color: red;\">" +
drug_categories_array[patient_allergies[1]] + "</small><br>";
}
$("#patient_allergies_tab").html(patientAllergiesTabHtml);
$('input[name="allergies[]"]').each(function() {
// loop through allergies and recheck values
if(jQuery.inArray(this.value, patient_allergies) !== -1){
if (jQuery.inArray(this.value, patient_allergies) !== -1) {
$(this).prop('checked', true);
} else {
$(this).prop('checked', false);
@@ -401,21 +478,46 @@
e.preventDefault();
$('#modal-alerts').modal('hide');
var alert_patient_id = $('#alert_patient_id').val();
var patient_alerts = $('#alerts').val();//
var patient_alerts = $('#alerts').val(); //
$.ajax({
type: 'POST',
url: '/store_patient_alerts',
data: {patient_alerts:patient_alerts, alert_patient_id:alert_patient_id},
data: {
patient_alerts: patient_alerts,
alert_patient_id: alert_patient_id
},
cache: false,
success: function (response) {
success: function(response) {
//display success notification modal
$("#saved_alerts_alert").fadeToggle(350);
}
});
});
$(window).on('load', function() {
let def_view = true;
$('.img-pat-profile').hover(
function() {
$('.img-pat-profile i').css('display', '');
},
function() {
$('.img-pat-profile i').css('display', 'none');
});
$('.img-pat-profile i').on('click tap', function(e) {
e.preventDefault();
if (def_view) {
$('.img-pat-profile').css('background-size', '100% auto');
} else {
$('.img-pat-profile').css('background-size', ' auto 100%');
}
def_view = !def_view;
})
});
</script>
@endpush
@@ -34,7 +34,7 @@
echo '<tr class="pricing">';
?>
<td class="center">{{ $patient->number }}</td>
<td class="center">{{ insurance_flag($patient->id) }}</td>
<td class="center">{!! insurance_flag($patient->id) !!}</td>
<td class="center">{{ $patient->gender == 1 ? __('allergies.male') : __('allergies.female') }}</td>
<td class="center">
<?php echo streamline_date_plain($patient->date_of_birth); ?>
@@ -0,0 +1,60 @@
<div class="modal fade" id="diagnosisModal" 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">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('consultations.add_new_diagnosis') }}</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('diagnosis_name', __('diagnoses.diagnosis_name')) }}
{{ Form::text('diagnosis_name', '', ['class' => 'form-control compulsory', 'id'=>'diagnosis_name']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('icd10_code', __('diagnoses.icd_10_code')) }}
{{ Form::text('icd10_code', '', ['class' => 'form-control','id'=>'icd10_code']) }}
</div>
<div class="form-group">
{{ Form::label('hmis_no_outpatient', __('diagnoses.hmis_out_patient_number')) }}
{{ Form::text('hmis_no_outpatient', '', ['class'=>'form-control','id'=>'hmis_no_outpatient']) }}
</div>
<div class="form-group">
{{ Form::label('hmis_no_inpatient', __('diagnoses.hmis_inpatient_category')) }}
{{ Form::text('hmis_no_inpatient', '', ['class'=>'form-control','id'=>'hmis_no_inpatient']) }}
</div>
<div class="form-group">
{{ Form::label('hmis_category', __('diagnoses.hmis_category')) }}
{{ Form::select('hmis_category', $hmis_categories, '', ['class' => 'form-control','id'=>'hmis_category']) }}
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('diagnosis_prompts', __('diagnoses.diagnosis_prompt')) }}
{{ Form::textArea('diagnosis_prompts', '', ['class'=>'form-control','id'=>'diagnosis_prompts', 'rows' => 5]) }}
</div>
<div class="form-group">
{{ Form::label('', __('diagnoses.chronic_status'), ["class"=>'col-md-12']) }}
&nbsp;{{ __('diagnoses.yes') }} {{ Form::radio('chronic_status', 1, false, ['class' => 'check', 'id' => 'chronic_yes']) }}
&nbsp;{{ __('diagnoses.no') }} {{ Form::radio('chronic_status', 0, false, ['class' => 'check', 'id' => 'chronic_no']) }}
<div class="help-block with-errors"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('consultations.cancel') }}</button>
<a class="btn btn-success" onclick="submitDiagnosis()">{{ __('consultations.add_diagnosis') }}</a>
</div>
</div>
</div>
</div>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,63 @@
<div class="modal" id="document_modal" tabindex="-1" role="dialog" aria-labelledby="document_modal_label" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="debt_plan_modal_label"><b>Add Patient Document</b></h5>
</div>
<div class="modal-body">
<div class="row">
{{ Form::open(['route' => 'patient_documents.modal_store','data-toggle'=>'validator','files'=>'true']) }}
{{--<form id="add_document_form" method="post" enctype="multipart/form-data">--}}
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('patientnumber','Patient Number') }}
{{ Form::text('patientnumber',$patient->number,['class' => 'form-control compulsory', 'required',
'data-error'=>'','readonly'=>'true', 'id'=>'patientnumber']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('documenttitle','Document Title') }}
{{ Form::text('documenttitle','',['class' => 'form-control compulsory', 'required', 'data-error'=>'', 'id'=>'documenttitle' ]) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('description','Description') }}
{{ Form::textArea('description','',['class' => 'form-control', 'id'=>'description']) }}
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('documentdate','Date of document') }}
<div class="input-group">
{{ Form::text('documentdate','',['class' => 'form-control compulsory', 'required','readonly',
'id'=>'documentdate']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('document','Document') }}
{{ Form::file('document',['class' => 'form-control compulsory', 'required', 'id'=>'document']) }}
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancel Document</button>
<button type="submit" class="btn btn-success" >Save Document</button>
</div>
{{--</form>--}}
{{ Form::close() }}
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,250 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Referral Notes - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
body{
font-size: 0.8em;
}
/*thead, tfoot { display: table-row-group }*/
thead {
display: table-header-group;
}
tfoot {
display: table-row-group;
}
tr {
page-break-before: always;
page-break-after: always;
page-break-inside: avoid;
}
.card-header{
padding: 5px;
}
</style>
</head>
@php
$total_deposits_paid = 0;
$total_amount_to_pay = 0;
$discount_amount = 0;
$insurance_hospital_stay = 0;
$insurance_investigations = 0;
$insurance_treatments = 0;
$insurance_sundries = 0;
$insurance_procedures = 0;
$insurance_tta = 0;
$insurance_services = 0;
$price_list_id = is_patient_category_attached_to_price_list($patient_id);
$investigation_amount_total = 0;
@endphp
<body>
<div class="container-fluid">
@include('layouts.header_pdf_print')
<h5 class="heading" style="text-align: center;"> OUT-PATIENT REFERRAL NOTES</h5>
<div class="row">
<table class="table table-light table-sm table-borderless">
<tr>
<th scope="row">{{ __('inpatient.patient_number') }}</th>
<td>{{ $patient->number}}</td>
<td width="60" style="border-top: 0px;">&nbsp;</td>
<th>Clinic</th>
<td>
{{ get_name($consultation->clinic_id, 'id', 'name', 'clinics') }} &nbsp;
</td>
</tr>
<tr>
<th scope="row">{{ __('inpatient.patient_names') }}</th>
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
<td style="border-top: 0px;">&nbsp;</td>
<th>Consultation Date</th>
<td>
{{ streamline_date($consultation->created_at) }}
</td>
</tr>
<tr>
<th scope="row">{{ __('inpatient.age') }}</th>
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
<td style="border-top: 0px;">&nbsp;</td>
<th></th>
<td>
</td>
</tr>
<tr>
<th scope="row">{{ __('inpatient.gender') }}</th>
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
<td style="border-top: 0px;">&nbsp;</td>
<th scope="row">{{ __('inpatient.category') }}</th>
<td>
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
@if(!is_null($patient_discount))
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
@endif
</td>
</tr>
</table>
</div>
<div class="row">
@if( Auth::user()->can('view-patient-episode-primary-diagnoses'))
<div class="col">
<div class="card">
<div class="card-header">
<strong>Primary Diagnosis</strong>
</div>
@php
$primary_diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($consultation->primary_diagnosis);
@endphp
<table class="table table-light table-sm">
<thead>
<tr>
<td>{{ $primary_diagnosis ? $primary_diagnosis->name : "" }}</td>
</tr>
</thead>
</table>
</div>
@php
$other_diagnoses = @unserialize($consultation->other_diagnoses);
@endphp
@if(!empty($other_diagnoses))
<div class="card">
<div class="card-header">
<strong>Secondary Diagnosis</strong>
</div>
<table class="table table-light table-sm">
<thead>
@foreach($other_diagnoses as $diagnosis)
@php
$other_diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($diagnosis);
@endphp
<tr>
<td>{{ $other_diagnosis ? $other_diagnosis->name : "" }}</td>
</tr>
@endforeach
</thead>
</table>
</div>
@endif
</div>
@endif
</div>
<br>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<strong>Investigations done</strong>
</div>
<table class="table table-light table-sm">
<thead>
@if(count($ward_investigations) > 0)
@for($i = 0; $i < count($ward_investigations['name']); $i++)
@if(in_array($i, $ward_investigations_position))
<tr>
<td colspan="3">
<h5><code>{{ $ward_investigations_date[array_search($i, $ward_investigations_position)] }}</code></h5>
</td>
</tr>
@endif
<tr>
<td>{{ $ward_investigations['name'][$i] }}</td>
<input type="hidden" name="ward_investigation_ids[]" value="{{ $ward_investigations['id'][$i] }}">
<td>
@if($ward_investigations['type'][$i] == 1 && $ward_investigations['value'][$i] != "Pending")
<i style="color: blue"> Refer to investigation report </i>
@else
{{ $ward_investigations['value'][$i] }}
@endif
</td>
<td>{{ $ward_investigations['comment'][$i] }}</td>
</tr>
@endfor
@else
<tr>
<td colspan="3">No investigations done</td>
</tr>
@endif
</thead>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<strong>Referral Notes</strong>
</div>
<table class="table table-light table-sm">
<thead>
<tr>
<td>{{ $consultation->referral_notes }}</td>
</tr>
</thead>
</table>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col">
<div class="card">
<table class="table table-light table-sm">
<thead>
<tr>
<td><b>Referred By: </b></td>
<td>{{ !is_null($consultation->consultation_done_by) ? get_full_name($consultation->consultation_done_by, "id", "first_name", "last_name", "users") : get_full_name($consultation->created_by, "id", "first_name", "last_name", "users")}} to {{ get_name($consultation->referred_to, 'id', 'name', 'referral_hospitals') }}</td>
</tr>
</thead>
</table>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
Printed By
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<?php echo Auth::user()->first_name . ' ' . Auth::user()->last_name; ?>
&nbsp;&nbsp;&nbsp;....................................................
&nbsp;&nbsp;&nbsp;({{ streamline_date(date("Y-m-d")) }})
</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,88 @@
@php
$had_positive_response_to_tb_qn = false;
@endphp
@if($triage)
@if ($triage->any_tb_sysmptoms == 1)
@php
if($triage->cough_for_2_weeks == 1 || $triage->fever_for_2_weeks || $triage->tb_weight_loss || $triage->tb_poor_weight_gain || $triage->tb_excessive_night_sweats || $triage->tb_contact_with_tb_person){
$had_positive_response_to_tb_qn = true;
}
$consultation = \Streamline\Models\Consultation::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->first();
$tb_assessment_status = false;
if ($consultation) {
$tb_assessment_status = $consultation->tb_status_assessment;
}
@endphp
@endif
@endif
@if ($had_positive_response_to_tb_qn)
<div class="row">
<div class="col-sm-12">
<div class="white-box">
<table class="table table-hover color-table info-table table-bordered">
<thead>
<tr>
<th colspan="3">Please show your assessment of the patients TB Status: </span></th>
</tr>
</thead>
<tbody>
<tr class="cough_tb_question" style="background-color: #f3f3f5;">
<td>Definite TB &nbsp;
<input type="radio" name='tb_status_assessment' id='patient_tb_status_definite_tb' class="patient_tb_status" value="1" {!! $tb_assessment_status == 1 ? "checked='true'" : "" !!} required>
</td>
<td>Possible TB &nbsp;
<input type="radio" name='tb_status_assessment' id='patient_tb_status_possible_tb' class="patient_tb_status" value="2" {!! $tb_assessment_status == 2 ? "checked='true'" : "" !!} required>
</td>
<td>Definitely not TB &nbsp;
<input type="radio" name='tb_status_assessment' id='patient_tb_status_definitely_not_tb' class="patient_tb_status" value="3" {!! $tb_assessment_status == 3 ? "checked='true'" : "" !!} required>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal fade" id="TBActionModal" tabindex="-1" role="dialog" aria-labelledby="modalTBActionLabel1" style="margin-top: 10%">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<br>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1"><strong style="color: rgb(68, 165, 221);">TB Assesment</strong></h4>
</div>
<div class="modal-body">
<div class="definite_tb_message" style="display:none; font-weight:bolder; font-size:16px">
Ensure the Patient is registered in TB Treatment Unit
</div>
<div class="possible_tb_message" style="display:none; font-weight:bolder; font-size:16px">
Organise further investigations and follow up to check for TB
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
@push('scripts')
<script>
$('.patient_tb_status').change(function(){
if($("#patient_tb_status_definite_tb").is(':checked') && $("#patient_tb_status_possible_tb").is(":not(:checked)")){
$("#TBActionModal").modal("show");
$(".definite_tb_message").show();
$(".possible_tb_message").hide();
}
if($("#patient_tb_status_possible_tb").is(":checked") && $("#patient_tb_status_definite_tb").is(":not(:checked)")){
$("#TBActionModal").modal("show");
$(".possible_tb_message").show();
$(".definite_tb_message").hide();
}
})
</script>
@endpush
@endif
@@ -59,10 +59,7 @@
<td>{{ $patient->first_name }} {{ $patient->last_name}}</td>
<td>{{ $document->title }}</td>
<td>{{ $document->description }}</td>
@php
$uploaded_by = \Streamline\Models\User::find($document->created_by);
@endphp
<td>{{ $uploaded_by->first_name }} {{ $uploaded_by->last_name }}</td>
<td>{{ get_full_name($document->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
<td><a href="/patient_documents/{{ $document->id }}" target="_blank">{{ __('patient_documents.preview') }}</a></td>
<td>
{{ Form::model($document->id ,['method' => 'DELETE', 'route' => ['patient_documents.destroy', $document->id]]) }}
@@ -8,15 +8,12 @@
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ public_path('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Inpatient Bill - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ public_path('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
body{
font-size: 0.8em;
}
/*thead, tfoot { display: table-row-group }*/
thead {
display: table-header-group;
@@ -54,7 +51,7 @@
</tr>
<tr>
<th scope="row">{{ __('patient_file.age') }}</th>
<td><?php echo \Carbon\Carbon::parse($patient->date_of_birth)->age; ?> {{ __('patient_file.years') }}</td>
<td><?php echo get_patients_age($patient->date_of_birth, $episode->created_at); ?></td>
<th scope="row">{{ __('patient_file.gender') }}</th>
<td><?php echo $patient->gender == 1 ? __('patient_file.male') : __('patient_file.female') ?></td>
</tr>
@@ -71,6 +68,12 @@
@else
{{ $outcomes[$consultation->outcome_id] ?? "" }}
@endif
@elseif (!empty($main_exam->outcome_id))
@if($main_exam->outcome_id == 3)
{{ $outcomes[$main_exam->outcome_id] . ' on (' . streamline_date($main_exam->followup_when) . ')' }}
@else
{{ $outcomes[$main_exam->outcome_id] ?? "" }}
@endif
@elseif (!empty($antenatal_data->outcome_id))
@if($antenatal_data->outcome_id == 3)
{{ $outcomes[$antenatal_data->outcome_id] . ' on (' . streamline_date($antenatal_data->followup_when) . ')' }}
@@ -80,10 +83,259 @@
{{ $outcomes[$antenatal_data->outcome_id] ?? "" }}
@endif
@endif
</td>
</tr>
</table>
@if($triage)
<div class="row"><div class="col text-center"><h5>{{ __('consultations.triage_details') }}</h5></div></div>
@php
$observations_array = explode(',', $triage->observations); //i.e[temp=44,height=2]
$parent_observation_array = isset($parent_triage_details) ? explode(',', $parent_triage_details->observations): [];
@endphp
<div class="row">
<div class="col">
<table class="table table-sm table-bordered">
<thead class="thead-light">
<tr>
<th><b>{{ __('consultations.observation') }}</b></th>
<th><b>{{ __('consultations.value') }}</b></th>
@if(check_if_episode_is_a_followup($episode->id))
<th>
{{ __('consultations.previous_value') }}
</th>
@endif
</tr>
</thead>
<tbody>
@php $counter = 0; @endphp
@foreach($observations_array as $observation)
@php
$item_array = explode('=', $observation); //i.e[temp,44]
$counter++;
@endphp
@if($counter < 9)
<tr>
<td>{{ $item_array[0] }}</td>
<td>{{ $item_array[1] }}</td>
<!-- show details of past triage of original episode -->
@if(check_if_episode_is_a_followup($episode->id))
@foreach($parent_observation_array as $parent_observation)
@php
$parent_item_array = isset($parent_triage_details) ? explode('=', $parent_observation) : [];
@endphp
@if($item_array[0] == $parent_item_array[0])
<td>
{{ $parent_item_array[1] }}
</td>
@endif
@endforeach
@endif
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
<div class="col">
<table class="table table-sm table-bordered">
<thead class="thead-light">
<tr>
<th><b>{{ __('consultations.observation') }}</b></th>
<th><b>{{ __('consultations.value') }}</b></th>
@if(check_if_episode_is_a_followup($episode->id))
<th>
{{ __('consultations.previous_value') }}
</th>
@endif
</tr>
</thead>
<tbody>
@php $counter=0; @endphp
@foreach($observations_array as $observation)
@php
$item_array = explode('=', $observation); //i.e[temp,44]
$counter++;
@endphp
@if($counter >= 9)
<tr>
<td>{{ isset($item_array[0]) ? $item_array[0] : "" }}</td>
<td>{{ isset($item_array[1]) ? $item_array[1] : "" }}</td>
<!-- show details of past triage of original episode -->
@if(check_if_episode_is_a_followup($episode->id))
@foreach($parent_observation_array as $parent_observation)
@php
$parent_item_array = isset($parent_triage_details) ? explode('=', $parent_observation) : [];
@endphp
@if($item_array[0] == $parent_item_array[0])
<td>
{{ $parent_item_array[1] }}
</td>
@endif
@endforeach
@endif
</tr>
@endif
@endforeach
<tr>
<td>{{ __('consultations.triage_grade') }}</td>
<td>
@switch($triage->severe_grade)
@case (1)
<div><span class="text-success" style="font-weight: bolder;">{{ __('consultations.green') }}</span></div>
@break
@case (2)
<div><span class="text-warning" style="font-weight: bolder;">{{ __('consultations.yellow') }}</span></div>
@break
@case (3)
<div><span class="text-danger" style="font-weight: bolder;">{{ __('consultations.red') }}</span></div>
@break
@default
<code>{{ __('consultations.triage_grade_not_determined') }}</code>
@endswitch
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br><br>
@php $nutrition = DB::table('triage_nutrition')->where('patient_id', $triage->patient_id)->where('episode_id', $triage->episode_id)->first(); @endphp
@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
<strong>{{ __('consultations.comment') }}:</strong> {{ !is_null($triage) ? $triage->comments : "" }}<br>
<strong>{{ __('consultations.triage_done_by') }}:</strong> {!! '<font style="color:blue;">'.\Streamline\Models\User::withTrashed()->find($triage->created_by)->first_name. " ".\Streamline\Models\User::withTrashed()->find($triage->created_by)->last_name.' on '.streamline_date_time($triage->created_at).'</font>' !!}
<br><br>
@endif
{{-- Symptoms, Priority and Emergency Signs --}}
<div class="row">
<div class="col">
<div class="card-deck">
<div class="card border-0">
<div class="card-block">
<div class="card-header">
<h5 class="card-title text-center">{{ __('consultations.symptoms') }}</h5>
</div>
@if (!empty($triage->symptoms) || !empty($consultation->symptoms))
@php
$symptoms_explode = !empty($triage->symptoms)? explode(",", $triage->symptoms):explode(",", $consultation->symptoms);
$symptoms_duration = !empty($triage->symptom_duration)? explode(",", $triage->symptom_duration):explode(",", $consultation->symptom_duration);
@endphp
<p class="card-text">
<ul class="list-group list-group-flush">
@foreach ($symptoms_explode as $key => $symptom)
<li class="list-group-item text-center">{{ ucwords($symptoms[$symptom] ?? '') }} for {{ $symptoms_duration[$key]?? '' }}</li>
@endforeach
</ul>
</p>
@else
<p class="card-text">
<ul class="list-group list-group-flush">
<li class='list-group-item text-center font-weight-bold text-danger'>{{ __('consultations.no_symptom_recorded') }}</li>
</ul>
</p>
@endif
</div>
</div>
@if (between($years, 0, 12))
<div class="card border-0">
<div class="card-block">
<div class="card-header">
<h5 class="card-title text-center">{{ __('triage.emergency_signs') }}</h5>
</div>
@if (!empty($emergent_signs))
<p class="card-text">
<ul class="list-group list-group-flush">
@foreach ($emergent_signs as $emergent_sign)
<li class='list-group-item text-center'>{{ ucwords($emergent_sign ?? '') }}</li>
@endforeach
</ul>
</p>
@else
<p class="card-text text-success">
<ul class="list-group list-group-flush">
<li class='list-group-item text-center text-success font-weight-bold'>{{ __('layout.no_emergency_signs') }}</li>
</ul>
</p>
@endif
</div>
</div>
<div class="card border-0">
<div class="card-block">
<div class="card-header">
<h5 class="card-title text-center">{{ __('layout.priority_signs') }}</h5>
</div>
@if (count($priority_signs) > 0)
<p class="card-text">
<ul class="list-group list-group-flush">
@foreach ($priority_signs as $priority_sign)
<li class='list-group-item text-center'>{{ ucwords($priority_sign ?? '') }}</li>
@endforeach
</ul>
</p>
@else
<p class="card-text">
<ul class="list-group list-group-flush">
<li class='list-group-item text-center text-success font-weight-bold'>{{ __('layout.no_priority_signs') }}</li>
</ul>
</p>
@endif
</div>
</div>
@endif
@if (isset($triage->any_tb_sysmptoms) && $triage->any_tb_sysmptoms == 1)
<div class="card border-0">
<div class="card-block">
<div class="card-header">
<h5 class="card-title text-center">{{ __('layout.tb_screening') }}</h5>
</div>
<table class="table table-bordered">
<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>Noticeable 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>
</div>
</div>
@endif
</div>
</div>
</div> <br>
@if($consultation)
<table class="table table-sm table-bordered">
<thead class="thead-light">
@@ -167,8 +419,497 @@
</table>
@endif
@endif
@if($main_exam)
<div class="row">
<div class="col-6">
<table class='table table-sm'>
<thead class="thead-light">
<tr>
<th colspan="3" class="text-center">External</th>
</tr>
</thead>
<tbody>
<tr>
<th width="10%"></th>
<th width="45%" class="text-center">Right</th>
<th width="45%" class="text-center">Left</th>
</tr>
<tr>
<th>Ext</th>
<th class="text-center">{{ $main_exam->external_right }}</th>
<th class="text-center">{{ $main_exam->external_left }}</th>
</tr>
</tbody>
</table>
<table class='table table-sm'>
<thead class="thead-light">
<tr>
<th colspan="3" class="text-center">Slit Lamp</th>
</tr>
</thead>
<tbody>
<tr>
<th width="20%"><b>Section</b></th>
<th width="40%" class="text-right"><b>Right</b></th>
<th width="40%" class="text-right"><b>Left</b></th>
</tr>
@foreach($slit_lamp_test_areas as $area)
<tr>
<td><b>{{ $area->name }}</b></td>
@php
$right_slug = $area->slug."_right";
$left_slug = $area->slug."_left";
$left_other_slug = $area->slug."_other_left";
$right_other_slug = $area->slug."_other_right";
@endphp
<td class="text-center">
@if(in_array($main_exam->$right_slug, $slit_lamp_test_area_ids))
@php
$value_array = explode(',', $main_exam->$right_slug);
@endphp
@for($x = 0; $x < count($value_array); $x++)
- {{ $slit_lamp_test_area_values[$value_array[$x]] }} <br/>
@endfor
@endif
@if(isset($right_other_slug))
- {{ $main_exam->$right_other_slug }}
@endif
</td>
<td class="text-center">
@if(in_array($main_exam->$left_slug, $slit_lamp_test_area_ids))
@php
$value_array = explode(',', $main_exam->$left_slug);
@endphp
@for($x = 0; $x < count($value_array); $x++)
- {{ $slit_lamp_test_area_values[$value_array[$x]] }} <br/>
@endfor
@endif
@if(isset($left_other_slug))
- {{ $main_exam->$left_other_slug }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@if (!empty($main_exam->doctors_notes))
<table class="table table-sm table-bordered">
<thead class="thead-light">
<tr><th>{{ __('inpatient.doctor_comments') }} (Main Exam)</th></tr>
</thead>
<tbody>
<tr><td>{!! nl2br(e($main_exam->doctors_notes)) !!}</td></tr>
</tbody>
</table>
@endif
</div>
<div class="col-6">
<table class='table table-sm'>
<thead class="thead-light">
<tr>
<th>EYE</th>
<th>SECTION</th>
<th>DIAGNOSIS</th>
</tr>
</thead>
<tbody>
@php
$right_diagnosis_array = explode(",", $main_exam->right_eye_diagnosis);
$left_diagnosis_array = explode(",", $main_exam->left_eye_diagnosis);
@endphp
@if(count($right_diagnosis_array) > 0)
@foreach($right_diagnosis_array as $id)
<tr>
<td>Right</td>
<td>{{ get_name(get_name($id, 'id', 'diagnosis_category', 'diagnoses'),'id','name','diagnosis_categories') }}</td>
<td>{{ get_name($id, 'id', 'name', 'diagnoses') }}</td>
</tr>
@endforeach
@else
<th>-</th>
<th>-</th>
<th>-</th>
@endif
@if(count($left_diagnosis_array) > 0)
@foreach($left_diagnosis_array as $id)
<tr>
<td>Left</td>
<td>{{ get_name(get_name($id, 'id', 'diagnosis_category', 'diagnoses'),'id','name','diagnosis_categories') }}</td>
<td>{{ get_name($id, 'id', 'name', 'diagnoses') }}</td>
</tr>
@endforeach
@else
<th>-</th>
<th>-</th>
<th>-</th>
@endif
</tbody>
</table>
<table class='table table-sm'>
<thead class="thead-light">
<tr>
<th colspan="2" class="text-center">IOP</th>
</tr>
</thead>
<tbody>
<tr>
<th width="45%" class="text-center">Right</th>
<th width="45%" class="text-center">Left</th>
</tr>
<tr>
<th class="text-center">{{ $main_exam->iop_right ?? '-' }}</th>
<th class="text-center">{{ $main_exam->iop_left ?? '-' }}</th>
</tr>
</tbody>
</table>
<table class='table table-sm'>
<thead class="thead-light">
<tr>
<th colspan="2" class="text-center">CDR</th>
</tr>
</thead>
<tbody>
<tr>
<th width="45%" class="text-center">Right</th>
<th width="45%" class="text-center">Left</th>
</tr>
<tr>
<th class="text-center">{{ $main_exam->cdr_right ?? '-' }}</th>
<th class="text-center">{{ $main_exam->cdr_left ?? '-' }}</th>
</tr>
</tbody>
</table>
</div>
</div>
@endif
@if($base_exam)
<br><br>
<div class="row">
<div class="col-6">
<table class="table table-sm">
<thead class="thead-light">
<tr>
<th class="text-left">Visual Acuity</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<br>
<div class="row">
<div class="col-2">Distance</div>
<div class="col-5">Right</div>
<div class="col-5">Left</div>
</div>
<br>
<div class="row" style="margin-bottom: 10px">
<div class="col-2 text-center">sc</div>
<div class="col-5">
{{ Form::text('visual_acuity_distance_sc_right', $base_exam->visual_acuity_distance_sc_right, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-5">
{{ Form::text('visual_acuity_distance_sc_left', $base_exam->visual_acuity_distance_sc_left, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-2 text-center">ph</div>
<div class="col-5">
{{ Form::text('visual_acuity_distance_ph_right', $base_exam->visual_acuity_distance_ph_right, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-5">
{{ Form::text('visual_acuity_distance_ph_left', $base_exam->visual_acuity_distance_ph_left, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-2 text-center">cc</div>
<div class="col-5">
{{ Form::text('visual_acuity_distance_cc_right', $base_exam->visual_acuity_distance_cc_right, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-5">
{{ Form::text('visual_acuity_distance_cc_left', $base_exam->visual_acuity_distance_cc_left, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<div class="row">
<div class="col-2">Near</div>
<div class="col-10"></div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-2 text-center">sc</div>
<div class="col-5">
{{ Form::text('visual_acuity_near_sc_right', $base_exam->visual_acuity_near_sc_right, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-5">
{{ Form::text('visual_acuity_near_sc_left', $base_exam->visual_acuity_near_sc_left, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<div class="row">
<div class="col-2 text-center">cc</div>
<div class="col-5">
{{ Form::text('visual_acuity_near_cc_right', $base_exam->visual_acuity_near_cc_right, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-5">
{{ Form::text('visual_acuity_near_cc_left', $base_exam->visual_acuity_near_cc_left, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
</td>
</tr>
</tbody>
</table>
Add
<div class="row">
<div class="col-md-12">
{{ Form::text('added_values',$base_exam->added_values, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<br/>
<div class="row">
<div class="col-6 form-group">
<label>Best Vision Right Eye</label>
{{ Form::text('best_right_vision',$base_exam->best_right_vision, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-6 form-group">
<label>Best Vision Left Eye</label>
{{ Form::text('best_left_vision',$base_exam->best_left_vision, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<br/>
</div>
<div class="col-6">
<table class='table table-sm'>
<thead class="thead-light">
<tr>
<th class="text-center">Refraction</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="row">
<div class="col-6">
Autorefractor
</div>
</div>
<br>
<div class="row" style="margin-bottom: 10px">
<div class="col-1"></div>
<div class="col-11">
<div class="row">
<div class="col-4">Sphere</div>
<div class="col-4">Cylinder</div>
<div class="col-4">Axis</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">R</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->manifest_auto_right_sphere ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_auto_right_cylinder ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_auto_right_axis ?? "-" }}
</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">L</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->manifest_auto_left_sphere ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_auto_left_cylinder ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_auto_left_axis ?? "-" }}
</div>
</div>
</div>
</div>
Keratometry
<div class="row" style="margin-bottom: 10px">
<div class="col-1"></div>
<div class="col-11">
<div class="row">
<div class="col-4">K1</div>
<div class="col-4">K2</div>
<div class="col-4">Axis</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">R</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->keratometry_k1_right ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->keratometry_k2_right ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->keratometry_axis_right ?? "-" }}
</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">L</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->keratometry_k1_left ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->keratometry_k2_left ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->keratometry_axis_left ?? "-" }}
</div>
</div>
</div>
</div>
Retinoscope
<div class="row" style="margin-bottom: 10px">
<div class="col-1"></div>
<div class="col-11">
<div class="row">
<div class="col-4">Sphere</div>
<div class="col-4">Cylinder</div>
<div class="col-4">Axis</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">R</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->manifest_ret_right_sphere ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_ret_right_cylinder ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_ret_right_axis ?? "-" }}
</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">L</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->manifest_ret_left_sphere ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_ret_left_cylinder ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->manifest_ret_left_axis ?? "-" }}
</div>
</div>
</div>
</div>
Subjective
<div class="row" style="margin-bottom: 10px">
<div class="col-1"></div>
<div class="col-11">
<div class="row">
<div class="col-4">Sphere</div>
<div class="col-4">Cylinder</div>
<div class="col-4">Axis</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">R</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->subjective_right_sphere ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->subjective_right_cylinder ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->subjective_right_axis ?? "-" }}
</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-1">L</div>
<div class="col-11">
<div class="row">
<div class="col-4">
{{ $base_exam->subjective_left_sphere ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->subjective_left_cylinder ?? "-" }}
</div>
<div class="col-4">
{{ $base_exam->subjective_left_axis ?? "-" }}
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-6 form-group">
<label>PD for Right Eye</label>
{{ Form::text('pd_right_eye', $base_exam->pd_right_eye, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="col-6 form-group">
<label>PD for Left Eye</label>
{{ Form::text('pd_left_eye', $base_exam->pd_left_eye, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<br/>
</div>
</div>
@if (!is_null($base_exam->comment))
<table class="table table-sm table-bordered">
<thead class="thead-light">
<tr><th>{{ __('inpatient.doctor_comments') }} (Base Refraction Exam)</th></tr>
</thead>
<tbody>
<tr><td>{!! nl2br(e($base_exam->comment)) !!}</td></tr>
</tbody>
</table>
@endif
@endif
@if($antenatal_data)
<table class="table table-sm table-bordered">
<thead class="thead-light">
@@ -184,15 +925,6 @@
<tbody>
<tr>
<td>{{ $diagnoses[$primary_diagnosis] ?? "" }}</td>
{{-- <td>
@if (!is_null($antenatal_data->consultation_done_by))
{{ get_full_name($antenatal_data->consultation_done_by, 'id', 'first_name', 'last_name', 'users')}}
@elseif(!is_null($antenatal_data->updated_by))
{{ get_full_name($antenatal_data->updated_by, 'id', 'first_name', 'last_name', 'users')}}
@else
{{ get_full_name($antenatal_data->created_by, 'id', 'first_name', 'last_name', 'users')}}
@endif
</td> --}}
</tr>
@if(is_array($other_diagnoses_array))
@for($i = 0; $i < count($other_diagnoses_array); $i++)
@@ -250,7 +982,6 @@
</tbody>
</table>
@endif
@endif
<div class="row">
@@ -261,6 +992,7 @@
<tr>
<th>{{ __('patient_file.investigation') }}</th>
<th>{{ __('patient_file.result') }}</th>
<th>{{ __('patient_file.normal_ranges') }}</th>
<th>{{ __('patient_file.comment') }}</th>
</tr>
</thead>
@@ -274,10 +1006,11 @@
@if (!empty($opd_investigations['type'][$i]))
<strong><code>See attached</code></strong>
@else
{{ $opd_investigations['value'][$i] }}
@endif
{!! nl2br(e($opd_investigations['value'][$i])) !!}
@endif
</td>
<td>{{ $opd_investigations['comment'][$i] }}</td>
<td>{{ $opd_investigations['normal_ranges'][$i] }}</td>
<td>{!! nl2br(e($opd_investigations['comment'][$i])) !!}</td>
</tr>
@endif
@endfor
@@ -302,7 +1035,7 @@
<tr>
<td>{{ $procedures[$id] ?? "" }}</td>
</tr>
@endforeach
@endforeach
@endforeach
</tbody>
</table>
@@ -379,9 +1112,11 @@
<th>{{ __('patient_file.treatment') }}</th>
<th>{{ __('patient_file.dosage_freq') }}</th>
<th></th>
<th>{{ __('prescriptions.instructions') }}</th>
</tr>
</thead>
<tbody>
@php $progressive_ids = []; @endphp
@foreach($treatments as $treatment)
<?php
$drugs_array = explode(",", $treatment->drugs);
@@ -390,8 +1125,14 @@
$frequencies_array = explode(",", $treatment->frequencies);
$duration_array = explode(",", $treatment->durations);
$quantity_dispensed_array = explode(",", $treatment->quantities_dispensed);
$total_drug_price = 0;
$instructions_array = explode(",", $treatment->instruction);
$purchased_elsewhere_array = explode(",", $treatment->purchased_elsewhere);
// check if treatment is progressive and ignore
if ($treatment->is_treatment_progressive != 0) {
$progressive_ids[] = $treatment->is_treatment_progressive;
continue;
}
?>
@for ($x = 0; $x < count($drugs_array); $x++)
<?php
@@ -411,17 +1152,62 @@
<tr>
<td>
{{ get_name($drugs_array[$x], 'id', 'name', 'drugs') }}
{{ $drug_details->name }}
@if($purchased_elsewhere_array[$x] == 1)
<code>( To Be Purchased elsewhere )</code>
@endif
</td>
<td>
({{ $dosage_array[$x] }} {!! $drug_unit !!} &nbsp;&nbsp; {{ get_name($frequencies_array[$x], 'id', 'name', 'dosage_frequencies') }})
</td>
<td>
{{ $duration_array[$x] }}
</td>
<td>{{ $duration_array[$x] ?? "" }}</td>
<td>{{ $instructions_array[$x] ?? "" }}</td>
</tr>
@endfor
@endforeach
@if(count($progressive_ids) > 0)
@php
$progressive_treatments = \Illuminate\Support\Facades\DB::table('treatments_opd_progressive')->whereIn('id', $progressive_ids)->get();
@endphp
@foreach($progressive_treatments as $treatment)
<?php
$drugs_array = explode(",", $treatment->drugs);
$dosage_array = explode(",", $treatment->dose);
$frequencies_array = explode(",", $treatment->drug_frequency);
$duration_array = explode(",", $treatment->durations);
$quantity_dispensed_array = explode(",", $treatment->quantities_to_dispense);
$instructions_array = explode(",", $treatment->instruction);
?>
@for ($x = 0; $x < count($drugs_array); $x++)
<?php
$drug_details = \Streamline\Models\Drug::find($drugs_array[$x]);
if (!$drug_details) {
continue;
}
$drug_form_name = get_name($drug_details->form_id, "id", "name", "unit_of_measure");
$drug_unit = get_name($drug_details->unit_id, "id", "name", "drug_units");
$drug_strength = $drug_details->strength;
$treatment_dosage = $dosage_array[$x] ?? "";
$treatment_strength = $drug_strength ?? "";
?>
<tr>
<td>{{ $drug_details->name }}</td>
<td>
({{ $dosage_array[$x] }} {!! $drug_unit !!} &nbsp;&nbsp; {{ get_name($frequencies_array[$x], 'id', 'name', 'dosage_frequencies') }})
</td>
<td>{{ $duration_array[$x] ?? "" }}</td>
<td>{{ $instructions_array[$x] ?? "" }}</td>
</tr>
@endfor
@endforeach
@endif
</tbody>
</table>
</div>
@@ -432,11 +1218,11 @@
<tbody>
<tr>
<td style="text-align: center">
<img style="max-width: 300px; max-height: 150px;" src="{{ asset($hospitalInfo->stamp) }}" class="img-fluid mx-auto d-block mx-3" alt="{{ $hospitalInfo->name}} stamp">
<img style="max-width: 300px; max-height: 150px;" src="{{ public_path($hospitalInfo->stamp) }}" class="img-fluid mx-auto d-block mx-3" alt="{{ $hospitalInfo->name}} stamp">
</td>
</tr>
</tr>
</tbody>
</table>
</table>
@endif
</div>
</body>
File diff suppressed because it is too large Load Diff
@@ -48,7 +48,7 @@
<div class="col-md-2">
<div class="form-group" id="searchby">
{{ Form::label('search_by', __('patient_flow_monitoring.date')) }}
{{ Form::select('search_by', ['4'=>'Today', '0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
{{ Form::select('search_by', ['4'=>'Today', '0'=>'Yesterday','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
@@ -143,12 +143,12 @@
@php
$counter++;
$patient = \DB::table('patients')->where('id', $episode->patient_id)->first();
//$triage = \DB::table('triage')->where('episode_id', $episode->id)->first();
//$consultation = \DB::table('consultations')->where('episode_id', $episode->id)->first();
$investigation_results = \DB::table('investigation_results')->where('episode_id', $episode->id)->first();
$investigation_orders = \DB::table('ordered_investigations')->where('episode_id', $episode->id)->first();
$treatment_details = \DB::table('treatments')->where('episode_id', $episode->id)->orderBy('created_at', 'desc')->first();
$patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $episode->patient_id)->first();
$investigation_results = \Illuminate\Support\Facades\DB::table('investigation_results')->where('episode_id', $episode->id)->first();
$investigation_orders = \Illuminate\Support\Facades\DB::table('ordered_investigations')->where('episode_id', $episode->id)->first();
$treatment_details = \Illuminate\Support\Facades\DB::table('treatments')->where('episode_id', $episode->id)->orderBy('created_at', 'desc')->first();
$main_exam = \Illuminate\Support\Facades\DB::table('eye_clinic_main_exam')->where('episode_id', $episode->id)->first();
$is_patient_in_eye_clinic = is_patient_in_eye_clinic($episode->id);
@endphp
@if($episode->paid_over == "pos")
@@ -218,13 +218,13 @@
@elseif (in_array("1", $per_inv_explode) && in_array("0", $per_inv_explode))
<span style = "color: #33CC33; font-weight: bold;">{{ __('patient_flow_monitoring.some_results_available') }}<span>
@elseif (array_unique($per_inv_explode) == array("0"))
<span style = "color: #99CC00; font-weight: bold;">{{ __('patient_flow_monitoring.ordered') }}</span>
<span style = "color: #99CC00; font-weight: bold;">{{ __('patient_flow_monitoring.ordered') }}</span>
@endif
@elseif(isset($investigation_orders))
<span style="color: #99CC00">{{ __('patient_flow_monitoring.ordered') }}</span>
@else
N/A
@endif
@elseif(isset($investigation_orders))
<span style="color: #99CC00">{{ __('patient_flow_monitoring.ordered') }}</span>
@else
N/A
@endif
</td>
<td>
<span class="label label-info">{{ __('patient_flow_monitoring.lab_self_request') }}</span>
@@ -268,10 +268,30 @@
@endif
</td>
<td>
@if (!$episode->episode_triage_id)
N/A
@if($is_patient_in_eye_clinic)
@php $base_refraction = \Illuminate\Support\Facades\DB::table('eye_clinic_base_exam_refraction')->where('episode_id', $episode->id)->first() @endphp
@if($base_refraction)
Base Exam Completed By {{ get_full_name($base_refraction->created_by, 'id', 'first_name', 'last_name', 'users') }}
@else
<span style="background-color: #FFFF00; color: black" class="label">Pending Base Exam</span>
@endif
<hr>
@if (is_null($episode->consultation_id))
<span style="background-color: red" class="label">Pending Main Exam</span>
@elseif (!is_null($episode->consultation_id) && get_name($episode->consultation_id, 'id', 'completed', 'eye_clinic_main_exam') == 0)
<span style="background-color: #FFFF00; color: black" class="label">Ongoing Main Exam</span>
@else
Main Exam Outcome: {{ $main_exam ? get_name($main_exam->outcome_id, 'id', 'name', 'outcomes') : "N/A" }}
@endif
@else
{!! severe_grade($episode->severe_grade) !!}
@if (!$episode->episode_triage_id)
N/A
@else
{!! severe_grade($episode->severe_grade) !!}
@endif
@endif
</td>
<td>
@@ -294,11 +314,37 @@
@endif
</td>
<td>
@php
$primary_diagnosis_id = empty($episode->consultation_id)? $episode->antenatal_primary_diagnosis :get_name($episode->consultation_id, 'id', 'primary_diagnosis', 'consultations');
@endphp
@if($can_user_view_diagnosis)
{{ get_name($primary_diagnosis_id, "id", "name", "diagnoses") }}
@if($is_patient_in_eye_clinic)
@php
$right_eye_diagnoses = explode(',',get_name($episode->consultation_id, 'id', 'right_eye_diagnosis', 'eye_clinic_main_exam'));
$left_eye_diagnoses = explode(',',get_name($episode->consultation_id, 'id', 'left_eye_diagnosis', 'eye_clinic_main_exam'));
@endphp
@if(count($right_eye_diagnoses) > 0)
<h5>Right Eye Diagnosis</h5>
<ul>
@for($x = 0; $x < count($right_eye_diagnoses); $x++)
<li>{{ get_name(get_name($right_eye_diagnoses[$x], 'id', 'diagnosis_category', 'diagnoses'), 'id', 'name', 'diagnosis_categories') }} - {{ $diagnoses[$right_eye_diagnoses[$x]] ?? '' }}</li>
@endfor
</ul>
@endif
@if(count($left_eye_diagnoses) > 0)
<h5>Left Eye Diagnosis</h5>
<ul>
@for($x = 0; $x < count($left_eye_diagnoses); $x++)
<li>{{ get_name(get_name($left_eye_diagnoses[$x], 'id', 'diagnosis_category', 'diagnoses'), 'id', 'name', 'diagnosis_categories') }} - {{ $diagnoses[$left_eye_diagnoses[$x]] ?? '' }}</li>
@endfor
</ul>
@endif
@else
@php
$primary_diagnosis_id = empty($episode->consultation_id)? $episode->antenatal_primary_diagnosis :get_name($episode->consultation_id, 'id', 'primary_diagnosis', 'consultations');
@endphp
@if($can_user_view_diagnosis)
{{ get_name($primary_diagnosis_id, "id", "name", "diagnoses") }}
@endif
@endif
</td>
<td>
@@ -310,32 +356,33 @@
@elseif (in_array("1", $per_inv_explode) && in_array("0", $per_inv_explode))
<span style = "color: #33CC33; font-weight: bold;">{{ __('patient_flow_monitoring.some_results_available') }}<span>
@elseif (array_unique($per_inv_explode) == array("0"))
<span style = "color: #99CC00; font-weight: bold;">{{ __('patient_flow_monitoring.ordered') }}</span>
@endif
@elseif(isset($investigation_orders))
<span style="color: #99CC00">{{ __('patient_flow_monitoring.ordered') }}</span>
@else
N/A
@endif
<span style = "color: #99CC00; font-weight: bold;">{{ __('patient_flow_monitoring.ordered') }}</span>
@endif
@elseif(isset($investigation_orders))
<span style="color: #99CC00">{{ __('patient_flow_monitoring.ordered') }}</span>
@else
N/A
@endif
</td>
<td>
<td>
@php $outcome = "N/A"; @endphp
@if($episode->consultation_id || $episode->antenatal_outcome_id)
@if(!is_null($episode->consultation_done_by))
@if($main_exam)
{{ get_full_name($main_exam->created_by, 'id', 'first_name', 'last_name', 'users') }}
@elseif(!is_null($episode->consultation_done_by) && empty($episode->antenatal_outcome_id))
{{ get_full_name($episode->consultation_done_by, "id", "first_name", "last_name","users") }}
@else
@php
$outcome_id = !empty($episode->antenatal_outcome_id)? $episode->antenatal_outcome_id:$episode->outcome_id;
$created_by = !empty($episode->consultation_created_by)? $episode->consultation_created_by:$episode->antenatal_created_by;
$updated_by = !empty($episode->consultation_updated_by)? $episode->consultation_updated_by:$episode->antenatal_updated_by;
$outcome = get_name($outcome_id, 'id', 'name', 'outcomes'); @endphp
@php
$outcome_id = !empty($episode->antenatal_outcome_id)? $episode->antenatal_outcome_id:$episode->outcome_id;
$created_by = !empty($episode->consultation_created_by)? $episode->consultation_created_by:$episode->antenatal_created_by;
$updated_by = !empty($episode->consultation_updated_by)? $episode->consultation_updated_by:$episode->antenatal_updated_by;
$outcome = get_name($outcome_id, 'id', 'name', 'outcomes'); @endphp
@if(is_null($updated_by))
{{ get_full_name($created_by, "id", "first_name", "last_name","users") }}
{{ get_full_name($created_by, "id", "first_name", "last_name","users") }}
@else
{{ get_full_name($updated_by, "id", "first_name", "last_name", "users") }}
@endif
@endif
@else
@php $outcome = "N/A"; @endphp
@endif
</td>
<td>
@@ -354,15 +401,19 @@
<span style="background-color: #FFFF00; color: black" class="label">Ongoing Consultation (ANC)</span> --}}
@if (is_null($episode->consultation_id) && empty($episode->antenatal_primary_diagnosis))
<span style="background-color: red" class="label">{{ __('patient_flow_monitoring.pending_consultation') }}</span>
@elseif($episode->consultation_id)
@elseif($episode->consultation_id && empty($episode->antenatal_primary_diagnosis))
@if(!is_null($episode->consultation_done_by) && is_null($episode->primary_diagnosis))
<span style="background-color: red" class="label">{{ __('patient_flow_monitoring.pending_consultation') }}</span>
@elseif($episode->completed == 0)
<span style="background-color: #FFFF00; color: black" class="label">{{ __('patient_flow_monitoring.ongoing_consultation') }}</span>
@if($main_exam)
{{ get_name($main_exam->outcome_id, 'id', 'name', 'outcomes') }}
@else
<span style="background-color: #FFFF00; color: black" class="label">{{ __('patient_flow_monitoring.ongoing_consultation') }}</span>
@endif
@else
{{ get_name($episode->outcome_id, 'id', 'name', 'outcomes') }}
@endif
@elseif (!is_null($episode->consultation_id) && get_name($episode->consultation_id, 'id', 'completed', 'consultations') == 0)
@elseif (!is_null($episode->consultation_id) && get_name($episode->consultation_id, 'id', 'completed', 'consultations') == 0 && empty($episode->antenatal_primary_diagnosis))
<span style="background-color: #FFFF00; color: black" class="label">{{ __('patient_flow_monitoring.ongoing_consultation') }}</span>
@else
{{ $outcome }}
@@ -370,7 +421,7 @@
</td>
<td>
@if(is_object($patient) && is_null($patient->deleted_at))
<input type="radio" onchange="show({{ $episode->id }})" class="radio-option centered" name="episode_id" value="{{ $episode->id }}" />
<input type="radio" onchange="show({{ $episode->id }}), manage_eye_menus('{{ $is_patient_in_eye_clinic }}')" class="radio-option centered" name="episode_id" value="{{ $episode->id }}" />
@else
<b style="color: red">Patient was deleted</b>
@endif
@@ -383,14 +434,18 @@
<div class="white-box" id="menu1" style="display: none;">
<div class="row">
<div class="col-sm-2">
@if(Auth::user()->can('perform-triage'))
<button type="submit" name="triage" class="btn btn-success btn-sm col-sm-12" value="triage" id="triage">{{ __('patient_flow_monitoring.triage') }}</button>
<button type="submit" name="base_refraction_exam" class="btn btn-success btn-sm col-sm-12 eye_button" value="base_refraction_exam" id="base_refraction_exam">Base Refraction Exam</button>
@if(Auth::user()->can('perform-triage') && !is_add_attendance_to_consultation_enabled())
<button type="submit" name="triage" class="btn btn-success btn-sm col-sm-12 normal_button" value="triage" id="triage">{{ __('patient_flow_monitoring.triage') }}</button>
@endif
</div>
&nbsp;
<div class="col-sm-2">
<button type="submit" name="main_exam" class="btn btn-success btn-sm col-sm-12 eye_button" value="main_exam" id="main_exam">Main Exam</button>
@if(Auth::user()->can('create-consultation'))
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="consultation" id="consultation">{{ __('patient_flow_monitoring.consultation') }}</button>
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12 normal_button" value="consultation" id="consultation">{{ __('patient_flow_monitoring.consultation') }}</button>
@endif
</div>
<div class="col-sm-2">
@@ -465,14 +520,18 @@
<div class="white-box" id="menu2" style="display: none;">
<div class="row">
<div class="col-sm-2">
@if(Auth::user()->can('perform-triage'))
<button type="submit" name="triage" class="btn btn-success btn-sm col-sm-12" value="triage" id="triage">{{ __('patient_flow_monitoring.triage') }}</button>
<button type="submit" name="base_refraction_exam" class="btn btn-success btn-sm col-sm-12 eye_button" value="base_refraction_exam" id="base_refraction_exam">Base Refraction Exam</button>
@if(Auth::user()->can('perform-triage') && !is_add_attendance_to_consultation_enabled())
<button type="submit" name="triage" class="btn btn-success btn-sm col-sm-12 normal_button" value="triage" id="triage">{{ __('patient_flow_monitoring.triage') }}</button>
@endif
</div>
&nbsp;
<div class="col-sm-2">
<button type="submit" name="main_exam" class="btn btn-success btn-sm col-sm-12 eye_button" value="main_exam" id="main_exam">Main Exam</button>
@if(Auth::user()->can('create-consultation'))
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="consultation" id="consultation">{{ __('patient_flow_monitoring.consultation') }}</button>
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12 normal_button" value="consultation" id="consultation">{{ __('patient_flow_monitoring.consultation') }}</button>
@endif
</div>
<div class="col-sm-2">
@@ -548,7 +607,7 @@
<div class="modal-body">
{{ Form::open(['route' => 'patient_flow_monitoring.inpatient_admission']) }}
{{ Form::hidden('admission_episode_id', 0, ['id' => 'admission_episode_id']) }}
{{ Form::label('admission_ward_id', __('layout.select_ward')) }}
{{ Form::select('admission_ward_id', $wards, '', ['class' => 'form-control', 'required' => 'true']) }}
<br>
@@ -583,7 +642,7 @@
{{ Form::hidden('current_patient_id', 0, ['id' => 'current_patient_id']) }}
{{ Form::text('current_clinic', '', ['class' => 'form-control compulsory', 'readonly', 'id' => 'current_clinic_transfer']) }}
</div>
<div class="form-group">
{{ Form::label('transfer_to', __('patient_episode.transfer_to')) }}
{{ Form::select('transfer_to', $clinics, null, ['class' => 'form-control compulsory', 'required', 'id' => 'transfer_to']) }}
@@ -668,7 +727,8 @@
}
});
$('#triage,#consultation,#create_anaesthetics,#anaesthetics_history,#create_surgery,#surgery_index,#treatment,#investigation,#anc_registration_button,#anc_followup_button,#view_patient_history,#consultation_with_notes,#triage_without_etat').click(function() {
$('#triage,#consultation,#create_anaesthetics,#anaesthetics_history,#create_surgery,#surgery_index,#treatment,#investigation,#anc_registration_button,' +
'#anc_followup_button,#view_patient_history,#consultation_with_notes,#triage_without_etat,#main_exam,#base_refraction_exam').click(function() {
event.preventDefault();
let options = document.getElementsByName('episode_id');
let episodeId = 0;
@@ -751,5 +811,15 @@
});
}
});
function manage_eye_menus(is_patient_in_eye_clinic) {
if(is_patient_in_eye_clinic == 1) {
$('.eye_button').show();
$('.normal_button').hide();
} else {
$('.eye_button').hide();
$('.normal_button').show();
}
}
</script>
@endpush
@@ -187,16 +187,39 @@
</div>
<div id="ugandan_regions">
<div id="ugandan_regions">
<div class="form-group">
{{ Form::label('residence','Residence') }}
<select class="form-control col-md-12" name="residence" id="residence" style="display: block; width: 100%" required></select>
<div class="help-block with-errors"></div>
<a href="#modal_residence" data-toggle="modal" id="modal_residence_link"><font size="1">{{ __('patients.add_new_residence') }} </font></a>
</div>
<div class="form-group">
{{ Form::label('residence','Residence') }}
<select class="form-control col-md-12" name="residence" id="residence" style="display: block; width: 100%" required></select>
<div class="help-block with-errors"></div>
<a href="#modal_residence" data-toggle="modal" id="modal_residence_link"><font size="1">{{ __('patients.add_new_residence') }} </font></a>
</div>
</div>
@if (!empty($patient_registration_fields))
@foreach ($patient_registration_fields as $patient_registration_field)
<input type="hidden" name="registration_field_names[]" id="reg_field_{{$patient_registration_field->id}}" value="reg_field_{{$patient_registration_field->id}}"/>
@if (!empty($patient_registration_field->options))
<div class="form-group">
{{ Form::label($patient_registration_field->name, $patient_registration_field->name) }}
<select name="registration_field_values[]" id="{{$patient_registration_field->name}}" class="col-sm-12 {{ ($patient_registration_field->compulsory == 1)? 'compulsory':'' }} form-control" {{ ($patient_registration_field->compulsory == 1)? 'required':'' }}>
<option value="">--select--</option>
@php
$options = explode(',',$patient_registration_field->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
</div>
@else
<div class="form-group">
{{ Form::label($patient_registration_field->name, $patient_registration_field->name) }}
<input type="text" name="registration_field_values[]" class="col-sm-12 {{ ($patient_registration_field->compulsory == 1)? 'compulsory':'' }} form-control" {{ ($patient_registration_field->compulsory == 1)? 'required':'' }}>
</div>
@endif
@endforeach
@endif
@if(is_fingerprint_enabled())
<div>
{{ Form::label('fingerprint_template',__('patients.patient_fingerprint')) }}
@@ -720,10 +743,12 @@
if (citizenship == 0) {
$("#not_ugandan_regions").show();
$("#ugandan_regions").hide();
$('#residence').prop('required', false);
} else {
$("#not_ugandan_regions").hide();
$("#ugandan_regions").show();
$("#country_id").val('');
$('#residence').prop('required', true);
}
});
@@ -88,7 +88,7 @@
<div class="help-block with-errors"></div>
</div>
{{ Form::button(__('patients.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'disabled', 'id' => 'submit_button']) }}
{{ Form::button(__('patients.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id' => 'submit_button']) }}
{{ Form::button(__('patients.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
File diff suppressed because it is too large Load Diff
@@ -31,17 +31,12 @@
</div>
</div>
{{-- <div class="col-md-2">
<div class="form-group" id="first_names">
{{ Form::text('first_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'First name', 'autocomplete' => 'off', 'spellcheck' => false]) }}
<div class="col-md-2" @if(!is_eye_module_enabled()) style='display: none' @endif>
<div class="form-group" id="previous_numbers">
{{ Form::text('previous_id', '', ['class' => 'form-control typeahead', 'placeholder' => 'Previous Number', 'autocomplete' => 'off', 'spellcheck' => false]) }}
</div>
</div>
<div class="col-md-2">
<div class="form-group" id="last_names">
{{ Form::text('last_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'Last name', 'autocomplete' => 'off', 'spellcheck' => false]) }}
</div>
</div> --}}
<div class="col-md-4">
<div class="form-group" id="full_names">
{{ Form::text('full_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'Patient Name', 'autocomplete' => 'off', 'spellcheck' => false]) }}
@@ -54,7 +49,7 @@
</div>
</div>
<div class="col-md-4">
<div class="col-md-2">
<button type="submit" class="btn btn-rounded btn-success"><span class="glyphicon glyphicon-search"></span> {{ __('patients.search') }}</button>
<span class="label label-info float-right" style="font-size: 12.5px;"> {{ $patientCount }} {{ __('patients.patients_registered') }}</span>
</div>
@@ -170,6 +165,18 @@ $('#patient_numbers .typeahead').typeahead(
}
);
$('#previous_numbers .typeahead').typeahead(
{
hint: true,
highlight: true,
minLength: 1
},
{
name: 'previous_numbers',
source: substringMatcher(<?php echo json_encode($previous_ids); ?>)
}
);
$('#first_names .typeahead').typeahead(
{
hint: true,
@@ -80,7 +80,7 @@
</tr>
<tr>
<th><font color="black">{{ __('patients.occupation') }}</font></th>
<td>{{ isset($occupations[$patient->occupation_id]) ? $occupations[$patient->occupation_id] : '' }}</td>
<td>{{ get_name($patient->occupation_id, 'id', 'name', 'occupations') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.insurance') }}</font></th>
@@ -88,7 +88,7 @@
</tr>
<tr>
<th><font color="black">{{ __('patients.religion') }}</font></th>
<td>{{ isset($religions[$patient->religion_id]) ? $religions[$patient->religion_id] : '' }}</td>
<td>{{ get_name($patient->religion_id, 'id', 'name', 'religions') }}</td>
</tr>
<tr>
<th><font color="black">{{__('patients.next_of_kin')}}</font></th>
@@ -96,7 +96,7 @@
</tr>
<tr>
<th><font color="black">{{ __('patients.next_of_kin_relationship') }}</font></th>
<td>{{ isset($relationships[$patient->next_of_kin_relationship]) ? $relationships[$patient->next_of_kin_relationship] : '' }}</td>
<td>{{ get_name($patient->next_of_kin_relationship, 'id', 'name', 'family_relations') }}</td>
</tr>
<tr>
<th><font color="black">{{__('patients.phone_of_next_of_kin')}}</font></th>
@@ -109,24 +109,38 @@
<table class="table-bordered table-condensed table-striped">
<tr>
<th><font color="black">{{ __('patients.district') }}</font></th>
<td>{{ isset($districts[$patient->district_id]) ? $districts[$patient->district_id] : '' }}</td>
<td>{{ get_name($patient->district_id, 'id', 'name', 'districts') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.county') }}</font></th>
<td>{{ isset($counties[$patient->county_id]) ? $counties[$patient->county_id] : '' }}</td>
<td>{{ get_name($patient->county_id, 'id', 'name', 'counties') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.sub_county') }}</font></th>
<td>{{ isset($subcounties[$patient->subcounty_id]) ? $subcounties[$patient->subcounty_id] : '' }}</td>
<td>{{ get_name($patient->subcounty_id, 'id', 'name', 'subcounties') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.parish') }}</font></th>
<td>{{ isset($parishes[$patient->parish_id]) ? $parishes[$patient->parish_id] : '' }}</td>
<td>{{ get_name($patient->parish_id, 'id', 'name', 'parishes') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.village') }}</font></th>
<td>{{ isset($villages[$patient->village_id]) ? $villages[$patient->village_id] : '' }}</td>
<td>{{ get_name($patient->village_id, 'id', 'name', 'villages') }}</td>
</tr>
<tr>
<th><font color="black">Referred From</font></th>
<td>{{ $patient->referred_from }}</td>
</tr>
@php $registration_fields = !empty($patient->registration_fields)? json_decode($patient->registration_fields, true):[]; @endphp
@foreach ($registration_fields as $key => $registration_field)
@php $keys = explode("_",$key) @endphp
@if (!empty($keys[2]))
<tr>
<th><font color="black">{{ get_name($keys[2], 'id', 'name', 'patient_registration_fields') }}</font></th>
<td>{{ $registration_field }}</td>
</tr>
@endif
@endforeach
</table>
</div>
@@ -263,7 +263,7 @@
@php
if(isset($allergies['names'])){
$allergies_explode = explode(",", $allergies['names']);
$allergy_check = \Streamline\Http\Controllers\PrescriptionsController::checkPatientAllergies($allergies_explode, $prescription->drug_category);
$allergy_check = \Modules\Pharmacy\Http\Controllers\PrescriptionsController::checkPatientAllergies($allergies_explode, $prescription->drug_category);
}
@endphp
<tr id="my_row{{ $prescription->id }}" class="to_remove">
@@ -401,7 +401,7 @@
@php
if(isset($allergies['names'])){
$allergies_explode = explode(",", $allergies['names']);
$allergy_check = \Streamline\Http\Controllers\PrescriptionsController::checkPatientAllergies($allergies_explode, $prescription->drug_category);
$allergy_check = \Modules\Pharmacy\Http\Controllers\PrescriptionsController::checkPatientAllergies($allergies_explode, $prescription->drug_category);
}
@endphp
<tr id="my_row{{ $prescription->id }}" class="to_remove">
@@ -61,14 +61,15 @@
<p style="text-align: center; font-size: 1em">
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
<span class="receipt-label"><b>{{ __('point_of_sale.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.dispensed_by') }}:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.record_date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.print_date') }}:</b> {{ streamline_date_time_short($receipt_reprint_date) }}</span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.patient_name') }}</b> : {{ $patient->first_name }} {{ $patient->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.patient_number') }}</b> : {{ $patient->number }} </span><br>
<span class="receipt-label"><b>{{ __('point_of_sale.patient_category') }} :</b> {{ get_name($patient->category_id, "id", "name", "patient_categories") }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.cashier') }}:</b> {{ get_full_name($cashier, 'id', 'first_name', 'last_name', 'users') }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.original_print_date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.reprint_date') }}:</b> {{ streamline_date_time_short(date('Y-m-d H:i:s')) }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.receipt_number') }}:</b> {{ $receipt_number }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.patient_name') }}</b> : {{ $patient->first_name }} {{ $patient->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('patient_finance.patient_number') }}</b> : {{ $patient->number }} </span><br>
<span class="receipt-label"><b>{{ __('patient_finance.category') }} :</b> {{ get_name($patient->category_id, "id", "name", "patient_categories") }}</span>
</p>
<div>
@@ -166,6 +167,20 @@
@endfor
@endif
@if(isset($optic_item) && count($optic_item) > 0)
<tr>
<td colspan="3" class="text-center"><b>Optical Items</b></td>
</tr>
@for($i = 0; $i < count($optic_item); $i++)
<tr>
<td>{{ get_name($optic_item[$i], "id", "name", "eye_glasses") }}</td>
<td>{{ $optic_quantity[$i] }}</td>
<td>{{ ugandan_shillings($optic_subtotal[$i]) }}</td>
@php $total_amount_pay += $optic_subtotal[$i]; @endphp
</tr>
@endfor
@endif
<tr>
<td colspan="3"></td>
</tr>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,607 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<style>
.triage-grade li {
display: inline-block;
}
.same_width {
width: 100%;
table-layout: fixed;
}
.wrapper {
border: 1px solid #00c292;
border-radius: 6px;
padding: 20px;
margin-bottom: 20px;
}
</style>
@endpush
@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.edit_triage') }}</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">
@include('patients::allergies.header')
<br>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box br-5" style="padding-top: 5px;">
<h5 class="page-title"><strong>{{ __('triage.triage') }} ({{ $age_group_display }})
{{ __('triage.for_episode') }} : <font color="blue">
{{ streamline_date(get_name($episode_id, 'id', 'created_at', 'patient_episodes')) }}</font>
</strong></h5>
<hr>
{{ 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 = '<div class="alert alert-warning "> <button type="button" class="close" data-dismiss="alert">×</button>' . __('triage.sick_children_warning') . '</div>';
$alert2 = '<div class="alert alert-warning "> <button type="button" class="close" data-dismiss="alert">×</button>' . __('triage.poison_warning') . '</div>';
$symptoms_array = [];
@endphp
@php
$option_symptoms = '';
$option_symptoms_periods = '';
$symptom_counter = 1;
@endphp
@if (!are_symptoms_on_consultation())
<div class="table-responsive">
<table class="table table-hover color-table success-table table-bordered" id="symptom_table">
<thead>
<tr>
<th class="text-center">{{ __('triage.symptoms') }} <a data-toggle="modal"
data-target="#symptomsmodal"
class="label labelRight label-info pull-right">{{ __('triage.add_new') }}</a>
</th>
<th class="text-center">{{ __('triage.duration') }}</th>
<th class="text-center">{{ __('triage.prompt') }}</th>
<th class="text-center">{{ __('triage.reference_text') }}</th>
<th></th>
</tr>
</thead>
<tbody class='symptoms_input_fields_wrap'>
@php
$symptoms_array = explode(',', $triage->symptoms);
$symptoms_duration_array = explode(',', $triage->symptom_duration);
foreach ($symptoms as $key => $value) {
$option_symptoms .= "<option value='$key'>" . str_replace('"', '', $value) . '</option>';
}
foreach ($symptoms_periods as $key => $value){
$option_symptoms_periods .= "<option value='$key'>$value</option>";
}
@endphp
@if(empty($symptoms_array) || count($symptoms_array) != count($symptoms_duration_array))
<tr>
<td style='width: 20%;'>
<select name='symptoms[]' id='symptoms_0' class='form-control col-sm-12 compulsory' onchange='showPrompt(this.value, 0)' required>@php echo $option_symptoms; @endphp</select>
</td>
<td style='width: 21%'>
<div class='row'>
<div class='col-sm-3'>
<input type='text' style='display: block;' name='duration[]' id='symptoms_duration_0' class='col-sm-12 form-control' required>
</div>
<div class='col-sm-9'>
<select style='display: inline-block;' name='time[]' id='symptoms_time_0' class='col-sm-12 form-control' required>@php echo $option_symptoms_periods; @endphp</select>
</div>
</div>
</td>
<td id='symptoms_prompt_0' style='width: 30%'></td>
<td id='symptoms_reference_0'></td>
<td style='width: 1%;'></td>
</tr>
@else
@for($i = 0; $i < count($symptoms_array); $i++)
@php
$duration_array = explode(" ", $symptoms_duration_array[$i]);
@endphp
<tr>
<td style='width: 20%;'>
<select name='symptoms[]' id='symptoms_0'
class='form-control col-sm-12 compulsory'
onchange='showPrompt(this.value, 0)' required>@php echo $option_symptoms; @endphp</select>
</td>
<td style='width: 21%'>
<div class='row'>
<div class='col-sm-3'>
<input type='text' style='display: block;' name='duration[]'
id='symptoms_duration_0' class='col-sm-12 form-control h-100'>
</div>
<div class='col-sm-9'>
<select style='display: inline-block;' name='time[]'
id='symptoms_time_0'
class='col-sm-12 form-control select2-hidden-accessible'>@php echo $option_symptoms_periods; @endphp</select>
</div>
</div>
</td>
<td id='symptoms_prompt_0' style='width: 30%'></td>
<td id='symptoms_reference_0'></td>
<td style='width: 1%;'></td>
</tr>
@else
@for ($i = 0; $i < count($symptoms_array); $i++)
@php
$duration_array = explode(' ', $symptoms_duration_array[$i]);
@endphp
<tr>
<td style="width: 20%;">
{{ 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 . ')']) }}
</td>
<td style="width: 21%">
<div class="row m-0 d-flex justify-content-between align-items-stretch">
<div class="col-sm-3 p-0">
<input type="text" style="display: block;" name="duration[]"
id="duration[]" class="col-sm-12 form-control h-100"
value="{{ $duration_array[0] }}">
</div>
<div class="col-sm-9 p-0">
<select style="display: inline-block;" name="time[]" id="time[]"
class="w-100 form-control select-2 h-100">
<option value="{{ $duration_array[1] }}" selected>
{{ $duration_array[1] }}</option>
<option value="<?php echo __('triage.hours'); ?>">{{ __('triage.hours') }}
</option>
<option value="<?php echo __('triage.days'); ?>">{{ __('triage.days') }}
</option>
<option value="<?php echo __('triage.weeks'); ?>">{{ __('triage.weeks') }}
</option>
<option value="<?php echo __('triage.months'); ?>">{{ __('triage.months') }}
</option>
<option value="<?php echo __('triage.years'); ?>">{{ __('triage.years') }}
</option>
</select>
</div>
</div>
</td>
<td id="symptoms_prompt_{{ $i }}" style="width: 30%"></td>
<td id="symptoms_reference_{{ $i }}"></td>
<td style="width: 1%;"></td>
</tr>
@endfor
@endif
</tbody>
</table>
<a class="btn btn-success btn-xs" onclick="add_symptom_row()"
id="add_row">{{ __('triage.add_row') }}</a>
<hr>
</div>
@endif
@if (is_tuberculosis_screening_enabled())
@include('patients::triage.edit.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
<div class="row">
<div class="col-md-8">
<div class="table-responsive">
<table class="table table-hover table-striped color-table success-table table-bordered"
id="observations_table">
<thead>
<tr>
<th>{{ __('triage.observation') }}</th>
<th>{{ __('triage.value') }}</th>
<th>{{ __('triage.normal_range') }}</th>
@if ($age_group == 5)
<th>KEWS</th>
<th>NEWS</th>
@else
<th>KEWS</th>
@endif
</tr>
</thead>
<tbody>
@include('patients::triage.edit.observations_changed')
</tbody>
</table>
</div>
@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
</div>
<div class="col-md-4">
@if ($age_group == 1 || $age_group == 2)
<?php echo $alert2; ?>
<?php echo $alert1; ?>
@else
<?php echo $alert2; ?>
@endif
<br>
@if (!is_add_attendance_to_consultation_enabled())
<div class="table-responsive">
<table class="table table-hover color-table success-table table-bordered">
<thead>
<tr>
<th colspan="2" class="text-center">
{{ __('triage.patient_attendance') }}
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<font color="#C85F6A" class="text-center">{{ __('triage.re_attendance_or_new') }}</font>
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="new_attendance" id="new_attendance" @if(!empty($triage->new_attendance)) checked @endif/> {{ __('triage.new_attendance') }}
</td>
<td>
<input type="checkbox" name="re_attendance" id="re_attendance" @if(!empty($triage->re_attendance)) checked @endif/> {{ __('triage.re_attendance') }}
</td>
</tr>
</tbody>
</table>
</div>
@endif
@if (between($years, 0, 12))
@include('patients::triage.edit.priority_signs')
@endif
<div style="background: #F5F5F5; padding: 10px;">
<h4 class="text-center">{{ __('triage.triage_grade') }}</h4>
<hr>
<div class="row text-center">
<div class="col-md-4 br">
{{ Form::radio('triage_grade', 1, $triage->severe_grade == 1, ['required', 'id' => 'triage_grade_green']) }}
<b style="color: #006400; font-weight: 900; font-size: 18;">{{ __('triage.green') }}
</b>
</div>
<div class="col-md-4">
{{ Form::radio('triage_grade', 2, $triage->severe_grade == 2, ['required', 'id' => 'triage_grade_yellow']) }}
<b style="color: #FFC40C; font-weight: 900; font-size: 18; ">{{ __('triage.yellow') }}
</b>
</div>
<div class="col-md-4">
{{ Form::radio('triage_grade', 3, $triage->severe_grade == 3, ['required', 'id' => 'triage_grade_red']) }}
<b style="color: #FF4500; font-weight: 900; font-size: 18;">{{ __('triage.red') }}</b>
</div>
</div>
</div>
<h4 style="background: #F5F5F5; padding: 10px;">{{ __('triage.referral_clinic_allocation') }}</h4>
<div class="form-group">
{{ Form::label('referral_hospital', __('triage.referred_by')) }}
{{ Form::select('referral_hospital', $referral_hospitals, $triage->referral, ['class' => 'form-control compulsory', 'required', 'id' => 'referral_hospital']) }}
<a class="pull-right" style="font-size: x-small" data-toggle="modal"
data-target="#referralsmodal">{{ __('triage.add_new') }}</a>
</div>
<div class="form-group">
{{ 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
</div>
<h4 style="background: #F5F5F5; padding: 10px;">{{ __('triage.comment') }}</h4>
<textarea name='comment' id="comment" class="col-sm-12" placeholder="<?php echo __('triage.type_comments_here'); ?>">{{ $triage->comments }}</textarea>
<br><br>
{{ Form::button(__('triage.submit_triage'), ['type' => 'submit', 'class' => 'btn btn-success col-sm-12', 'id' => 'submit_triage']) }}
<br><br>
{{ __('triage.triage_done_by') }} : <span
style="color: green; font-weight: bold;">{{ ucwords(Auth::user()->first_name) . ' ' . ucwords(Auth::user()->last_name) }}</span>
</div>
</div>
{{ Form::close() }}
</div>
</div>
</div>
<div class="modal fade" id="symptomsmodal" 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">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('triage.add_new_symptom') }}</h4>
</div>
<div class="modal-body">
{{ Form::text('symptom_name', '', ['class' => 'form-control', 'id' => 'symptom_name', 'placeholder' => __('triage.symptom_name')]) }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">{{ __('triage.cancel') }}</button>
<a class="btn btn-success" onclick="submitSymptom()">{{ __('triage.add_symptom') }}</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="referralsmodal" 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">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('triage.add_new_referral') }}</h4>
</div>
<div class="modal-body">
{{ Form::text('referral_name', '', ['class' => 'form-control', 'id' => 'referral_name', 'placeholder' => __('triage.referral_name')]) }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">{{ __('triage.cancel') }}</button>
<a class="btn btn-primary" onclick="submitReferral()">{{ __('triage.add_referral') }}</a>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
let max_rows = 20;
let wrapper = $(".symptoms_input_fields_wrap");
let x = {{ !empty($symptoms_array)? count($symptoms_array):1 }};
let smart_triage_variables = {};
// check if smart triage is enabled
let smart_triage_enabled = <?php echo is_smart_triage_enabled() ? 1 : 0; ?>;
let apply_triage_grade = <?php echo apply_triage_grade() ? 1 : 0; ?>;
$(wrapper).on("click", ".remove_field", function(e) {
e.preventDefault();
$(this).parent('td').parent('tr').remove();
x--;
});
function add_symptom_row() {
if (x < max_rows) {
$(wrapper).append("<tr>\
<td style='width: 20%;'>\
<select name='symptoms[]' id='symptoms_" + x + "' class='form-control col-sm-12 compulsory' onchange='showPrompt(this.value, " + x + ")' required>@php echo $option_symptoms; @endphp</select>\
</td>\
<td style='width: 21%'>\
<div class='row'>\
<div class='col-sm-3'>\
<input type='text' style='display: block;' name='duration[]' id='symptoms_duration_" + x + "' class='col-sm-12 form-control' required>\
</div>\
<div class='col-sm-9'>\
<select style='display: inline-block;' name='time[]' id='symptoms_time_" + x + "' class='col-sm-12 form-control' required>@php echo $option_symptoms_periods; @endphp</select>\
</div>\
</div>\
</td>\
<td id='symptoms_prompt_" + x + "' style='width: 30%'></td>\
<td id='symptoms_reference_" + x + "'></td>\
<td style='width: 1%;'><a class='remove_field btn btn-sm btn-rounded btn-danger' style='color: white;'><i class='fa fa-trash'></i></a></td>\
</tr>");
generalSelect2Set('symptoms_' + x);
$("#symptoms_" + x).load('/symptoms/get_symptoms');
x++;
}
}
function generalSelect2Set(id) {
$('#' + id).select2({
width: "100%"
});
}
function showPrompt(symptom_id, id) {
if (symptom_id == "") {
return;
}
$.ajax({
method: 'POST',
url: '/triage/get_prompt',
data: {
'symptom_id': symptom_id
},
success: function(response) {
let returnText = response.split('&&&&');
$('#symptoms_prompt_' + id).html('<p style="color: #C85F6A;">' + returnText[0] + '</p>');
$('#symptoms_reference_' + id).html(returnText[1]);
},
error: function(jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR));
console.log(JSON.stringify(jqXHR));
}
});
}
function submitSymptom() {
var symptom_name = $("#symptom_name").val();
$.ajax({
method: 'POST',
url: '/triage/add_symptom',
data: {
'symptom_name': symptom_name
},
success: function(response) {
if (response == 1) {
//reload all dropdowns
$(".1000").load('/symptoms/get_symptoms');
alert(symptom_name + ' symptom has been added.');
$('#symptomsmodal').modal('hide');
} else {
alert("<?php echo __('triage.adding_symptom_failed'); ?>");
}
},
error: function(jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR));
console.log(JSON.stringify(jqXHR));
}
});
}
function submitReferral() {
var name = $("#referral_name").val();
$.ajax({
method: 'POST',
url: '/triage/add_referral',
data: {
'name': name
},
success: function(response) {
if (!isNaN(response)) {
//response = last inserted id
$('#referral_hospital').append($('<option>', {
value: response,
text: name
}));
$('#referral_hospital').val(response); //preselect the newly added referral
$('#referralsmodal').modal('hide'); //manually hide the modal
} else {
alert("<?php echo __('triage.adding_referral_failed'); ?>");
}
},
error: function(jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR));
console.log(JSON.stringify(jqXHR));
}
});
}
$(document).ready(function() {
$('.initial_symptoms_select').select2({
width: "100%"
});
$('.select-2').select2({
width: "100%"
});
var cons_attendance = <?php echo is_add_attendance_to_consultation_enabled() ? 1 : 0 ?>;
$("#submit_triage").click(function(e) { // make sure that all compulsory fields have been filled out
var empty_compulsory_fields = [];
$(".compulsory").each(function() {
if ($(this).val() == "") {
var textname = $(this).attr('name');
$(this).focus();
empty_compulsory_fields.push(textname);
$(this).css('border', '1px solid #F08080');
}
});
if(cons_attendance == 0 && !$('#new_attendance').is(':checked') && !$('#re_attendance').is(':checked')){
alert('Please fill in Patient attendance.');
e.preventDefault();
return false;
$('#new_attendance, #re_attendance').css('border','1px solid #F08080');
}
/* check if the array containing empty compulsory fields is not empty then return false */
if (empty_compulsory_fields.length != 0) {
alert("<?php echo __('triage.compulsory_fields_warning'); ?>");
console.log(empty_compulsory_fields);
e.preventDefault();
return false;
}
});
$('#new_attendance').click(function() {
$('#re_attendance').not('#new_attendance').removeAttr('checked');
});
$('#re_attendance').click(function() {
$('#new_attendance').not('#re_attendance').removeAttr('checked');
});
});
$(document).ready(function() {
$("#child_feeling_unsafe_section").hide();
$("#tested_for_hiv_last_3_months_section").hide();
$(".hiv_positive_section").hide();
});
function hide_tested_for_hiv_last_3_months_questions() {
$("#tested_for_hiv_last_3_months_section").hide();
}
function show_tested_for_hiv_last_3_months_questions() {
$("#tested_for_hiv_last_3_months_section").show();
}
function show_feeling_unsafe_questions() {
$('#child_feeling_unsafe_section').show();
}
function hide_feeling_unsafe_questions() {
$('#child_feeling_unsafe_section').hide();
}
function show_hiv_positive_questions() {
$(".hiv_positive_section").show();
}
function hide_hiv_positive_questions() {
$(".hiv_positive_section").hide();
}
// below 15
$('input[type=radio][name=mother_hiv_positive]').change(function() {
if (this.value == '1') {
$('.child-hiv-status').removeClass('d-none').css('display', '');
$('.child-hiv-status-questions').removeClass('d-none').css('display', '');
} else if (this.value == '0') {
$('.child-hiv-status').addClass('d-none').css('display', 'none');
$('.child-hiv-status-questions').addClass('d-none').css('display', 'none');
$('.child-hiv-status-questions input[type=radio]').each(function() {
this.value('');
})
}
});
</script>
@endpush
@@ -0,0 +1,154 @@
<div class="row">
<h4>{{ __('layout.triage') }}: {{ __('layout.children') }} </h4>
</div>
<div class="row">
<h5>{{ __('layout.emergency_signs') }} *** </h5>
</div>
<div class="row">
<div class="table-responsive">
<table class="table table-bordered table-striped table-condensed">
<tbody>
<tr>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col" width="2%">{{ __('layout.yes') }}</th>
<th scope="col" width="2%">{{ __('layout.no') }}</th>
</tr>
<tr>
<th scope="row">{{ __('layout.airway_breathing') }}</th>
<td>{{ __('layout.cyanosis') }}</td>
<td>
<div class="controls">
<input type="radio" name="cyanosis" value="{{ __('layout.yes') }}" id="cyanosis_0" required @if(!empty($airway[__('layout.cyanosis')]) && $airway[__('layout.cyanosis')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="cyanosis" value="{{ __('layout.no') }}" id="cyanosis_0" required @if(!empty($airway[__('layout.cyanosis')]) && $airway[__('layout.cyanosis')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.stridor_breathing_choking') }}</td>
<td>
<div class="controls">
<input type="radio" name="stridor" value="{{ __('layout.yes') }}" id="stridor_0" required @if(!empty($airway[__('layout.stridor_breathing_choking')]) && $airway[__('layout.stridor_breathing_choking')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="stridor" value="{{ __('layout.no') }}" id="stridor_1" required @if(!empty($airway[__('layout.stridor_breathing_choking')]) && $airway[__('layout.stridor_breathing_choking')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.severe_resp_distress') }}</td>
<td>
<div class="controls">
<input type="radio" name="severe_distress" value="{{ __('layout.yes') }}" id="severe_distress_0" required @if(!empty($airway[__('layout.severe_resp_distress')]) && $airway[__('layout.severe_resp_distress')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="severe_distress" value="{{ __('layout.no') }}" id="severe_distress_1" required @if(!empty($airway[__('layout.severe_resp_distress')]) && $airway[__('layout.severe_resp_distress')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">{{ __('layout.circulation') }}</th>
<td>{{ __('layout.capillary_refill_seconds') }}</td>
<td>
<div class="controls">
<input type="radio" name="refill" value="{{ __('layout.yes') }}" id="refill_0" required @if(!empty($circulation[__('layout.capillary_refill_seconds')]) && $circulation[__('layout.capillary_refill_seconds')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="refill" value="{{ __('layout.no') }}" id="refill_1" required @if(!empty($circulation[__('layout.capillary_refill_seconds')]) && $circulation[__('layout.capillary_refill_seconds')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.severe_bleeding') }}</td>
<td>
<div class="controls">
<input type="radio" name="severe_bleeding" value="{{ __('layout.yes') }}" id="severe_bleeding_0" required @if(!empty($circulation[__('layout.severe_bleeding')]) && $circulation[__('layout.severe_bleeding')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="severe_bleeding" value="{{ __('layout.no') }}" id="severe_bleeding_1" required @if(!empty($circulation[__('layout.severe_bleeding')]) && $circulation[__('layout.severe_bleeding')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.weak_fast_pulse') }}</td>
<td>
<div class="controls">
<input type="radio" name="weak_fast_pulse" value="{{ __('layout.yes') }}" id="weak_fast_pulse_0" required @if(!empty($circulation[__('layout.weak_fast_pulse')]) && $circulation[__('layout.weak_fast_pulse')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="weak_fast_pulse" value="{{ __('layout.no') }}" id="weak_fast_pulse_1" required @if(!empty($circulation[__('layout.weak_fast_pulse')]) && $circulation[__('layout.weak_fast_pulse')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">{{ __('layout.neurological') }}</th>
<td>{{ __('layout.coma') }}</td>
<td>
<div class="controls">
<input type="radio" name="coma" value="{{ __('layout.yes') }}" id="coma_0" required @if(!empty($neurological[__('layout.coma')]) && $neurological[__('layout.coma')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="coma" value="{{ __('layout.no') }}" id="coma_1" required @if(!empty($neurological[__('layout.coma')]) && $neurological[__('layout.coma')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.convulsing_now') }}</td>
<td>
<div class="controls">
<input type="radio" name="convulsing_now" value="{{ __('layout.yes') }}" id="convulsing_now_0" required @if(!empty($neurological[__('layout.convulsing_now')]) && $neurological[__('layout.convulsing_now')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="convulsing_now" value="{{ __('layout.no') }}" id="convulsing_now_1" required @if(!empty($neurological[__('layout.convulsing_now')]) && $neurological[__('layout.convulsing_now')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
<tr>
<th scope="row">{{ __('layout.dehydration_children_diarrhoea') }}</th>
<td>{{ __('layout.diarrhoea_lethargy_sunken_eyes') }}</td>
<td>
<div class="controls">
<input type="radio" name="lethargy" value="{{ __('layout.yes') }}" id="lethargy_0" required @if(!empty($dehydration[__('layout.diarrhoea_lethargy_sunken_eyes')]) && $dehydration[__('layout.diarrhoea_lethargy_sunken_eyes')] == __('layout.yes')) checked @endif>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="lethargy" value="{{ __('layout.no') }}" id="lethargy_0" required @if(!empty($dehydration[__('layout.diarrhoea_lethargy_sunken_eyes')]) && $dehydration[__('layout.diarrhoea_lethargy_sunken_eyes')] == __('layout.no')) checked @endif>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="alert alert-warning ">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ __('layout.positive_call_for_help') }}
</div>
@@ -0,0 +1,113 @@
<div class="row">
<h4>{{ __('layout.adult_triage') }} </h4>
</div>
<div class="row">
<h5>{{ __('layout.family_planning_questions') }}</h5>
</div>
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4">
<input type="checkbox" class="col-sm-1" name="too_sick" id="too_sick" value="1" @if($triage->fp_too_sick == 1) checked @endif>
<span style="color: maroon; font-weight: bold">{{ __('layout.too_sick') }}</span>
</div>
</div>
<hr>
<table class="too_sick_remove table table-bordered" @if($triage->fp_too_sick == 1) style="display: none" @endif>
@if ($patient->gender == 2)
<tr class="currently_pregnant">
<td>{{ __('layout.currently_pregnant') }}</td>
<td>
<input type="radio" name='pregnant' id='pregnant_yes' class="answer_no" value="1" @if($triage->pregnant == 1) checked @endif>&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='pregnant' id='pregnant_no' class="answer_no" value="0" @if($triage->pregnant == 0) checked @endif>&nbsp;{{ __('layout.no') }}
</td>
</tr>
<tr class="menopause" style="display: none">
<td>{{ __('layout.had_menopause') }}</td>
<td>
<input type="radio" name='menopause' id='menopause_yes' class="answer_no" value="1" @if($triage->menopause == 1) checked @endif>&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='menopause' id='menopause_no' class="answer_no" value="0" @if($triage->menopause == 0) checked @endif>&nbsp;{{ __('layout.no') }}
</td>
</tr>
@endif
<tr class="sexually_active">
<td>{{ __('layout.sexually_active') }}</td>
<td>
<input type="radio" name='sexually_active' id='sexually_active_yes' class="answer_yes compulsory" value="1" @if($triage->sexually_active == 1) checked @endif>&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='sexually_active' id='sexually_active_no' class="answer_yes compulsory" value="0" @if($triage->sexually_active == 0) checked @endif>&nbsp;{{ __('layout.no') }}
</td>
</tr>
<tr class="expect_child" style="display: none">
<td>{{ __('layout.wish_to_have_child') }}</td>
<td>
<input type="radio" name='yes_no_children' id='yes_children' class="answer_no" value="1">&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='yes_no_children' id='no_children' class="answer_no" value="0">&nbsp;{{ __('layout.no') }}
</td>
</tr>
<tr class="fp_method" style="display: none">
<td>{{ Form::label('fp_method', __('layout.family_planning_method')) }}</td>
<td>{{ Form::select('fp_method', $family_planning_methods, $triage->fp_method, ['class' => 'form-control col-sm-8']) }}</td>
</tr>
<tr class="fp_action" style="display: none">
<td>{{ __('layout.action') }}</td>
<td>
<select name='fp_action' class="form-control col-sm-8">
<option value="{{ $triage->fp_action }}" selected>{{ $triage->fp_action }}</option>
<option value="{{ __('layout.none') }}">{{ __('layout.none') }}</option>
<option value="{{ __('layout.counseling') }}">{{ __('layout.counseling') }}</option>
<option value="{{ __('layout.referral_to_fp') }}">{{ __('layout.referral_to_fp') }}</option>
</select>
</td>
</tr>
</table>
@push('scripts')
<script>
$("#too_sick").change(function () {
if ($(this).is(':checked')) {
$(".too_sick_remove").hide();
} else {
$(".too_sick_remove").show();
}
});
$("#menopause_yes").change(function () {
$(".sexually_active").hide();
})
$("#menopause_no").change(function () {
$(".sexually_active").show();
})
$("#sexually_active_no").change(function () {
$(".expect_child").hide();
})
$("#sexually_active_yes").change(function () {
$(".expect_child").show();
})
$("#yes_children").change(function () {
$(".fp_method").hide();
$(".fp_action").hide();
})
$("#no_children").change(function () {
$(".fp_method").show();
$(".fp_action").show();
})
$("#pregnant_yes").change(function () {
$(".menopause").hide();
$(".sexually_active").hide();
})
$("#pregnant_no").change(function () {
$(".menopause").show();
$(".sexually_active").show();
})
</script>
@endpush
@@ -0,0 +1,426 @@
@if ($age_group == 1)
@push('scripts')
<script src="{{ asset('js/observations/0_28_days.js') }}"></script>
@endpush
@php $observation_counter = 0; @endphp
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->slug}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@if(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->id}}" class="col-sm-12 form-control">
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@php $observation_counter++; @endphp
@endforeach
@elseif ($age_group == 2)
@push('scripts')
<script src="{{ asset('js/observations/1_12_months.js') }}"></script>
@endpush
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->slug}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@if(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->id}}" class="col-sm-12 form-control">
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" class="form-control" value="{{ $observation->option_for_normal }}" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@endforeach
@elseif ($age_group == 3)
@push('scripts')
<script src="{{ asset('js/observations/1_5_years.js') }}"></script>
@endpush
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->slug}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@if(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->id}}" class="col-sm-12 form-control">
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@endforeach
@elseif ($age_group == 4)
@push('scripts')
<script src="{{ asset('js/observations/6_12_years.js') }}"></script>
@endpush
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->slug}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check to make appropriate row for BMI if the observation name is weight -->
@if($observation->slug == 'weight')
<td style="width: 20%;" class="center">
<input type="number" step="0.01" name="observationsValues[]" id="weight" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" required class="col-sm-12 compulsory form-control" style="width: 100%"
/>
</td>
<td colspan="3" style="width: 40%">
<input type="hidden" step="0.01" readonly="readonly" name="observationsNames[]" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input type="number" readonly="readonly" name="observationsValues[]" id="bmi" value="{{ $observations_to_edit[$observation->name] }}" class="col-sm-12 form-control" />
</div>
</div>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@elseif(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->id}}" class="col-sm-12 form-control">
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@endforeach
@elseif ($age_group == 5)
@push('scripts')
<script src="{{ asset('js/observations/over_12_years.js') }}"></script>
<script src="{{ asset('js/observations/over_12_years_news.js') }}"></script>
@endpush
@php $observation_counter = 0; @endphp
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->slug}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check to make appropriate row for BMI if the observation name is weight -->
@if($observation->slug == 'weight')
<td style="width: 20%;" class="center">
<input type="number" step="0.01" name="observationsValues[]" id="weight" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" required class="col-sm-12 compulsory form-control" style="width: 100%"/>
</td>
<td colspan="3" style="width: 40%">
<input type="hidden" step="0.01" readonly="readonly" name="observationsNames[]" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input type="number" readonly="readonly" name="observationsValues[]" id="bmi" value="{{ $observations_to_edit[$observation->name] }}" class="col-sm-12 form-control" />
</div>
</div>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@elseif(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}NewsText" class="text-center"></p>
<input type="hidden" id="{{$observation->id}}News" name="{{$observation->id}}News" value="" class="col-sm-12" />
<input type="hidden" name="adult" id="adult" value="adult" class="col-sm-12" />
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->id}}" class="col-sm-12 form-control">
<option value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" selected>{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td colspan="3" style="width: 40%;"></td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ isset($observations_to_edit[$observation->name]) ? $observations_to_edit[$observation->name] : '' }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}Kews" class="text-center"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->id}}NewsText" class="text-center"></p>
<input type="hidden" id="{{$observation->id}}News" name="{{$observation->id}}News" value="" class="col-sm-12" />
<input type="hidden" name="adult" id="adult" value="adult" class="col-sm-12" />
</td>
@endif
</tr>
@endforeach
@php $observation_counter++; @endphp
@else
<tr>
<td colspan="5" class="text-center" style="width: 100%; color: maroon">{{ __('layout.ensure_correct_dob') }}</td>
</tr>
@endif
@@ -0,0 +1,47 @@
<div class="row">
<h4 class="heading pull-right">{{ __('layout.priority_signs') }}</h4>
</div>
<div class="row">
<table class="table table-bordered table-primary table-blue table-striped table-vertical-center table-condensed">
<tbody>
<tr>
<th scope="row"><div align="left">{{ __('layout.significant_trauma') }}</div></th>
<td><input type="checkbox" name="trauma" id="trauma" value="Yes" @if(in_array("Significant trauma", $priority_signs)) checked @endif></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.severe_pain') }}</div></th>
<td>
<input type="checkbox" name="severe_pain" id="severe_pain" value="yes" @if(in_array("Severe pain", $priority_signs)) checked @endif>
</td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.oedema_both_feet') }}</div></th>
<td><input type="checkbox" name="oedema" id="oedema" value="yes" @if(in_array("Oedema of both feet", $priority_signs)) checked @endif></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.urgent_surgical_condition') }}</div></th>
<td><input type="checkbox" name="surgical_condition" id="surgical_condition" value="yes" @if(in_array("Urgent surgical condition", $priority_signs)) checked @endif></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.restless_irritable') }}</div></th>
<td><input type="checkbox" name="continuously_irritable" id="continuously_irritable" value="yes" @if(in_array("Restless continuously irritable, lethargic", $priority_signs)) checked @endif></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.malnutrition_visible_wasting') }}</div></th>
<td><input type="checkbox" name="severe_wasting" id="severe_wasting" value="yes" @if(in_array("Malnutrition: visible severe wasting", $priority_signs)) checked @endif></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.severe_pallor') }}</div></th>
<td><input type="checkbox" name="severe_pallor" id="severe_pallor" value="yes" @if(in_array("Severe pallor", $priority_signs)) checked @endif></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.burns_major') }}</div></th>
<td><input type="checkbox" name="burns" id="burns" value="yes" @if(in_array("Burns (Major)", $priority_signs)) checked @endif></td>
</tr>
</tbody>
</table>
</div>
<div class="alert alert-warning ">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ __('layout.positive_move_child_first') }}.
</div>
@@ -0,0 +1,225 @@
@extends('layouts.main')
@push('scripts')
<style>
.triage-grade li {
display: inline-block;
}
</style>
@endpush
@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">Admission Triage</h4>
</div>
<div class="col-lg-6 col-sm-5 col-md-5 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">Dashboard</a></li>
<li><a href="{{ route('patient_episodes.index') }}">Patient Home</a></li>
<li class="active">Triage</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('patients::allergies.header')
<br>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box" style="padding-top: 5px;">
<h5 class="page-title"><strong>Triage ({{ $age_group_display }}) for Episode started on : <font color="blue">{{ streamline_date(get_name($episode_id, 'id', 'created_at', 'patient_episodes')) }}</font></strong></h5>
<hr>
{{ Form::open(['route' => 'triage.save_edits_for_post_discharge' , 'data-toggle' => 'validator']) }}
{{ Form::hidden('episode_id', $episode_id)}}
{{ Form::hidden('patient_id', $patient_id)}}
<div class="row">
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-hover table-striped color-table success-table table-bordered" id="observations_table">
<thead>
<tr>
<th>Observation</th>
<th>Value</th>
<th>Normal Range</th>
</tr>
</thead>
<tbody>
@push('scripts')
<script src="{{ asset('js/observations/1_5_years.js') }}"></script>
@endpush
<tr>
<td>Temperature ( °C)</td>
<td><input value="{{ $temperature }}" type="number" step="0.01" required name="temperature" class="col-sm-12 compulsory form-control" style="width: 100%"/></td>
<td><p style="color: #0000FF" class="text-center"><input type="text" readonly value="36.5 - 37.4" class="form-control" style="color: blue;"></p></td>
</tr>
<tr>
<td>SaO2 (%)</td>
<td><input value="{{ $oxy_sat }}" type="number" step="0.01" required name="oxy_sat" class="col-sm-12 compulsory form-control" style="width: 100%"/></td>
<td><p style="color: #0000FF" class="text-center"><input type="text" readonly value=">94" class="form-control" style="color: blue;"></p></td>
</tr>
<tr>
<td>MUAC (cm)</td>
<td><input value="{{ $muac }}" type="number" step="0.01" required name="muac" class="col-sm-12 compulsory form-control" style="width: 100%"/></td>
<td><p style="color: #0000FF" class="text-center"><input type="text" readonly value="12.5 - 50.0" class="form-control" style="color: blue;"></p></td>
</tr>
<tr>
<td>Height (m)</td>
<td><input value="{{ $height }}" type="number" step="0.01" required name="height" id="height" class="col-sm-12 compulsory form-control" style="width: 100%"/></td>
<td></td>
</tr>
<tr>
<td>Weight (kg)</td>
<td><input value="{{ $weight }}" type="number" step="0.01" required id="weight" name="weight" class="col-sm-12 compulsory form-control" style="width: 100%"/></td>
<td>
<input type="hidden" step="0.01" readonly="readonly" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input value="{{ $bmi }}" type="number" readonly="readonly" name="bmi" id="bmi" class="col-sm-12 compulsory form-control" required />
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
@if (between($age_diff_months, 0, 5))
<table class="table table-bordered">
<tr>
<td class="text-center" colspan="2"><h4>Social Health Indicators</h4></td>
</tr>
<tr>
<td>{{ Form::label('child_with_proven_infection', 'Does the child have a proven or suspected infection e.g is the child having fever, cough, diarrhoea?') }}</td>
<td>
{{ Form::radio('child_with_proven_infection', 1, $discharge_mortality->child_with_proven_infection == 1) }} Yes
{{ Form::radio('child_with_proven_infection', 0, $discharge_mortality->child_with_proven_infection === 0) }} No
</td>
</tr>
<tr>
<td>{{ Form::label('hospital_travel_duration', 'How long did it take you to travel to the hospital?') }}</td>
<td>
{{ Form::select('hospital_travel_duration', ['' => '-- select --','1' => '< 30 mins','2' => '30 mins 1 hour','3' => '1 - 4 hours','4' => '> 4 hours'], $discharge_mortality->hospital_travel_duration_below_6, ['class' => 'form-control compulsory', 'required']) }}
</td>
</tr>
<tr>
<td>{{ Form::label('illness_duration', 'What is the duration of the present illness at the time of admission?') }}</td>
<td>
{{ Form::select('illness_duration', ['' => '-- select --','1' => '< 48 hours','2' => '48 hours - 7 days','3' => '7 days - 1 month','4' => 'More than a month'], $discharge_mortality->illness_duration_at_admission_below_6, ['class' => 'form-control compulsory', 'required']) }}
</td>
</tr>
<tr>
<td>{{ Form::label('tone_normal_6mo', 'Muscle Tone') }}</td>
<td>
{{ Form::select('tone_normal_6mo', ['' => '-- select --','1' => 'Increased (Stiff)','2' => 'Normal','3' => 'Decreased (floppy)','4' => 'Do not know'], $discharge_mortality->tone_normal_6mo, ['class' => 'form-control']) }}
</td>
</tr>
</table>
@endif
@if (between($age_diff_months, 6, 60))
<div></div>
<table class="table table-bordered">
<tr>
<td class="text-center" colspan="4"><h4>Social Health Indicators</h4></td>
</tr>
<tr>
<td colspan="2">{{ Form::label('child_with_proven_infection', 'Does the child have a proven or suspected infection e.g is the child having fever, cough, diarrhoea?') }}</td>
<td>{{ Form::radio('child_with_proven_infection', 1, $discharge_mortality->child_with_proven_infection == 1, ['required']) }} Yes</td>
<td>{{ Form::radio('child_with_proven_infection', 0, $discharge_mortality->child_with_proven_infection === 0, ['required']) }} No</td>
</tr>
<tr>
<td>
{{ Form::label('last_hospitalization', 'Time since last hospitalization') }}
</td>
<td>
{{ Form::select('last_hospitalization', ['' => '-- select --','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'], $discharge_mortality->last_hospitalization, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>
{{ Form::label('water_source', 'Primary water source for drinking water') }}
</td>
<td>
{{ Form::select('water_source', ['' => '-- select --', '1' => 'Protected spring', '2' => 'Bore hole', '3' => 'Municipal water', '4' => 'Open source (unprotected, stagnant water, dam)', '5' => 'Slow running water', '6' => 'Fast running water'], $discharge_mortality->water_source, ['class' => 'form-control compulsory', 'required']) }}
</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>
{{ Form::radio('safe_water', 1, $discharge_mortality->filter_water == 1, ['required']) }} Yes
{{ Form::radio('safe_water', 0, $discharge_mortality->filter_water === 0, ['required']) }} No
</td>
<td>{{ Form::label('child_mosquito_net', 'Does your child sleep under a mosquito net?') }}</td>
<td>
{{ Form::select('child_mosquito_net', ['' => '-- select --','1' => 'Never','2' => 'Sometimes','3' => 'Always'], $discharge_mortality->child_mosquito_net, ['class' => 'form-control compulsory', 'required']) }}
</td>
</tr>
<tr>
<td>{{ Form::label('mother_education_level', 'What is the education level of the childs mother?') }}</td>
<td>
{{ Form::select('mother_education_level', ['' => '-- select --','1' => 'No school','2' => '<= P3','3' => 'P4-P7','4' => 'S1-S6','5' => 'Post secondary (including post S4 technical school)','6' => 'Do not know'], $discharge_mortality->mother_education_level, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>{{ Form::label('hospital_travel_duration', 'How long did it take you to travel to the hospital?') }}</td>
<td>
{{ Form::select('hospital_travel_duration', ['' => '-- select --','1' => '< 30 mins','2' => '30 mins 1 hour','3' => '1 - 4 hours','4' => '> 4 hours'], $discharge_mortality->hospital_travel_duration, ['class' => 'form-control compulsory', 'required']) }}
</td>
</tr>
<tr>
<td>{{ Form::label('maternal_hiv', 'Maternal HIV') }}</td>
<td>
{{ Form::select('maternal_hiv', ['' => '-- select --', '2' => 'HIV Positive', '1' => 'HIV Negative', '0' => 'HIV Unknown'], $discharge_mortality->maternal_hiv, ['class' => 'form-control compulsory', 'required']) }}
</td>
<td>{{ Form::label('child_hiv', 'Child HIV') }}</td>
<td>{{ Form::select('child_hiv', ['' => '-- select --','1' => 'HIV Positive','0' => 'HIV Negative / Unknown'], $discharge_mortality->child_hiv, ['class' => 'form-control compulsory', 'required']) }}</td>
</tr>
<tr>
<td>{{ Form::label('bcs_eye_movement', 'Eye movement') }}</td>
<td>{{ Form::select('bcs_eye_movement', ['' => '-- select --','1' => 'Watches or follows','0' => 'Fails to watch or follow'], $discharge_mortality->bcs_eye_movement, ['class' => 'form-control compulsory', 'required']) }}</td>
<td>{{ Form::label('bcs_best_mortal', 'Best motor response') }}</td>
<td>{{ Form::select('bcs_best_mortal', ['' => '-- select --','0' => 'No response or inappropriate response','1' => 'Withdraws limb from pain stimulus','2' => 'Localizes painful stimulus'], $discharge_mortality->bcs_best_mortal, ['class' => 'form-control compulsory', 'required']) }}</td>
</tr>
<tr>
<td>{{ Form::label('bcs_best_verbal', 'Best verbal response') }}</td>
<td>{{ Form::select('bcs_best_verbal', ['' => '-- select --','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, ['class' => 'form-control compulsory', 'required']) }}</td>
<td>{{ Form::label('maternal_age', 'Mother\'s age') }}</td>
<td>{{ Form::number('maternal_age', $discharge_mortality->maternal_age, ['class' => 'form-control compulsory', 'required']) }}</td>
</tr>
</table>
@endif
</div>
</div>
<br><br>
{{ Form::button('Submit',['type'=>'submit', 'class'=>'btn btn-success col-sm-6']) }}
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function () {
//
});
</script>
@endpush
@@ -0,0 +1,154 @@
<div class="row">
<h4>{{ __('layout.triage') }}: {{ __('layout.children') }} </h4>
</div>
<div class="row">
<h5>{{ __('layout.emergency_signs') }} *** </h5>
</div>
<div class="row">
<div class="table-responsive">
<table class="table table-bordered table-striped table-condensed">
<tbody>
<tr>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col" width="2%">{{ __('layout.yes') }}</th>
<th scope="col" width="2%">{{ __('layout.no') }}</th>
</tr>
<tr>
<th scope="row">{{ __('layout.airway_breathing') }}</th>
<td>{{ __('layout.cyanosis') }}</td>
<td>
<div class="controls">
<input type="radio" name="cyanosis" value="{{ __('layout.yes') }}" id="cyanosis_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="cyanosis" value="{{ __('layout.no') }}" id="cyanosis_0" required>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.stridor_breathing_choking') }}</td>
<td>
<div class="controls">
<input type="radio" name="stridor" value="{{ __('layout.yes') }}" id="stridor_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="stridor" value="{{ __('layout.no') }}" id="stridor_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.severe_resp_distress') }}</td>
<td>
<div class="controls">
<input type="radio" name="severe_distress" value="{{ __('layout.yes') }}" id="severe_distress_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="severe_distress" value="{{ __('layout.no') }}" id="severe_distress_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">{{ __('layout.circulation') }}</th>
<td>{{ __('layout.capillary_refill_seconds') }}</td>
<td>
<div class="controls">
<input type="radio" name="refill" value="{{ __('layout.yes') }}" id="refill_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="refill" value="{{ __('layout.no') }}" id="refill_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.severe_bleeding') }}</td>
<td>
<div class="controls">
<input type="radio" name="severe_bleeding" value="{{ __('layout.yes') }}" id="severe_bleeding_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="severe_bleeding" value="{{ __('layout.no') }}" id="severe_bleeding_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.weak_fast_pulse') }}</td>
<td>
<div class="controls">
<input type="radio" name="weak_fast_pulse" value="{{ __('layout.yes') }}" id="weak_fast_pulse_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="weak_fast_pulse" value="{{ __('layout.no') }}" id="weak_fast_pulse_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">{{ __('layout.neurological') }}</th>
<td>{{ __('layout.coma') }}</td>
<td>
<div class="controls">
<input type="radio" name="coma" value="{{ __('layout.yes') }}" id="coma_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="coma" value="{{ __('layout.no') }}" id="coma_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>{{ __('layout.convulsing_now') }}</td>
<td>
<div class="controls">
<input type="radio" name="convulsing_now" value="{{ __('layout.yes') }}" id="convulsing_now_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="convulsing_now" value="{{ __('layout.no') }}" id="convulsing_now_1" required>
</div>
</td>
</tr>
<tr>
<th scope="row">{{ __('layout.dehydration_children_diarrhoea') }}</th>
<td>{{ __('layout.diarrhoea_lethargy_sunken_eyes') }}</td>
<td>
<div class="controls">
<input type="radio" name="lethargy" value="{{ __('layout.yes') }}" id="lethargy_0" required>
</div>
</td>
<td>
<div class="controls">
<input type="radio" name="lethargy" value="{{ __('layout.no') }}" id="lethargy_0" required>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="alert alert-warning ">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ __('layout.positive_call_for_help') }}
</div>
@@ -0,0 +1,113 @@
<div class="row">
<h4>{{ __('layout.adult_triage') }} </h4>
</div>
<div class="row">
<h5>{{ __('layout.family_planning_questions') }}</h5>
</div>
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4">
<input type="checkbox" class="col-sm-1" name="too_sick" id="too_sick" value="1">
<span style="color: maroon; font-weight: bold">{{ __('layout.too_sick') }}</span>
</div>
</div>
<hr>
<table class="too_sick_remove table table-bordered">
@if ($patient->gender == 2)
<tr class="currently_pregnant">
<td>{{ __('layout.currently_pregnant') }}</td>
<td>
<input type="radio" name='pregnant' id='pregnant_yes' class="answer_no" value="1">&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='pregnant' id='pregnant_no' class="answer_no" value="0">&nbsp;{{ __('layout.no') }}
</td>
</tr>
<tr class="menopause" style="display: none">
<td>{{ __('layout.had_menopause') }}</td>
<td>
<input type="radio" name='menopause' id='menopause_yes' class="answer_no" value="1">&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='menopause' id='menopause_no' class="answer_no" value="0">&nbsp;{{ __('layout.no') }}
</td>
</tr>
@endif
<tr class="sexually_active">
<td>{{ __('layout.sexually_active') }}</td>
<td>
<input type="radio" name='sexually_active' id='sexually_active_yes' class="answer_yes compulsory" value="1">&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='sexually_active' id='sexually_active_no' class="answer_yes compulsory" value="0">&nbsp;{{ __('layout.no') }}
</td>
</tr>
<tr class="expect_child" style="display: none">
<td>{{ __('layout.wish_to_have_child') }}</td>
<td>
<input type="radio" name='yes_no_children' id='yes_children' class="answer_no" value="1">&nbsp;{{ __('layout.yes') }} &nbsp;&nbsp;&nbsp;
<input type="radio" name='yes_no_children' id='no_children' class="answer_no" value="0">&nbsp;{{ __('layout.no') }}
</td>
</tr>
<tr class="fp_method" style="display: none">
<td>{{ Form::label('fp_method', __('layout.family_planning_method')) }}</td>
<td>{{ Form::select('fp_method', $family_planning_methods, '', ['class' => 'form-control col-sm-8']) }}</td>
</tr>
<tr class="fp_action" style="display: none">
<td>{{ __('layout.action') }}</td>
<td>
<select name='fp_action' class="form-control col-sm-8">
<option value="">--{{ __('layout.select') }}--</option>
<option value="{{ __('layout.none') }}">{{ __('layout.none') }}</option>
<option value="{{ __('layout.counseling') }}">{{ __('layout.counseling') }}</option>
<option value="{{ __('layout.referral_to_fp') }}">{{ __('layout.referral_to_fp') }}</option>
</select>
</td>
</tr>
</table>
@push('scripts')
<script>
$("#too_sick").change(function () {
if ($(this).is(':checked')) {
$(".too_sick_remove").hide();
} else {
$(".too_sick_remove").show();
}
});
$("#menopause_yes").change(function () {
$(".sexually_active").hide();
})
$("#menopause_no").change(function () {
$(".sexually_active").show();
})
$("#sexually_active_no").change(function () {
$(".expect_child").hide();
})
$("#sexually_active_yes").change(function () {
$(".expect_child").show();
})
$("#yes_children").change(function () {
$(".fp_method").hide();
$(".fp_action").hide();
})
$("#no_children").change(function () {
$(".fp_method").show();
$(".fp_action").show();
})
$("#pregnant_yes").change(function () {
$(".menopause").hide();
$(".sexually_active").hide();
})
$("#pregnant_no").change(function () {
$(".menopause").show();
$(".sexually_active").show();
})
</script>
@endpush
@@ -0,0 +1,338 @@
<div>
<input type="hidden" name="is_hiv_and_gbv_screening_tool_enabled"
value="{{ is_hiv_and_gbv_screening_tool_enabled() }}">
</div>
@if (between($age_diff_months, 18, 168))
{{-- HIV Screening Tool (18 months to 14 years), show_hiv_positive_questions nolonger needed --}}
@endif
@if ($years >= 15)
{{-- HIV Screening Tool (=>15 years) --}}
<div class="wrapper">
<div>
<div class="pb-3">
<h5 class="font-weight-bold">HIV Screening Tool for adults (=>15 years)</h5>
</div>
<div>
<p>Does the client belong to ANY of these categories?</p>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm w-100 mb-4">
<tbody>
<tr>
<td>Have you tested for HIV in the last 12 months?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="tested_for_hiv_in_past_12_months" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="tested_for_hiv_in_past_12_months" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you had TB or presumptive TB (2 weeks' history of cough, night sweats, weight loss,
fever)?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="had_tb_or_presumptive_tb" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="had_tb_or_presumptive_tb" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Do you have symptoms of Sexually Transmitted Infection (blisters, sores, unusual
urethral or vaginal discharge)?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="sti_symptoms_present" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="sti_symptoms_present" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you been diagnosed with Hepatitis B or C?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="diagnosed_with_hepatitis_b_or_c" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="diagnosed_with_hepatitis_b_or_c" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you experienced or caused Sexual violence (SGBV)?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="experienced_or_caused_sexual_violence" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="experienced_or_caused_sexual_violence" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Do you have a reactive HIV self-test result?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="reactive_hiv_self_test_result" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="reactive_hiv_self_test_result" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you been identified through an Index client?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="identified_through_index_client" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="identified_through_index_client" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you been exposed to blood or body fluids from a Known HIV positive or unknown HIV
status source?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="exposed_to_hiv_positive_or_unknown_source"
value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="exposed_to_hiv_positive_or_unknown_source"
value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you had signs and symptoms of HIV disease and not had an HIV test in the last 1
month.</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="hiv_symptoms_without_recent_test" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="hiv_symptoms_without_recent_test" value="0" />
No
</label>
</td>
</tr>
</tbody>
</table>
<hr class="invisibe my-5 text-white border-none" style="border: none;">
<div class="row m-t-10 w-100 mt-4">
<div class="col-md-4 mx-2">
<p>Have you tested for HIV in the last 3 months?</p>
</div>
<div class="col-md-4">
<label for="one" class="pl-5">
{{ Form::radio('tested_for_hiv_last_3_months', 1, false, ['onclick' => 'show_tested_for_hiv_last_3_months_questions()']) }}
Yes
</label>
<label for="one" class="pl-5">
{{ Form::radio('tested_for_hiv_last_3_months', 0, false, ['onclick' => 'hide_tested_for_hiv_last_3_months_questions()']) }}
No
</label>
</div>
</div>
<table class="table table-striped table-sm w-100" id="tested_for_hiv_last_3_months_section">
<tbody>
<tr>
<td>Have you tested for HIV in the last 12 months?</td>
<td class="text-right">
<label for="one11" class="pl-5">
Yes
<input type="radio" id="one11" name="tested_for_hiv_last_12_months"
value="1" />
</label>
<label for="one22" class="pl-5">
No
<input type="radio" id="one22" name="tested_for_hiv_last_12_months"
value="0" />
</label>
</td>
</tr>
<tr>
<td>Have you had unprotected sex with partner(s) of unknown HIV status?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="unprotected_sex_with_partner_of_unknown_hiv_status"
value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="unprotected_sex_with_partner_of_unknown_hiv_status"
value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you had unprotected sex with an HIV positive partner? (includes discordance)</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="unprotected_sex_with_hiv_positive_partner"
value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="unprotected_sex_with_hiv_positive_partner"
value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Have you shared injecting needles or piercing objects with anyone else?</td>
<td class="text-right">
<label for="one" class="pl-5">
<input type="radio" name="shared_needles_or_piercing_objects" value="1" />
Yes
</label>
<label for="one" class="pl-5">
<input type="radio" name="shared_needles_or_piercing_objects" value="0" />
No
</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@elseif ($years >= 1.5 && $years < 15)
<div class="wrapper">
<div class="pb-3">
<h5 class="font-weight-bold">HIV Screening Tool (18 months to 14 years)</h5>
<div class="row m-0">
<div class="col-md p-0 mb-2">Is the child's mother HIV positive?</div>
<div class="col-md p-0 mb-2">
<label for="1_childs_mother_hiv_positive" class="pr-5">
<input type="radio" name="mother_hiv_positive" id="1_childs_mother_hiv_positive"
value="1" />
Yes
</label>
<label for="2_childs_mother_hiv_positive" class="pr-5">
<input type="radio" name="mother_hiv_positive" id="2_childs_mother_hiv_positive"
value="0" />
No / Unknown
</label>
</div>
<div class="col-md p-0 mb-2"></div>
</div>
<div class="row m-0 mt-3 pt-3 d-none child-hiv-status">
<div class="col-md p-0 mb-2"> Ask the following questions to the caregiver or child </div>
</div>
<div class="table-responsive d-none child-hiv-status-questions">
<table class="table table-striped table-sm w-100">
<tbody>
<tr>
<td>Has the child / Have you been sick in the last 3 months?</td>
<td class="text-right">
<label for="1_person_sick_last_3_months" class="pl-5">
<input type="radio" name="has_been_sick_last_3_months"
id="1_person_sick_last_3_months" value="1" />
Yes
</label>
<label for="2_person_sick_last_3_months" class="pl-5">
<input type="radio" name="has_been_sick_last_3_months"
id="2_person_sick_last_3_months" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Has the child / Have you had a recurring skin problem?</td>
<td class="text-right">
<label for="1_person_had_recurring_skin_problem" class="pl-5">
<input type="radio" name="has_recurring_skin_problem"
id="1_person_had_recurring_skin_problem" value="1" />
Yes
</label>
<label for="2_person_had_recurring_skin_problem" class="pl-5">
<input type="radio" name="has_recurring_skin_problem"
id="2_person_had_recurring_skin_problem" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Has the child / Have you loast weight in the last 3 months?</td>
<td class="text-right">
<label for="1_person_lost_weight_in_last_3_months" class="pl-5">
<input type="radio" name="has_lost_weight_last_3_months"
id="1_person_lost_weight_in_last_3_months" value="1" />
Yes
</label>
<label for="2_person_lost_weight_in_last_3_months" class="pl-5">
<input type="radio" name="has_lost_weight_last_3_months"
id="2_person_lost_weight_in_last_3_months" value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Has the child / Have you ever had TB?</td>
<td class="text-right">
<label for="1_person_ever_had_tb" class="pl-5">
<input type="radio" name="has_had_tb" id="1_person_ever_had_tb"
value="1" />
Yes
</label>
<label for="2_person_ever_had_tb" class="pl-5">
<input type="radio" name="has_had_tb" id="2_person_ever_had_tb"
value="0" />
No
</label>
</td>
</tr>
<tr>
<td>Is the child / Are you growing well ?</td>
<td class="text-right">
<label for="1_person_growing_well" class="pl-5">
<input type="radio" name="is_growing_well" id="1_person_growing_well"
value="1" />
Yes
</label>
<label for="2_person_growing_well" class="pl-5">
<input type="radio" name="is_growing_well" id="2_person_growing_well"
value="0" />
No
</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,555 @@
@if ($age_group == 1)
@push('scripts')
<script src="{{ asset('js/observations/0_28_days.js') }}"></script>
@endpush
@php $observation_counter = 0; @endphp
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->id}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@if(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ old('observationsValues.$observation_counter') }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ old('observationsValues.$observation_counter') }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->slug}}" class="col-sm-12 form-control">
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@php $observation_counter++; @endphp
@endforeach
@elseif ($age_group == 2)
@push('scripts')
<script src="{{ asset('js/observations/1_12_months.js') }}"></script>
@endpush
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->id}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@if(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->slug}}" class="col-sm-12 form-control">
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" class="form-control" value="{{ $observation->option_for_normal }}" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@endforeach
@elseif ($age_group == 3)
@push('scripts')
<script src="{{ asset('js/observations/1_5_years.js') }}"></script>
@endpush
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->id}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@if($observation->slug=='weight')
<td style="width: 20%;" class="center">
<input type="number" step="0.01" name="observationsValues[]" id="weight" required class="col-sm-12 compulsory form-control" style="width: 100%"
/>
</td>
<td colspan="3" style="width: 40%">
<input type="hidden" step="0.01" readonly="readonly" name="observationsNames[]" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input type="number" readonly="readonly" name="observationsValues[]" id="bmi" class="col-sm-12 form-control" />
</div>
</div>
</td>
@elseif(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->slug}}" class="col-sm-12 form-control">
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@endforeach
@elseif ($age_group == 4)
@push('scripts')
<script src="{{ asset('js/observations/6_12_years.js') }}"></script>
@endpush
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->id}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check to make appropriate row for BMI if the observation name is weight -->
@if($observation->slug=='weight')
<td style="width: 20%;" class="center">
<input type="number" step="0.01" name="observationsValues[]" id="weight" required class="col-sm-12 compulsory form-control" style="width: 100%"
/>
</td>
<td colspan="3" style="width: 40%">
<input type="hidden" step="0.01" readonly="readonly" name="observationsNames[]" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input type="number" readonly="readonly" name="observationsValues[]" id="bmi" class="col-sm-12 form-control" />
</div>
</div>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@elseif(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->slug}}" class="col-sm-12 form-control">
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal}}" class="form-control" style="color: blue"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
@endif
</tr>
@endforeach
@elseif ($age_group == 5)
@push('scripts')
<script src="{{ asset('js/observations/over_12_years.js') }}"></script>
<script src="{{ asset('js/observations/over_12_years_news.js') }}"></script>
@endpush
@php $observation_counter = 0; @endphp
@foreach ($observations as $observation)
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->id}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check to make appropriate row for BMI if the observation name is weight -->
@if($observation->slug=='weight')
<td style="width: 20%;" class="center">
<input type="number" step="0.01" name="observationsValues[]" id="weight" required class="col-sm-12 compulsory form-control" style="width: 100%"
/>
</td>
<td colspan="3" style="width: 40%">
<input type="hidden" step="0.01" readonly="readonly" name="observationsNames[]" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input type="number" readonly="readonly" name="observationsValues[]" id="bmi" class="col-sm-12 form-control" />
</div>
</div>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@elseif(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ old('observationsValues.{$observation_counter}') }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ old('observationsValues.{$observation_counter}') }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}NewsText" class="text-center"></p>
<input type="hidden" id="{{$observation->slug}}News" name="{{$observation->slug}}News" value="" class="col-sm-12" />
<input type="hidden" name="adult" id="adult" value="adult" class="col-sm-12" />
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->slug}}" class="col-sm-12 form-control">
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td colspan="3" style="width: 40%;"></td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}NewsText" class="text-center"></p>
<input type="hidden" id="{{$observation->slug}}News" name="{{$observation->slug}}News" value="" class="col-sm-12" />
<input type="hidden" name="adult" id="adult" value="adult" class="col-sm-12" />
</td>
@endif
</tr>
@endforeach
@php $observation_counter++; @endphp
@else
{{-- <tr>
<td colspan="5" class="text-center" style="width: 100%; color: maroon">{{ __('layout.ensure_correct_dob') }}</td>
</tr> --}}
{{-- This section should ideally handle dynamically added age groups --}}
@push('scripts')
<script src="{{ asset('js/observations/over_12_years.js') }}"></script>
<script src="{{ asset('js/observations/over_12_years_news.js') }}"></script>
@endpush
@php $observation_counter = 0; @endphp
@if (count($observations) > 0)
@foreach ($observations as $observation)
@php
$observations_age_groups_array = is_null($observation->age_group) ? [] : explode(",", $observation->age_group);
@endphp
@if (in_array($age_group, $observations_age_groups_array))
<tr>
<td style="width: 25%;">
<input type="hidden" name="observationsNames[]" id="{{$observation->id}}" value="{{$observation->name}}"/>
<h5 class="text-center">{{ $observation->name }} {{ $observation->measurement ? "(".$observation->measurement.")" : "" }} </h5>
</td>
<!-- check to make appropriate row for BMI if the observation name is weight -->
@if($observation->slug=='weight')
<td style="width: 20%;" class="center">
<input type="number" step="0.01" name="observationsValues[]" id="weight" required class="col-sm-12 compulsory form-control" style="width: 100%"
/>
</td>
<td colspan="3" style="width: 40%">
<input type="hidden" step="0.01" readonly="readonly" name="observationsNames[]" value="BMI" class="col-sm-12"/>
<div class="row">
<div class="col-sm-2" style="margin-top: 5px;">BMI</div>
<div class="col-sm-10">
<input type="number" readonly="readonly" name="observationsValues[]" id="bmi" class="col-sm-12 form-control" />
</div>
</div>
</td>
<!-- check whether to bring a selectable drop down or text box -->
@elseif(!is_null($observation->lower_limit) && !is_null($observation->upper_limit))
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and display the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="{{ old('observationsValues.{$observation_counter}') }}" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="{{ old('observationsValues.{$observation_counter}') }}" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->lower_limit}} - {{ $observation->upper_limit}}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}NewsText" class="text-center"></p>
<input type="hidden" id="{{$observation->slug}}News" name="{{$observation->slug}}News" value="" class="col-sm-12" />
<input type="hidden" name="adult" id="adult" value="adult" class="col-sm-12" />
</td>
@elseif(!is_null($observation->options) && $observation->options!="")
<td style="width: 20%;" class="center">
<!-- check if the observation is compulsory or not and display appropriate compulsory class -->
@if($observation->compulsory == 1)
<select name="observationsValues[]" id="{{$observation->slug}}" class="col-sm-12 compulsory form-control" required>
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@else
<select name="observationsValues[]" id="{{ $observation->slug}}" class="col-sm-12 form-control">
<option value="">--select--</option>
@php
$options = explode(',',$observation->options);
for ($i=0; $i < count($options) ; $i++) {
echo '<option value="'.$options[$i].'">'.$options[$i].'</option>';
}
@endphp
</select>
@endif
</td>
<td colspan="3" style="width: 40%;"></td>
@else
<td style="width: 20%;" class="center">
<!-- check if the observation name is compulsory and dispay the appropriate compulsory class -->
@if($observation->compulsory == 1)
<input type="number" step="0.01" required name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 compulsory form-control" style="width: 100%"/>
@else
<input type="number" step="0.01" name="observationsValues[]" id="{{$observation->slug}}" value="" class="col-sm-12 form-control" style="width: 100%"/>
@endif
</td>
<td style="width: 20%;">
<p style="color: #0000FF" class="text-center"><input type="text" readonly="true" value="{{ $observation->option_for_normal }}" class="form-control" style="color: blue;"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}Kews" class="text-center"></p>
</td>
<td style="width: 10%;">
<p id="{{$observation->slug}}NewsText" class="text-center"></p>
<input type="hidden" id="{{$observation->slug}}News" name="{{$observation->slug}}News" value="" class="col-sm-12" />
<input type="hidden" name="adult" id="adult" value="adult" class="col-sm-12" />
</td>
@endif
</tr>
@php $observation_counter++; @endphp
@endif
@endforeach
@endif
@endif
<tr id="nutritional_status_div" style="display: none">
<td class="text-center"><h5>Nutritional Status</h5></td>
<td class="text-center"><h5 style="color: darkorange" id="nutritional_status_text">MAM</h5></td>
<td class="text-center" colspan="2"><h5 style="color: darkorange" id="nutritional_status_reason">BMI 11.83 < 12.7 (BMIz -2SD)</h5></td>
</tr>
@@ -0,0 +1,47 @@
<div class="row">
<h4 class="heading pull-right">{{ __('layout.priority_signs') }}</h4>
</div>
<div class="row">
<table class="table table-bordered table-primary table-blue table-striped table-vertical-center table-condensed">
<tbody>
<tr>
<th scope="row"><div align="left">{{ __('layout.significant_trauma') }}</div></th>
<td><input type="checkbox" name="trauma" id="trauma" value="Yes"></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.severe_pain') }}</div></th>
<td>
<input type="checkbox" name="severe_pain" id="severe_pain" value="yes">
</td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.oedema_both_feet') }}</div></th>
<td><input type="checkbox" name="oedema" id="oedema" value="yes"></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.urgent_surgical_condition') }}</div></th>
<td><input type="checkbox" name="surgical_condition" id="surgical_condition" value="yes"></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.restless_irritable') }}</div></th>
<td><input type="checkbox" name="continuously_irritable" id="continuously_irritable" value="yes"></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.malnutrition_visible_wasting') }}</div></th>
<td><input type="checkbox" name="severe_wasting" id="severe_wasting" value="yes"></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.severe_pallor') }}</div></th>
<td><input type="checkbox" name="severe_pallor" id="severe_pallor" value="yes"></td>
</tr>
<tr>
<th scope="row"><div align="left">{{ __('layout.burns_major') }}</div></th>
<td><input type="checkbox" name="burns" id="burns" value="yes"></td>
</tr>
</tbody>
</table>
</div>
<div class="alert alert-warning ">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ __('layout.positive_move_child_first') }}.
</div>
@@ -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
@@ -0,0 +1,156 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@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">Smart Triage Report</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 class="active">{{ __('triage.triage') }}</li>
</ol>
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'triage.smart_triage_report', 'method' => 'ANY']) }}
<div class="row">
<div class="col-md-3">
{{ Form::label('start_date',__('stores.start')) }}
<div class="input-group">
{{ Form::text('start_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="col-md-3">
{{ Form::label('end_date',__('stores.end')) }}
<div class="input-group">
{{ Form::text('end_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="col-md-3">
<div class="form-group" style="padding-top: 5px;"><br>
{{ Form::button(__('patient_flow_monitoring.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
</div>
</div>
</div>
{{ Form::close() }}
</div>
<div class="white-box">
<h4><p class="label label-info">From {{ streamline_date($start_date) }} to {{ streamline_date($end_date) }}</p></h4>
<hr>
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table table-striped table-hover">
<thead>
<tr>
<th>Patient Info</th>
<th>Age</th>
<th>Pulse</th>
<th>Temperature</th>
<th>MUAC</th>
<th>Parent Concern</th>
<th>Respiratory Distress</th>
<th>Oedema</th>
<th>Pallor</th>
<th>Risk Score</th>
<th>Recommended Triage Grade</th>
<th>Actual Triage Grade</th>
<th>Date Recorded</th>
<th>Select</th>
</tr>
</thead>
<tbody>
@foreach($records as $record)
<tr>
<td>{{ $record->first_name . ' ' . $record->last_name }} ({{ $record->patients_number }})</td>
<td>{{ get_patients_age($record->date_of_birth) }}</td>
<td>{{ $record->pulse_rate }}</td>
<td>{{ $record->temperature }}</td>
<td>{{ $record->muac }}</td>
<td>
@if($record->parent_concern == 0)
Child Should Not Be Admitted
@else
Child Should Be Admitted
@endif
</td>
<td>
@if($record->respiratory_distress == 1)
Severe
@endif
</td>
<td>
@if($record->oedema == 1)
Oedema of both feet
@endif
</td>
<td>
@if($record->pallor == 1)
Severe pallor
@endif
</td>
<td>{{ round($record->risk_score * 100) }} %</td>
<td>
@if($record->auto_triage_grade == 2)
<b style="color: red">Emergency</b>
@elseif($record->auto_triage_grade == 1)
<b style="color: orange">Priority</b>
@else
<b style="color: green">Non-Urgent</b>
@endif
</td>
<td>
@if($record->selected_triage_grade == 2)
<b style="color: red">Emergency</b>
@elseif($record->selected_triage_grade == 1)
<b style="color: orange">Priority</b>
@else
<b style="color: green">Non-Urgent</b>
@endif
</td>
<td>{{ streamline_date_time($record->created_at) }}</td>
<td>
<a href="/patient_episodes/set_patient_id/{{ $record->patient_id }}" class="btn btn-rounded btn-primary btn-sm"><i class="fa fa-hand-pointer-o"></i> <strong>{{ __('patients.select') }}</strong></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script>
$('#start_date,#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('.table').DataTable({
dom: 'Bfrtip',
ordering: false,
pageLength : 100,
});
</script>
@endpush
@@ -0,0 +1,322 @@
<div class="row m-0 py-4 px-2" style="border: 1px solid #e4e7ea; margin: 5px">
<div class="col-sm-12">
<strong>INTENSIFIED TB CASE FINDING SCREEN: ({{ $age_group_display }})</strong>
</div>
<hr>
<div class="col-sm-12">
DOES THE PATIENT HAVE ANY OF THE FOLLOWING: <input type="radio" name='any_tb_sysmptoms' id='tb_questions_yes'
class="cough_class" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='any_tb_sysmptoms' id='tb_questions_no' class="cough_class" value="0">&nbsp;No
@if ($age_group == 5 || $age_group_display == '> 12 Years')
{{-- adults i.e above 12 years --}}
<ol>
<li>
A cough for more than two weeks ?
</li>
<li>
Persistent fevers for 2 weeks or more ?
</li>
<li>
Noticeable weight loss of more than 3kg ?
</li>
<li>
Excessive night sweats for three weeks or more ?
</li>
</ol>
@elseif($age_group == 4 || $age_group_display == '6 - 12 Years')
{{-- between 6-12 years --}}
<ol>
<li>
A cough for more than two weeks ?
</li>
<li>
Persistent fevers for 2 weeks or more ?
</li>
<li>
Noticeable weight loss ?
</li>
<li>
Excessive night sweats for three weeks or more ?
</li>
</ol>
@elseif(
$age_group == 3 ||
$age_group == 2 ||
$age_group == 1 ||
$age_group_display == '1 - 12 Months' ||
$age_group_display == '0 - 28 Days')
{{-- children below 5 years --}}
<ol>
<li>
A cough for more than two weeks ?
</li>
<li>
Persistent fevers for 2 weeks or more ?
</li>
<li>
Noticeable weight loss ?
</li>
<li>
Poor weight gain in the last one month ?
<br>
<span style="color: red">
(weight loss or “very low weight” = where weight for age is less than -3 z-score, or
“underweight” =
weight for age less than -2 z-score, or “confirmed weight loss”= more than 5% since last visit,
or “growth
curve flattening”).
</span>
</li>
<li>
Contact with a person with pulmonary tuberculosis or chronic cough ?
</li>
</ol>
@endif
<br>
<table class="tb_questions_table table table-bordered" style="display: none; background-color: #f3f3f5;">
@if ($age_group == 5 || $age_group_display == '> 12 Years')
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticeable weight loss of more than 3 Kg?</td>
<td>
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_yes' class="tb_screening_radios"
value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios"
value="0">&nbsp;No
</td>
</tr>
<tr class="excessive_night_sweats_tb_question">
<td>Excessive night sweats for three weeks or more ?</td>
<td>
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
@elseif ($age_group == 4 || $age_group_display == '6 - 12 Years')
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticeable weight loss ?</td>
<td>
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_yes' class="tb_screening_radios"
value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios"
value="0">&nbsp;No
</td>
</tr>
<tr class="excessive_night_sweats_tb_question">
<td>Excessive night sweats for three weeks or more ?</td>
<td>
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_excessive_night_sweats' id='tb_excessive_night_sweats_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
@elseif(
$age_group == 3 ||
$age_group == 2 ||
$age_group == 1 ||
$age_group_display == '1 - 12 Months' ||
$age_group_display == '0 - 28 Days')
{{-- children below 5 years --}}
<tr class="cough_tb_question">
<td>A cough for more than two weeks ?</td>
<td>
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='cough_for_2_weeks' id='cough_for_2_weeks_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="fever_tb_question">
<td>Persistent fevers for 2 weeks or more ?</td>
<td>
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='fever_for_2_weeks' id='fever_for_2_weeks_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="weight_loss_tb_question">
<td>Noticeable weight loss ?</td>
<td>
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="poor_weight_gain_tb_question">
<td>Poor weight gain in the last one month ?
<br>
<span style="color: red">
(weight loss or “very low weight” = where weight for age is<br> less than -3 z-score, or
“underweight” = weight for age less than<br> -2 z-score, or “confirmed weight loss”= more
than 5% since last visit, or “growth curve flattening”).
</span>
</td>
<td>
<input type="radio" name='tb_poor_weight_gain' id='tb_poor_weight_gain_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_poor_weight_gain' id='tb_poor_weight_gain_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
<tr class="contact_with_tb_person_with_tb_question">
<td>Contact with a person with pulmonary TB or chronic cough ?</td>
<td>
<input type="radio" name='tb_contact_with_tb_person' id='tb_contact_with_tb_person_yes'
class="tb_screening_radios" value="1">&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_contact_with_tb_person' id='tb_contact_with_tb_person_no'
class="tb_screening_radios" value="0">&nbsp;No
</td>
</tr>
@endif
</table>
</div>
</div>
<br>
<div class="modal fade" id="TBActionModal" tabindex="-1" role="dialog" aria-labelledby="modalTBActionLabel1"
style="margin-top: 20%">
<div class="modal-dialog modal-dialog-centered" 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">&times;</span></button>
</div>
<div class="modal-body">
<h4 class="modal-title"><u>ACTION NEEDED: <font color=red>Possible TB</font></u></h4><br>
<div class="possible_tb_action_for_coughing" style="display:none; font: bolder">
@if ($age_group == 5 || $age_group_display == '> 12 Years')
<ol>
<li>REQUEST FOR SPUTUM TEST</li>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
<li style="color: red">DIRECT THE PATIENT TO DESIGNATED AREA FOR PEOPLE WITH CHRONIC COUGH
AWAY FROM THE MAIN QUEUE TO REDUCE THE RISK OF CROSS-INFECTION</li>
</ol>
@elseif ($age_group == 4 || $age_group_display == '6 - 12 Years')
<ol>
<li>REQUEST FOR SPUTUM TEST if child can manage</li>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
<li style="color: red">DIRECT THE PATIENT TO DESIGNATED AREA FOR PEOPLE WITH CHRONIC COUGH
AWAY FROM THE MAIN QUEUE TO REDUCE THE RISK OF CROSS-INFECTION</li>
</ol>
@elseif(
$age_group == 3 ||
$age_group == 2 ||
$age_group == 1 ||
$age_group_display == '1 - 12 Months' ||
$age_group_display == '0 - 28 Days')
{{-- children below 5 years --}}
<ol>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
<li style="color: red">DIRECT THE PATIENT TO DESIGNATED AREA FOR PEOPLE WITH CHRONIC COUGH
AWAY FROM THE MAIN QUEUE TO REDUCE THE RISK OF CROSS-INFECTION</li>
</ol>
@endif
</div>
<div class="possible_tb_action_for_non_coughing" style="display:none; font: bolder">
@if ($age_group == 5 || $age_group == 4 || $age_group_display == '6 - 12 Years' || $age_group_display == '> 12 Years')
<ol>
<li>REFER TO CLINICIAN FOR FURTHER INVESTIGATIONS</li>
</ol>
@endif
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@push('scripts')
<script>
$("#tb_questions_no").change(function() {
$(".tb_questions_table").hide();
$(".tb_screening_radios").removeAttr("required");
console.log('no tb screening');
console.log($("#tb_questions_yes").is(':checked'));
})
$("#tb_questions_yes").change(function() {
$(".tb_questions_table").show();
$(".tb_screening_radios").attr('required', 'true');
console.log('yes tb screening');
console.log($("#tb_questions_yes").is(':checked'));
})
$('input[name="cough_for_2_weeks"]').change(function() {
if ($("#cough_for_2_weeks_yes").is(':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").show();
$(".possible_tb_action_for_non_coughing").hide();
}
})
$('input[name="fever_for_2_weeks"]').change(function() {
if ($("#cough_for_2_weeks_yes").is(":not(:checked)") && $("#fever_for_2_weeks_yes").is(':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").hide();
$(".possible_tb_action_for_non_coughing").show();
}
})
$('input[name="tb_weight_loss"]').change(function() {
var ageGroup = <?php echo $age_group; ?>;
console.log(ageGroup);
if ($("#cough_for_2_weeks_yes").is(":not(:checked)") && $("#tb_weight_loss_yes").is(':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").hide();
$(".possible_tb_action_for_non_coughing").show();
}
})
$('input[name="tb_excessive_night_sweats"]').change(function() {
if ($("#cough_for_2_weeks_yes").is(":not(:checked)") && $("#tb_excessive_night_sweats_yes").is(
':checked')) {
//$("#TBActionModal").modal("show");
$(".possible_tb_action_for_coughing").hide();
$(".possible_tb_action_for_non_coughing").show();
}
})
</script>
@endpush