updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
@@ -121,9 +121,6 @@
@endif
@if (is_hiv_and_gbv_screening_tool_enabled())
<script>
alert('Please have this disabled');
</script>
@include('patients::triage.hiv_gbv_screening')
@endif
@@ -269,7 +266,7 @@
<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', 0, false, ['onclick' => 'show_proven_infection_questions()']) }}
<td>{{ Form::radio('child_with_proven_infection', 1, false, ['onclick' => 'show_proven_infection_questions()']) }}
Yes</td>
<td>{{ Form::radio('child_with_proven_infection', 0, false, ['onclick' => 'hide_proven_infection_questions()']) }}
No</td>
@@ -76,10 +76,7 @@
<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.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>
@@ -87,13 +84,13 @@
</tr>
</thead>
<tbody class='symptoms_input_fields_wrap'>
@php
$symptoms_array = explode(',', $triage->symptoms);
$symptoms_duration_array = explode(',', $triage->symptom_duration);
@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 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>";
@@ -124,79 +121,41 @@
$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 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'>
<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'>
<td style="width: 21%">
<div class="row">
<div class="col-sm-3">
<input type="text" style="display: block;" name="duration[]" id="duration[]" class="col-sm-12 form-control" value="{{ $duration_array[0] }}">
</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 class="col-sm-9">
<select style="display: inline-block;" name="time[]" id="time[]" class="col-sm-12 form-control">
<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_0' style='width: 30%'></td>
<td id='symptoms_reference_0'></td>
<td style='width: 1%;'></td>
<td id="symptoms_prompt_{{ $i }}" style="width: 30%"></td>
<td id="symptoms_reference_{{ $i }}"></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
@endfor
@endif
</tbody>
</table>
<a class="btn btn-success btn-xs" onclick="add_symptom_row()"
id="add_row">{{ __('triage.add_row') }}</a>
<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')
@include('patients::triage.edit_tb_screening')
@endif
@if (is_hiv_screening_tool_enabled())
@@ -0,0 +1,296 @@
<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" @if(isset($triage->any_tb_sysmptoms) && $triage->any_tb_sysmptoms == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='any_tb_sysmptoms' id='tb_questions_no' class="cough_class" value="0" @if(isset($triage->any_tb_sysmptoms) && $triage->any_tb_sysmptoms == 0) checked @endif>&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" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 1) checked @endif>&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" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 0) checked @endif>&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" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 1) checked @endif>&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" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 0) checked @endif>&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" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 0) checked @endif>&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" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 1) checked @endif>&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" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 0) checked @endif>&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" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 1) checked @endif>&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" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 0) checked @endif>&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" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 1) checked @endif>&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" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 0) checked @endif>&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" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 0) checked @endif>&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" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 1) checked @endif>&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" @if(isset($triage->tb_excessive_night_sweats) && $triage->tb_excessive_night_sweats == 0) checked @endif>&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" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 1) checked @endif>&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" @if(isset($triage->cough_for_2_weeks) && $triage->cough_for_2_weeks == 0) checked @endif>&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" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 1) checked @endif>&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" @if(isset($triage->fever_for_2_weeks) && $triage->fever_for_2_weeks == 0) checked @endif>&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" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 1) checked @endif>&nbsp;Yes &nbsp;&nbsp;&nbsp;
<input type="radio" name='tb_weight_loss' id='tb_weight_loss_no' class="tb_screening_radios" value="0" @if(isset($triage->tb_weight_loss) && $triage->tb_weight_loss == 0) checked @endif>&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" @if(isset($triage->tb_poor_weight_gain) && $triage->tb_poor_weight_gain == 1) checked @endif>&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" @if(isset($triage->tb_poor_weight_gain) && $triage->tb_poor_weight_gain == 0) checked @endif>&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" @if(isset($triage->tb_contact_with_tb_person) && $triage->tb_contact_with_tb_person == 1) checked @endif>&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" @if(isset($triage->tb_contact_with_tb_person) && $triage->tb_contact_with_tb_person == 0) checked @endif>&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