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
@@ -44,6 +44,7 @@
$parent_consultations = \Streamline\Models\Consultation::where(['episode_id' => $parent_episode_details->id])->get();
$parent_consultation_details = count($parent_consultations) > 0 ? $parent_consultations->first() : null;
$parent_triage_details = \Streamline\Models\Triage::where(['id' => $parent_episode_details->triage_id])->first();
$parent_consultation_notes = \Streamline\Models\WardInpatientDetailedNote::where(['patient_id' => $episode->patient_id, 'episode_id' => $episode->parent_episode_id, 'ward_id' => 0])->get();
if(check_if_episode_is_a_followup($parent_episode_details->id)){
$episode_has_grand_parent_episode = true;
@@ -224,7 +225,7 @@
<code>{{ __('consultations.no_observations_recorded') }}</code>
@endif
{{ __('consultations.triage_done_by') }} {!! isset($triage) ? '<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>' : "" !!}
{{ __('consultations.triage_done_by') }} {!! isset($triage) ? '<font style="color:blue;">'.$users[$triage->created_by].' on '.streamline_date_time($triage->created_at).'</font>' : "" !!}
</div>
</div>
</div>
@@ -685,38 +686,68 @@
@if($consultation_with_notes)
<div class="white-box">
@if(check_if_episode_is_a_followup($episode->id) && !is_null($parent_consultation_details))
@php
$parent_consultation_history = $parent_consultation_details->history_comments;
$parent_consultation_clinical_examination = $parent_consultation_details->clinic_examination_comments;
$parent_consultation_inv_and_mgt = $parent_consultation_details->investigation_and_management_plan_comments;
@endphp
<div class="row">
<div class="col-md-12">
<font color="green"><b>History {{ __('consultations.for_episode_of') }} {{ streamline_date($parent_consultation_details->created_at) }}</b></font>
<textarea class="form-control" name="parent_history_comments" readonly>{{ $parent_consultation_history }}</textarea>
</div>
<h4 class="text-center">Previously Added Consultation Notes</h4>
<div class="row">
<div class="col table-responsive">
<table class="table table-hover color-table success-table table-bordered" style="table-layout:fixed;">
<thead>
<tr>
<th>{{ __('consultations.history') }}</th>
<th>{{ __('consultations.clinical_examination') }}</th>
<th>{{ __('consultations.investigation_and_mgt_plan') }}</th>
<th>{{ __('consultations.date') }}</th>
</tr>
</thead>
<tbody>
@forelse ($consultation_notes as $consultation_note)
<tr>
<td style="word-wrap:break-word;">{{ $consultation_note->history_comments }}</td>
<td style="word-wrap:break-word;">{{ $consultation_note->clinic_examination_comments }}</td>
<td style="word-wrap:break-word;">{{ $consultation_note->investigation_and_management_plan_comments}}</td>
<td style="word-wrap:break-word;">{{ streamline_date_time($consultation_note->created_at) }} <br> by {{ $users[$consultation_note->created_by]?? '' }}</td>
</tr>
@empty
<tr><td colspan="4"><code>No previously added consultation notes.</code></td></tr>
@endforelse
</tbody>
</table>
</div>
<div class="row">
<div class="col-md-12">
<font color="green"><b>{{ __('consultations.clinical_examination') }} {{ __('consultations.for_episode_of') }} {{ streamline_date($parent_consultation_details->created_at) }}</b></font>
<textarea class="form-control" name="parent_clinic_examination_comments" readonly>{{ $parent_consultation_clinical_examination }}</textarea>
</div>
</div>
<div class="row">
<div class="col-md-12">
<font color="green"><b>{{ __('consultations.investigation_and_mgt_plan') }} {{ __('consultations.for_episode_of') }} {{ streamline_date($parent_consultation_details->created_at) }}</b></font>
<textarea class="form-control" name="parent_investigation_and_management_plan_comments" readonly>{{ $parent_consultation_inv_and_mgt }}</textarea>
</div>
</div>
</div>
@if(check_if_episode_is_a_followup($episode->id) && !empty($parent_consultation_notes))
<div class="white-box">
<div class="row">
<div class="col table-responsive">
<table class="table table-hover color-table success-table table-bordered" style="table-layout:fixed;">
<thead>
<tr><th colspan="4">Previously Added Consultation Notes {{ __('consultations.for_episode_of') }} {{ streamline_date($parent_consultation_details->created_at) }}</th></tr>
<tr>
<th>{{ __('consultations.history') }}</th>
<th>{{ __('consultations.clinical_examination') }}</th>
<th>{{ __('consultations.investigation_and_mgt_plan') }}</th>
<th>{{ __('consultations.date') }}</th>
</tr>
</thead>
<tbody>
@forelse ($parent_consultation_notes as $consultation_note)
<tr>
<td style="word-wrap:break-word;">{{ $consultation_note->history_comments }}</td>
<td style="word-wrap:break-word;">{{ $consultation_note->clinic_examination_comments }}</td>
<td style="word-wrap:break-word;">{{ $consultation_note->investigation_and_management_plan_comments}}</td>
<td style="word-wrap:break-word;">{{ streamline_date_time($consultation_note->created_at) }} <br> by {{ $users[$consultation_note->created_by]?? '' }}</td>
</tr>
@empty
<tr><td colspan="4"><code>No previously added consultation notes {{ __('consultations.for_episode_of') }} {{ streamline_date($parent_consultation_details->created_at) }}.</code></td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
@endif
<div class="row">
{{-- <div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover color-table success-table table-bordered">
@@ -733,46 +764,8 @@
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover color-table success-table table-bordered">
<thead>
<tr>
<th>{{ __('consultations.clinical_examination') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{!! ($consultation->clinic_examination_comments) ? nl2br(e($consultation->clinic_examination_comments)) : "No comments available" !!}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover color-table success-table table-bordered">
<thead>
<tr>
<th>{{ __('consultations.investigation_and_mgt_plan') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{!! ($consultation->investigation_and_management_plan_comments) ? nl2br(e($consultation->investigation_and_management_plan_comments)) : "No comments available" !!}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div> --}}
@endif
<div class="white-box">