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
@@ -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