mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 03:31:31 +00:00
updated streamline-setup v2
This commit is contained in:
+95
-23
@@ -13,6 +13,13 @@
|
||||
background: #b6cce2;
|
||||
border: 1px solid #e4e7ea;
|
||||
}
|
||||
|
||||
.modal_diagnosis {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@@ -51,6 +58,10 @@
|
||||
@php
|
||||
$parent_episode_details = \Streamline\Models\PatientEpisode::find($episode->parent_episode_id);
|
||||
$parent_consultations = \Streamline\Models\Consultation::where(['episode_id' => $parent_episode_details->id])->get();
|
||||
//consultation notes
|
||||
$consultation_notes = \Streamline\Models\WardInpatientDetailedNote::where(['patient_id' => $patient_id, 'episode_id' => $parent_episode_details->id, 'ward_id' => 0])->latest()->get(['investigation_and_management_plan_comments', 'clinic_examination_comments', 'history_comments', 'created_by','created_at']);
|
||||
$consultation_notes_details = count($consultation_notes) > 0 ? $consultation_notes : null;
|
||||
$consultation_notes_created_at = isset($consultation_notes_details) ? streamline_date($consultation_notes_details->pluck('created_at')->first()) : null;
|
||||
$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();
|
||||
|
||||
@@ -818,26 +829,84 @@
|
||||
|
||||
@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
|
||||
@if(check_if_episode_is_a_followup($episode->id) && !is_null($consultation_notes_details))
|
||||
|
||||
<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>
|
||||
{{-- fetch all consultation notes --}}
|
||||
@if ( count($consultation_notes) > 0 )
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<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>
|
||||
{{-- History consultation notes --}}
|
||||
|
||||
<h4>{{ __('consultations.consultation_for_episode_of') }} {{ streamline_date($consultation_notes_created_at) }}</h4>
|
||||
|
||||
<table class="table table-condensed color-bordered-table success-bordered-table " style="table-layout: fixed; width:100%">
|
||||
<tr>
|
||||
<thead>
|
||||
<th colspan="2" class="line-height-table" >{{ __('consultations.history') }}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
</tr>
|
||||
|
||||
@forelse ($consultation_notes as $consultation_note)
|
||||
@if(!empty($consultation_note->history_comments))
|
||||
<tr>
|
||||
<td colspan="2" class="line-height-table" style="width:80%; word-wrap:break-word;"> {{ $consultation_note->history_comments ?? '' }} </td>
|
||||
<td class="line-height-table" style="width:20%; word-wrap:break-word;"> By {{ get_full_name($consultation_note->created_by, 'id', 'first_name', 'last_name', 'users') }} on {{ streamline_date_time($consultation_note->created_at) ?? '' }} </td>
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
@empty
|
||||
{{-- <tr><td colspan="4" class="line-height-table"><code>{{ __('consultations.no_previous_notes') }}</code></td></tr> --}}
|
||||
@endforelse
|
||||
</table>
|
||||
|
||||
{{-- Clinic Examination consultation notes --}}
|
||||
|
||||
<table class="table table-condensed color-bordered-table success-bordered-table " style="table-layout: fixed; width:100%">
|
||||
<tr>
|
||||
<thead>
|
||||
<th colspan="2" class="line-height-table">{{ __('consultations.clinical_examination') }}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
</tr>
|
||||
|
||||
@forelse ($consultation_notes as $consultation_note)
|
||||
@if(!empty($consultation_note->clinic_examination_comments))
|
||||
<tr>
|
||||
<td colspan="2" class="line-height-table" style="width:80%; word-wrap:break-word;"> {{ $consultation_note->clinic_examination_comments ?? '' }} </td>
|
||||
<td class="line-height-table" style="width:20%; word-wrap:break-word;"> By {{ get_full_name($consultation_note->created_by, 'id', 'first_name', 'last_name', 'users') }} on {{ streamline_date_time($consultation_note->created_at) ?? '' }} </td>
|
||||
</tr>
|
||||
@endif
|
||||
@empty
|
||||
|
||||
{{-- <tr><td colspan="4" class="line-height-table"><code>{{ __('consultations.no_previous_notes') }}</code></td></tr> --}}
|
||||
|
||||
@endforelse
|
||||
</table>
|
||||
|
||||
{{-- Investigation and Management Plan consultation notes --}}
|
||||
<table class="table table-condensed color-bordered-table success-bordered-table " style="table-layout: fixed; width:100%">
|
||||
<tr>
|
||||
<thead>
|
||||
<th colspan="2" class="line-height-table">{{ __('consultations.investigation_and_mgt_plan') }}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
</tr>
|
||||
|
||||
@forelse ($consultation_notes as $consultation_note)
|
||||
@if(!empty($consultation_note->investigation_and_management_plan_comments))
|
||||
<tr>
|
||||
<td colspan="2" class="line-height-table" style="width:80%; word-wrap:break-word;"> {{ $consultation_note->investigation_and_management_plan_comments ?? '' }} </td>
|
||||
<td class="line-height-table" style="width:20%; word-wrap:break-word;"> By {{ get_full_name($consultation_note->created_by, 'id', 'first_name', 'last_name', 'users') }} on {{ streamline_date_time($consultation_note->created_at) ?? '' }} </td>
|
||||
</tr>
|
||||
@endif
|
||||
@empty
|
||||
{{-- <tr class="line-height-table"><td colspan="4"><code>{{ __('consultations.no_previous_notes') }}</code></td></tr> --}}
|
||||
@endforelse
|
||||
</table>
|
||||
|
||||
@endif
|
||||
|
||||
{{-- end fetch all consultation notes --}}
|
||||
@endif
|
||||
|
||||
<h4>{{ __('consultations.history') }}</h4>
|
||||
@@ -886,7 +955,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 45%; color: #C85F6A;">
|
||||
<div class="well well-sm" id="primary_diagnosis_prompt">{{ $diagnoses_all->firstWhere('id',$parent_consultation_details->primary_diagnosis)->prompts }} </div>
|
||||
<div class="well well-sm" id="primary_diagnosis_prompt">{{ $diagnoses_all->firstWhere('id',$parent_consultation_details->primary_diagnosis)->prompts?? '' }} </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="well well-sm" id="primary_diagnosis_reference">
|
||||
@@ -2012,8 +2081,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="confirm_diagnosis_modal" tabindex="-1" role="dialog" style="min-width: 400px;position: absolute;top: 80%;left: 10%;">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal fade modal_diagnosis " id="confirm_diagnosis_modal" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
|
||||
<div class="modal-dialog" style="max-width: 60%;" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body form-group">
|
||||
<div class="modal-header"></div>
|
||||
@@ -2027,6 +2096,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@@ -2208,6 +2279,7 @@
|
||||
let prim_diag = $('#primary_diagnosis').val();
|
||||
$('#confirm_primary_diagnosis').val(prim_diag).trigger('change');
|
||||
$('#confirm_diagnosis_modal').modal('toggle');
|
||||
$('#confirm_primary_diagnosis').select2({ width: '96%'});
|
||||
|
||||
}
|
||||
|
||||
@@ -2399,7 +2471,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#primary_diagnosis, #confirm_primary_diagnosis, .procedure_performed_by').select2({
|
||||
$('#primary_diagnosis, .procedure_performed_by').select2({
|
||||
placeholder: "-- select --",
|
||||
width: "100%"
|
||||
});
|
||||
@@ -2460,7 +2532,7 @@
|
||||
function submit_after_confirmation(){
|
||||
let confirmed = $('#confirm_primary_diagnosis').val();
|
||||
$('#primary_diagnosis').val(confirmed).trigger('change');
|
||||
$("<input type='text' value='complete' />").attr("id", "complete_consultation").attr("name", "submit-btn").appendTo("#consultation_form");
|
||||
$("<input type='hidden' value='complete' />").attr("id", "complete_consultation").attr("name", "submit-btn").appendTo("#consultation_form");
|
||||
$('#consultation_form').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user