mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
resolved conflicts
This commit is contained in:
Executable
+1520
File diff suppressed because it is too large
Load Diff
+980
@@ -0,0 +1,980 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<style type="text/css">
|
||||
button.h-100.br-5 {
|
||||
min-height: 4rem;
|
||||
}
|
||||
|
||||
#t_header th {
|
||||
background-color: #708090;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.color-tr {
|
||||
background: #FFFF99;
|
||||
}
|
||||
|
||||
.admitted_row_color {
|
||||
background: #d9edf7;
|
||||
}
|
||||
|
||||
.theatre_row_color {
|
||||
background: #f2e6ff;
|
||||
}
|
||||
|
||||
.appointment_row_color {
|
||||
background: #e4e0a8;
|
||||
}
|
||||
|
||||
.aTable tr {
|
||||
background-color: #DDD;
|
||||
}
|
||||
|
||||
.table_no_padding td {
|
||||
padding: 4px;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('patient_episode.patient_episodes') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('patient_episode.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('patients.index') }}">{{ __('patient_episode.patients') }}</a></li>
|
||||
<li class="active">{{ __('patient_episode.episodes') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::patient_episodes.menu')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::open(['route' => 'patient_episodes.route_patient_episode', 'id' => 'episodesForm']) }}
|
||||
|
||||
{{ Form::hidden('patient_id', $patient->id, ['id' => 'patient_id']) }}
|
||||
|
||||
<div class="white-box br-5">
|
||||
@include('flash::message')
|
||||
@if(Auth::user()->can('merge-patient-episodes'))
|
||||
<p>
|
||||
<a class="btn btn-warning btn-sm btn-rounded" style="background-color: #d4984a; float:right" target="_blank" href="{{ url('episode_merge_preview') }}"><strong>{{ __('patient_episode.merge_episodes') }}</strong></a><br>
|
||||
</p>
|
||||
@endif
|
||||
<div class="table-responsive">
|
||||
<table class="table color-table success-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('patient_episode.episode_date') }}</th>
|
||||
<th>{{ __('patient_episode.clinic') }}</th>
|
||||
<th>{{ __('patient_episode.patient_diagnosis') }}</th>
|
||||
<th>{{ __('patient_episode.consultation_by') }}</th>
|
||||
<th>{{ __('patient_episode.comments') }}</th>
|
||||
<th>{{ __('patient_episode.select') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($patient_episodes as $patient_episode)
|
||||
@php
|
||||
$episode_id = $patient_episode->id;
|
||||
$created_at = Carbon\Carbon::parse($patient_episode->created_at);
|
||||
$triage_id = $patient_episode->triage_id;
|
||||
$anc = \DB::table('ante_natal_clinic_followups')->where([['episode_id', $episode_id],['patient_id', $patient_episode->patient_id]])->first();
|
||||
$consultation_id = !empty($anc->primary_diagnosis)? $anc->primary_diagnosis:$patient_episode->consultation_id;
|
||||
$primary_diagnosis_id = '';
|
||||
$other_diagnoses_ids = [];
|
||||
$triage_comment = '';
|
||||
$consultation_comment = '';
|
||||
$clinic = (isset($clinics[$patient_episode->clinic_id]) && !is_null($patient_episode->clinic_id)) ? $clinics[$patient_episode->clinic_id] : '';
|
||||
$primary_diagnosis = '';
|
||||
$other_diagnoses = '';
|
||||
$triage_and_consultation_comments = '';
|
||||
$right_eye_diagnoses = $left_eye_diagnoses = [];
|
||||
$eye_consultation_comment = "";
|
||||
$eye_triage_comment = '';
|
||||
$eye_triage_and_consultation_comments = "";
|
||||
@endphp
|
||||
|
||||
@if (!empty($consultation_id))
|
||||
@php
|
||||
$primary_diagnosis_id = !empty($anc->primary_diagnosis)? $anc->primary_diagnosis: get_name($consultation_id, 'id', 'primary_diagnosis', 'consultations');
|
||||
|
||||
try {
|
||||
$other_diagnoses_ids = !empty($anc->other_diagnoses)? explode(',',$anc->other_diagnoses): unserialize(trim(get_name($consultation_id, 'id', 'other_diagnoses', 'consultations')));
|
||||
} catch (\ErrorException $exception) {}
|
||||
|
||||
// confirm it's an array
|
||||
$other_diagnoses_ids = is_array($other_diagnoses_ids) ? $other_diagnoses_ids : [];
|
||||
|
||||
$consultation_comment = !empty($anc->comments)? trim($anc->comments): trim(get_name($consultation_id, 'id', 'comments', 'consultations'));
|
||||
$consultation_comment = clean_streamline_database_output(trim(get_name($consultation_id, 'id', 'comments', 'consultations')));
|
||||
$triage_comment = !is_null($triage_id) ? trim(get_name($triage_id, 'id', 'comments', 'triage')) : '';
|
||||
$triage_and_consultation_comments = '<b>Triage: </b>'.$triage_comment.' '.'<br><b>Consultation: </b>'.$consultation_comment;
|
||||
|
||||
$right_eye_diagnoses = explode(',',get_name($consultation_id, 'id', 'right_eye_diagnosis', 'eye_clinic_main_exam'));
|
||||
$left_eye_diagnoses = explode(',',get_name($consultation_id, 'id', 'left_eye_diagnosis', 'eye_clinic_main_exam'));
|
||||
$eye_consultation_comment = trim(get_name($consultation_id, 'id', 'advice', 'eye_clinic_main_exam'));
|
||||
$eye_triage_comment = !is_null($triage_id) ? trim(get_name($triage_id, 'id', 'comment', 'eye_clinic_base_exam_refraction')) : '';
|
||||
$eye_triage_and_consultation_comments = '<b>Base Refraction Exam: </b>'.$eye_triage_comment.' '.'<br><b>Main Exam: </b>'.$eye_consultation_comment;
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@php
|
||||
$primary_diagnosis = $diagnoses[$primary_diagnosis_id] ?? '';
|
||||
$other_diagnoses = "";
|
||||
|
||||
for($s = 0; $s < count($other_diagnoses_ids); $s++){
|
||||
$other_diagnoses .= isset($diagnoses[$other_diagnoses_ids[$s]]) ? ($diagnoses[$other_diagnoses_ids[$s]] . ", ") : '';
|
||||
}
|
||||
|
||||
$is_patient_in_eye_clinic = is_patient_in_eye_clinic($episode_id);
|
||||
@endphp
|
||||
|
||||
<tr id='my_row{{ $episode_id }}'>
|
||||
<td>
|
||||
<a href="#" style="color: #0099CC">{{ streamline_date_time($patient_episode->created_at) }} </a>
|
||||
<br>
|
||||
<small>{{ __('patient_episode.started_by') }}</small>
|
||||
<small style="color: blue">{{ get_full_name($patient_episode->created_by, "id", "first_name", "last_name", "users") }}</small>
|
||||
|
||||
@if(check_if_episode_is_a_followup($patient_episode->id))
|
||||
@php
|
||||
$original_episode = \Streamline\Models\PatientEpisode::find($patient_episode->parent_episode_id);
|
||||
@endphp
|
||||
<small style="color: green"><br>({{ __('patient_episode.review_from') }} {{ $original_episode ? streamline_date($original_episode->created_at) : '' }})</small>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->can('delete-empty-episode') && is_episode_safe_to_delete($patient_episode->id))
|
||||
<br>
|
||||
<br>
|
||||
<a class="btn btn-danger btn-sm" href="/patient_episodes/delete_episode/{{ $patient_episode->id }}" onclick="return confirm('Are you sure you want to delete this episode?')">{{ __('patient_episode.remove_episode') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if( Auth::user()->can('view-patient-episode-clinic-from-patient-home'))
|
||||
{{ $clinic }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if( Auth::user()->can('view-patient-episode-primary-diagnoses'))
|
||||
@if(is_eye_module_enabled() && $is_patient_in_eye_clinic)
|
||||
@if(count($right_eye_diagnoses) > 0)
|
||||
@for($x = 0; $x < count($right_eye_diagnoses); $x++)
|
||||
{{ get_name(get_name($right_eye_diagnoses[$x], 'id', 'diagnosis_category', 'diagnoses'), 'id', 'name', 'diagnosis_categories') }} - {{ $diagnoses[$right_eye_diagnoses[$x]] ?? '' }}<br/>
|
||||
@endfor
|
||||
@endif
|
||||
@else
|
||||
{{ __('patient_episode.primary_diagnosis') . ': ' . $primary_diagnosis }}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<hr>
|
||||
|
||||
@if( Auth::user()->can('view-patient-episode-other-diagnoses'))
|
||||
@if(is_eye_module_enabled() && $is_patient_in_eye_clinic)
|
||||
@if(count($left_eye_diagnoses) > 0)
|
||||
@for($x = 0; $x < count($left_eye_diagnoses); $x++)
|
||||
{{ get_name(get_name($left_eye_diagnoses[$x], 'id', 'diagnosis_category', 'diagnoses'), 'id', 'name', 'diagnosis_categories') }} - {{ $diagnoses[$left_eye_diagnoses[$x]] ?? '' }}<br/>
|
||||
@endfor
|
||||
@endif
|
||||
@else
|
||||
{!! __('patient_episode.other_diagnosis') . ': <br>' !!}
|
||||
{!! read_more($other_diagnoses, 'other_diagnoses_short' . $patient_episode->id, 'other_diagnoses_long' . $patient_episode->id) !!}
|
||||
|
||||
<div id="other_diagnoses_long{{ $patient_episode->id }}" style="display: none;">
|
||||
{!! $other_diagnoses !!}<br/>
|
||||
<a class="read_more" style="color : #0099CC;" onclick= "hide('other_diagnoses_long{{ $patient_episode->id }}');show('other_diagnoses_short{{ $patient_episode->id }}');">{{ __('patient_episode.read_less') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
@php
|
||||
$consultation_done_by = !empty($anc->created_by)? $anc->created_by :get_doctor_who_completed_episode_consultation($patient_episode->id);
|
||||
@endphp
|
||||
|
||||
@if(!is_null($consultation_done_by))
|
||||
{{ get_full_name($consultation_done_by, "id", "first_name", "last_name", "users") }}
|
||||
@endif
|
||||
|
||||
@if($patient_episode->episode_type == 1)
|
||||
<span>{{ __('patient_flow_monitoring.lab_self_request') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
{!! read_more($triage_and_consultation_comments, 'short_comment' . $patient_episode->id, 'long_comment' . $patient_episode->id) !!}
|
||||
|
||||
<div id="long_comment{{ $patient_episode->id }}" style="display: none;">
|
||||
{!! $triage_and_consultation_comments !!}<br/>
|
||||
<a class="read_more" style="color : #0099CC;" onclick= "hide('long_comment{{ $patient_episode->id }}');show('short_comment{{ $patient_episode->id }}');">{{ __('patient_episode.read_less') }}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" onchange="show('menu1'), hide('theatre_menu'), hide('menu2'), hide('pic1'), hide('menu_maternity'), manage_eye_menus('{{ $is_patient_in_eye_clinic }}')" class="radio-option center" name="episode_id" id="episode_id_{{ $patient_episode->id }}" value="{{ $patient_episode->id }}" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$inpatient_info = get_all_first(['episode_id' => $patient_episode->id, 'patient_id' => $patient->id], 'inpatient_info');
|
||||
$maternity_ward_id = get_name("maternity", "slug", "id", "wards");
|
||||
@endphp
|
||||
@if ($inpatient_info != 'N/A')
|
||||
<tr id='my_row2{{ $inpatient_info->episode_id }}' class="admitted_row_color">
|
||||
<td style='background-color: white; font-size: smaller;'>
|
||||
@if($inpatient_info->discharged)
|
||||
<a style="color: #0099CC">{{ __('patient_episode.discharged') }} on {{ streamline_date($inpatient_info->discharged_on) }}</a>
|
||||
<br><small style="color: blue">By {{ get_full_name($inpatient_info->discharged_by, "id", "first_name", "last_name", "users") }}</small>
|
||||
@else
|
||||
<a style="color: #0099CC">{{ __('patient_episode.admitted') }} on {{ streamline_date($inpatient_info->admitted_on) }}</a>
|
||||
<br><small style="color: blue">By {{ get_full_name($inpatient_info->created_by, "id", "first_name", "last_name", "users") }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td> {{ get_name($inpatient_info->ward_id, "id", "name", "wards") }} </td>
|
||||
@php
|
||||
$sec_diagnoses = (!is_null($inpatient_info->other_diagnoses) && !is_null(unserialize($inpatient_info->other_diagnoses))) ? array_values(unserialize($inpatient_info->other_diagnoses)) : [] ;
|
||||
$sec_diagnosis = "";
|
||||
for ($s = 0; $s < count($sec_diagnoses); $s++) $sec_diagnosis .= get_name($sec_diagnoses[$s], "id", "name", "diagnoses") . ", ";
|
||||
@endphp
|
||||
<td>
|
||||
@if( Auth::user()->can('view-patient-episode-primary-diagnoses'))
|
||||
{{ get_name($inpatient_info->primary_diagnosis, "id", "name", "diagnoses") }}
|
||||
@endif
|
||||
|
||||
@if( Auth::user()->can('view-patient-episode-other-diagnoses'))
|
||||
{!! read_more($sec_diagnosis, 'sec_diagnosis_short' . $episode_id, 'sec_diagnosis_long' . $episode_id) !!}
|
||||
<div id="sec_diagnosis_long{{ $episode_id }}" style="display: none;">
|
||||
{!! $sec_diagnosis !!}<br/>
|
||||
<a class="read_more" style="color : #0099CC;" onclick= "hide('sec_diagnosis_long{{ $episode_id }}');show('sec_diagnosis_short{{ $episode_id }}');">{{ __('patient_episode.read_less') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
@php
|
||||
$consultation_done_by = !empty($anc->created_by)? $anc->created_by :get_doctor_who_has_done_episode_consultation($patient_episode->patient_id, $patient_episode->id);
|
||||
@endphp
|
||||
|
||||
@if(!is_null($consultation_done_by))
|
||||
{{ get_full_name($consultation_done_by, "id", "first_name", "last_name", "users") }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{!! read_more($inpatient_info->comments, 'short_inpatient_comment' . $inpatient_info->id, 'long_inpatient_comment' . $inpatient_info->id) !!}
|
||||
|
||||
<div id="long_inpatient_comment{{ $inpatient_info->id }}" style="display: none;">
|
||||
{!! $inpatient_info->comments !!}<br/>
|
||||
<a class="read_more" style="color : #0099CC;" onclick= "hide('long_inpatient_comment{{ $inpatient_info->id }}');show('short_inpatient_comment{{ $inpatient_info->id }}');">{{ __('patient_episode.read_less') }}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@if(get_name($inpatient_info->ward_id, "id", "slug", "wards") == "maternity")
|
||||
<input type="radio" onchange="show('menu_maternity'), hide('theatre_menu'), hide('menu1'), hide('menu2'), hide('pic1')" class="radio-option-inpatient center" name="episode_id" id="episode_id" value="{{ $patient_episode->id }}"/>
|
||||
@else
|
||||
<input type="radio" onchange="show('menu2'), hide('theatre_menu'), hide('menu_maternity'), hide('menu1'), hide('pic1')" class="radio-option-inpatient center" name="episode_id" id="episode_id" value="{{ $patient_episode->id }}"/>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$theatre_information = does_episode_have_theatre_information($patient_episode->id);
|
||||
@endphp
|
||||
|
||||
@if ($theatre_information)
|
||||
<tr id='my_row3' class="theatre_row_color">
|
||||
<td style='background-color: white; font-size: smaller;'>
|
||||
@if($theatre_information['surgery_completed'])
|
||||
<span style="color: green">{{ __('patient_episode.surgery_complete') }}</span>
|
||||
@else
|
||||
<span style="color: red">{{ __('patient_episode.surgery_not_complete') }}</span>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
@if($theatre_information['anaesthesia_completed'])
|
||||
<span style="color: green">{{ __('patient_episode.anaesthesia_complete') }}</span>
|
||||
@else
|
||||
<span style="color: red">{{ __('patient_episode.anaesthesia_not_complete') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ __('patient_episode.procedure') }}: {{ $theatre_information['procedure_name'] }}
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ __('patient_episode.surgery_type') }}: {{ $theatre_information['surgery_type'] }}
|
||||
</td>
|
||||
<td>{{ __('patient_episode.outcome') }}: {{ $theatre_information['outcome'] }}</td>
|
||||
<td class="hidden-phone">
|
||||
@php
|
||||
$consultation_done_by = !empty($anc->created_by)? $anc->created_by :get_doctor_who_has_done_episode_consultation($patient_episode->patient_id, $patient_episode->id);
|
||||
@endphp
|
||||
|
||||
@if(!is_null($consultation_done_by))
|
||||
{{ get_full_name($consultation_done_by, "id", "first_name", "last_name", "users") }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{!! read_more($theatre_information['comments'], 'short_theatre_comment' . $patient_episode->id, 'long_theatre_comment' . $patient_episode->id) !!}
|
||||
|
||||
<div id="long_theatre_comment{{ $patient_episode->id }}" style="display: none;">
|
||||
{!! $theatre_information['comments'] !!}<br/>
|
||||
<a class="read_more" style="color : #0099CC;" onclick= "hide('long_theatre_comment{{ $patient_episode->id }}');show('short_theatre_comment{{ $patient_episode->id }}');">{{ __('patient_episode.read_less') }}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" onchange="show('theatre_menu'), hide('menu_maternity'), hide('menu1'), hide('menu2'), hide('pic1')" class="radio-option-inpatient center" name="episode_id" id="episode_id" value="{{ $patient_episode->id }}"/>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$episode_appointment = get_all_first(['episode_id' => $patient_episode->id, 'patient_id' => $patient->id], 'patient_appointments');
|
||||
@endphp
|
||||
|
||||
@if($episode_appointment != 'N/A' && $episode_appointment->appointment_fulfilled == 1)
|
||||
<tr id='my_row4' class="appointment_row_color">
|
||||
<td style='background-color: white; font-size: small;'>
|
||||
@if($episode_appointment->appointment_fulfilled == 1)
|
||||
<span style="color: red">{{ __('patient_episode.follow_up') }}</span>
|
||||
@else
|
||||
<span style="color: red">{{ __('patient_episode.follow_up_complete') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td><b>{{ __('patient_episode.clinic') }}:</b> {{ get_name($episode_appointment->clinic_allocation, 'id', 'name', 'clinics') }}</td>
|
||||
<td>
|
||||
<b>{{ __('patient_episode.appointment_date') }}:</b> {{ is_null($episode_appointment->appointment_date) ? '' : streamline_date($episode_appointment->appointment_date) }}
|
||||
<br><br>
|
||||
<b>{{ __('patient_episode.in_charge') }}:</b> {{ get_full_name($episode_appointment->incharge_id, 'id', 'first_name', 'last_name', 'users') != "ALL STAFF" ? get_full_name($episode_appointment->incharge_id, 'id', 'first_name', 'last_name', 'users') : "N/A" }}
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
@php
|
||||
$consultation_done_by = !empty($anc->created_by)? $anc->created_by : get_doctor_who_has_done_episode_consultation($patient_episode->patient_id, $patient_episode->id);
|
||||
@endphp
|
||||
|
||||
@if(!is_null($consultation_done_by))
|
||||
{{ get_full_name($consultation_done_by, "id", "first_name", "last_name", "users") }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $episode_appointment->comments }}</td>
|
||||
<td>
|
||||
<input type="radio" onchange="show('menu1'), hide('theatre_menu'), hide('menu2'), hide('pic1'), hide('menu_maternity')" class="radio-option center" name="episode_id" id="episode_id_{{ $patient_episode->id }}" value="{{ $patient_episode->id }}" />
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu1" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12 eye_button" value="base_refraction_exam">Base Refraction Exam</button>
|
||||
|
||||
@if(Auth::user()->can('perform-triage') && !is_add_attendance_to_consultation_enabled())
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12 normal_button" value="triage">{{ __('patient_episode.triage') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12 eye_button" value="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 normal_button" value="consultation" id="consultation_button">{{ __('patient_episode.consultation') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('create-prescription'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="prescription">{{ __('patient_episode.prescriptions') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('order-for-investigations'))
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown" class="btn btn-sm btn-success dropdown-toggle waves-effect waves-light btn-block" type="button">{{ __('patient_episode.investigations') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
<li><button type="submit" name="submit" class="btn btn-link w-100 h-100" value="investigations" >{{ __('patient_episode.investigations') }}</button></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/investigations/view_historical_results_labs/{{ $patient->id }}" style="text-align:center; color:black" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_investigations') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('order-for-procedures'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm btn-block" value="procedure">{{ __('patient_episode.procedures') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button class="btn btn-success btn-sm btn-block" type="submit" name="submit" value="patient_document">{{ __('patient_episode.add_document') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('order-for-sundries'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm btn-block" value="sundries">{{ __('patient_episode.sundries') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('order-for-services-from-patient-home'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="services">{{ __('patient_episode.services') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('view-episode-summary'))
|
||||
<button type="button" class="btn btn-primary btn-sm btn-block" id="patient_file">{{ __('patient_episode.episode_summary') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('transfer-patient-internally'))
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown" class="btn btn-primary btn-sm dropdown-toggle btn-block" type="button">{{ __('patient_episode.internal_transfer') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
<li><button type="button" class="btn btn-primary btn-sm btn-block" id="internal_transfer">{{ __('patient_episode.clinic_transfer') }}</button></li>
|
||||
<li><button type="button" class="btn btn-info btn-sm btn-block" id="doctor_transfer">{{ __('patient_episode.doctor_transfer') }}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('view-death-report'))
|
||||
<button type="submit" name="submit" id="death_report_btn" value="death_report_btn" class="btn btn-sm btn-block btn-inverse" >NIRA {{ __('patient_episode.death_report') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('create-theatre-surgery') || Auth::user()->can('create-theatre-anaesthesia'))
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown" class="btn btn-info btn-sm dropdown-toggle waves-effect waves-light col-sm-12" type="button">{{ __('patient_episode.theatre') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
<li><button type="submit" name="submit" value="create_anaesthetics" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_anaesthetics') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="anaesthetics_history" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_anaesthetics') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="create_surgery" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_surgery') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="surgery_index" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_surgeries') }}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('perform-triage-without-etat'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="triage_without_etat">{{ __('patient_episode.triage_without') }} ETAT</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('create-consultation-with-notes'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="consultation_with_notes">{{ __('patient_episode.consultation_with_notes') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('drug-refill'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="drug_refill">{{ __('patient_episode.drug_refill') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if(Auth::user()->can('drug-refill') && is_patient_category_pay_later($patient->category_id))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="edit_claim_number">{{ __('patient_episode.edit_claim_number') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('admit-patient-from-patient-home'))
|
||||
<button type="button" name="admit_patient" class="btn btn-success btn-sm col-sm-12" id="admit_patient">{{ __('patient_episode.admit_patient') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('record-staff-service-performance'))
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="record_all_items">{{ __('patient_episode.order_multiple_items') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div> <br>
|
||||
<div class="row">
|
||||
@if(Auth::user()->can('order-for-eye-glasses') && is_eye_module_enabled())
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-sm col-sm-12" value="eye_glasses">Order Opticals</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- maternity menu at the shown at the bottom -->
|
||||
<div class="white-box" id="menu_maternity" style="display: none;">
|
||||
<div class="row">
|
||||
@if(Auth::user()->can('view-maternity-admission'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="maternity_admission" class="btn btn-success btn-sm btn-block">{{ __('patient_episode.maternity_admission') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-delivery-record'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="delivery_record" class="btn btn-success btn-sm btn-block" >{{ __('patient_episode.delivery_record') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-inpatient-sheet'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="maternity_summary" class="btn btn-success btn-sm btn-block" >{{ __('patient_episode.inpatient_sheet') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-birth-report'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="birth_report" class="btn btn-sm btn-inverse btn-block" >NIRA {{ __('patient_episode.birth_report') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-2">
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown" class="btn btn-sm btn-info dropdown-toggle waves-effect waves-light btn-block" type="button">{{ __('patient_episode.theatre') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
@if(Auth::user()->can('create-anaesthetics'))
|
||||
<li><button type="submit" name="submit" value="create_anaesthetics" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_anaesthetics') }}</button></li>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-anaesthetics-history'))
|
||||
<li><button type="submit" name="submit" value="anaesthetics_history" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_anaesthetics') }}</button></li>
|
||||
@endif
|
||||
@if(Auth::user()->can('create-surgery'))
|
||||
<li><button type="submit" name="submit" value="create_surgery" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_surgery') }}</button></li>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-surgery'))
|
||||
<li><button type="submit" name="submit" value="surgery_index" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_surgeries') }}</button></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu2" style="display: none;">
|
||||
<div class="row">
|
||||
@if(Auth::user()->can('view-inpatient-sheet'))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block btn-sm" value="inpatient-sheet-button">{{ __('patient_episode.inpatient_sheet') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-inpatient-billing'))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block btn-sm" value="inpatient_billing">{{ __('patient_episode.inpatient_billing') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('issue-inpatient-attendant-pass'))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-default btn-block btn-sm" value="inpatient_attendant_pass">{{ __('patient_episode.inpatient_attendant_pass') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-primary btn-block btn-sm" value="treatment_sheet">{{ __('patient_episode.treatment_sheet') }}</button>
|
||||
</div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-2">
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown" class="btn btn-info dropdown-toggle waves-effect waves-light btn-sm btn-block " type="button">{{ __('patient_episode.theatre') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
<li><button type="submit" name="submit" value="create_anaesthetics" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_anaesthetics') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="anaesthetics_history" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_anaesthetics') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="create_surgery" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_surgery') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="surgery_index" class="btn btn-default btn-sm btn-link">{{ __('patient_episode.historical_surgeries') }}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="theatre_menu" style="display: none;">
|
||||
<div class="row">
|
||||
@if(Auth::user()->can('create-anaesthetics'))
|
||||
<div class="col-md-3">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block" value="create_anaesthetics">{{ __('patient_episode.theatre_anaesthetics') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-anaesthetics-history'))
|
||||
<div class="col-md-3">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block" value="anaesthetics_history">{{ __('patient_episode.historical_anaesthetics') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('create-surgery'))
|
||||
<div class="col-md-3">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block" value="create_surgery">{{ __('patient_episode.theatre_surgery') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-surgery'))
|
||||
<div class="col-md-3">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block" value="surgery_index">{{ __('patient_episode.historical_surgeries') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="white-box" id="pic1" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-sm-8"></div>
|
||||
<div class="col-sm-4">
|
||||
<img src="KH_photos/Picture3.jpg" style="max-height: 250px; margin: auto;" class="image-preview" alt="child" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="modal hide fade" id="modal-age">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{{ __('patient_episode.select_a_patient') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
{{ __('patient_episode.select_patient_warning') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn btn-danger" data-dismiss="modal">{{ __('patient_episode.close') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="internal_transfer_dialog" 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">×</span></button>
|
||||
<h4 class="modal-title">{{ __('patient_episode.internal_transfer') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{{ Form::label('current_clinic', __('patient_episode.current_clinic')) }}
|
||||
{{ Form::hidden('current_clinic_id', 0, ['id' => 'current_clinic_id']) }}
|
||||
{{ Form::hidden('current_triage_id', 0, ['id' => 'current_triage_id']) }}
|
||||
{{ Form::hidden('current_episode_id', 0, ['id' => 'current_episode_id']) }}
|
||||
{{ Form::text('current_clinic', '', ['class' => 'form-control compulsory', 'readonly', 'id' => 'current_clinic_transfer']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('transfered_from_doctor', __('patient_episode.transfer_from_doctor')) }}
|
||||
{{ Form::select('transfered_from_doctor', $users_array, '', ['class' => 'form-control transferedToDoctor', 'id' => 'transfer_from_doctor']) }}
|
||||
</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']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('transfered_to_doctor', __('patient_episode.transfer_to_doctor')) }}
|
||||
{{ Form::select('transfered_to_doctor', $users_array, '', ['class' => 'form-control transferedToDoctor', 'id' => 'transfer_to_doctor']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('patient_episode.close') }}</button>
|
||||
<button type="button" class="btn btn-success" id="submit_clinic_transfer" >{{ __('patient_episode.transfer_patient') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="doctor_transfer_dialog" 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">×</span></button>
|
||||
<h4 class="modal-title">{{ __('patient_episode.transfer_doctor') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{{ Form::hidden('dt_episode_id', 0, ['id' => 'dt_episode_id']) }}
|
||||
{{ Form::label('transfered_from_doctor', __('patient_episode.transfer_from_doctor')) }}
|
||||
{{ Form::text('dt_from_doctor', '', ['class' => 'form-control', 'readonly', 'id' => 'dt_doctor_from']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('transfered_to_doctor', __('patient_episode.transfer_to_doctor')) }}
|
||||
@php $users_array = ['remove_from_doctor' => 'Remove from assigned doctor'] + $users_array; @endphp
|
||||
{{ Form::select('dt_doctor_to', $users_array, '', ['class' => 'form-control transferedDtToDoctor', 'id' => 'dt_doctor_to']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('patient_episode.close') }}</button>
|
||||
<button type="button" class="btn btn-success" id="submit_doctor_transfer" >{{ __('patient_episode.transfer_patient') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ward_admission_episode" 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">×</span></button>
|
||||
<h4 class="modal-title">{{ __('layout.ward_admission') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.admit_patient_with_episode']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id, ['id' => 'patient_id']) }}
|
||||
{{ Form::hidden('episode_admission_episode_id', 0, ['id' => 'episode_admission_episode_id']) }}
|
||||
|
||||
{{ Form::label('admission_ward_id', __('layout.select_ward')) }}
|
||||
{{ Form::select('admission_ward_id', $wards, '', ['class' => 'form-control', 'required' => 'true']) }}
|
||||
<br>
|
||||
{{ Form::label('ward_admission_date', __('layout.admission_date')) }}
|
||||
<input type="date" class="form-control" name="ward_admission_date" id="ward_admission_date" value="{{ date('Y-m-d') }}" required="true">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm" onclick="return confirm('<?php echo __('layout.are_you_sure_admit'); ?>');">{{ __('layout.continue_ward_admission') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(session()->has('consultation_not_paid'))
|
||||
<div class="modal fade" id="unpaid_consultation_warning" 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">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h4 style="color: red">{{ __('patient_episode.patient_not_paid_consultation') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('patient_episode.okay') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@php session()->forget('consultation_not_paid'); @endphp
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('js/streamline_plugins/jquery.session.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#admit_patient").click(function () {
|
||||
$.ajax({
|
||||
url: '/inpatient/check_for_open_admissions/' + $('#patient_id').val(),
|
||||
type: 'get',
|
||||
success: function (response) {
|
||||
if (response > 0) {
|
||||
$("#modal_patient_already_admitted").modal("show");
|
||||
} else {
|
||||
let current_episode_id = $('input[name=episode_id]:checked').val();
|
||||
$("#episode_admission_episode_id").val(current_episode_id);
|
||||
$("#ward_admission_episode").modal("show");
|
||||
$('#admission_ward_id').select2();
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#patient_file").click(function () {
|
||||
let current_episode_id = $('input[name=episode_id]:checked').val();
|
||||
|
||||
let win = window.open('/patients/episode_summary/' + current_episode_id, '_blank');
|
||||
if (win) {
|
||||
win.focus();
|
||||
} else {
|
||||
alert("Please allow pop-ups for this system")
|
||||
}
|
||||
});
|
||||
|
||||
$("#internal_transfer").click(function () {
|
||||
let current_episode_id = $('input[name=episode_id]:checked').val();
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/patient_episodes/internal_clinic_transfer/" + current_episode_id,
|
||||
success: function (result) {
|
||||
if (result != 0) {
|
||||
let arr = result.split(',');
|
||||
$('#current_clinic_transfer').val(arr[2]);
|
||||
$('#current_clinic_id').val(arr[1]);
|
||||
$('#current_triage_id').val(arr[0]);
|
||||
$('#current_episode_id').val(current_episode_id);
|
||||
$('#internal_transfer_dialog').modal('show');
|
||||
} else {
|
||||
alert("<?php echo __('patient_episode.triage_not_performed') ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#submit_clinic_transfer").click(function () {
|
||||
let transfer_clinic = $("#transfer_to").val();
|
||||
let clinic = $("#current_clinic_id").val();
|
||||
let triage_id = $("#current_triage_id").val();
|
||||
let episode_id = $("#current_episode_id").val();
|
||||
let patient_id = $('#patient_id').val();
|
||||
let transfer_to_doctor = $('#transfer_to_doctor').val();
|
||||
let transfer_from_doctor = $('#transfer_from_doctor').val();
|
||||
|
||||
if (transfer_clinic == 0) {
|
||||
alert("<?php echo __('patient_episode.select_new_clinic') ?>");
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/patient_episodes/save_internal_clinic_transfer",
|
||||
data: {new_clinic: transfer_clinic, old_clinic: clinic, triage_id: triage_id, episode_id: episode_id, patient_id: patient_id, transfer_from_doctor: transfer_from_doctor, transfer_to_doctor: transfer_to_doctor},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result == 1) {
|
||||
alert("<?php echo __('patient_episode.patient_transfer_successful') ?>");
|
||||
location.reload();
|
||||
} else {
|
||||
alert("<?php echo __('patient_episode.patient_transfer_failed') ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#doctor_transfer").click(function (e) {
|
||||
e.preventDefault();
|
||||
let episode_id = $('input[name=episode_id]:checked').val();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/patient_episodes/get_assigned_doctor/" + episode_id,
|
||||
success: function (result) {
|
||||
console.log(result);
|
||||
if (result != 0) {
|
||||
$("#dt_doctor_from").val(result);
|
||||
$("#doctor_transfer_dialog").modal('show');
|
||||
} else {
|
||||
//alert("No assigned doctor");
|
||||
$("#doctor_transfer_dialog").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#submit_doctor_transfer").click(function () {
|
||||
let episode_id = $('input[name=episode_id]:checked').val();
|
||||
let dt_doctor_to = $('#dt_doctor_to').val();
|
||||
console.log('episode_id = ' + episode_id);
|
||||
console.log('doctor_id = ' + dt_doctor_to);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/patient_episodes/save_doctor_transfer",
|
||||
data: {episode_id: episode_id, dt_doctor_to: dt_doctor_to},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result == 1) {
|
||||
alert("<?php echo __('patient_episode.patient_transfer_successful') ?>");
|
||||
location.reload();
|
||||
} else {
|
||||
alert("<?php echo __('patient_episode.patient_transfer_failed') ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
function show(id) {
|
||||
if (document.getElementById(id).style.display === 'none') {
|
||||
document.getElementById(id).style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function hide(id) {
|
||||
document.getElementById(id).style.display = 'none';
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".to_hide").each(function () {
|
||||
$(this).hide();
|
||||
});
|
||||
$("#edit").click(function () {
|
||||
$(this).hide();
|
||||
$("#submit_edit").show();
|
||||
$(".to_show").each(function () {
|
||||
$(this).hide();
|
||||
});
|
||||
$(".to_hide").each(function () {
|
||||
$(this).show();
|
||||
});
|
||||
});
|
||||
$("#close_modal").click(function () {
|
||||
$("#submit_edit").hide();
|
||||
$(".to_show").each(function () {
|
||||
$(this).show();
|
||||
});
|
||||
$(".to_hide").each(function () {
|
||||
$(this).hide();
|
||||
});
|
||||
$("#edit").show();
|
||||
});
|
||||
|
||||
$('.transferedToDoctor').select2({
|
||||
placeholder: "Select",
|
||||
width: "100%",
|
||||
dropdownParent: $('#internal_transfer_dialog')
|
||||
});
|
||||
|
||||
$('.transferedDtToDoctor').select2({
|
||||
placeholder: "Select",
|
||||
width: "100%",
|
||||
dropdownParent: $('#doctor_transfer_dialog')
|
||||
});
|
||||
|
||||
$("#unpaid_consultation_warning").modal("show");
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@push('styles')
|
||||
<style type="text/css">
|
||||
.btn-default.btn-sm.btn-link{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
+950
@@ -0,0 +1,950 @@
|
||||
@push('styles')
|
||||
<style>
|
||||
.episode-menu li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.episode-menu a {
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
}
|
||||
</style>
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@endpush
|
||||
|
||||
<div class="row d-flex align-items-stretch">
|
||||
<div class="col-sm-9 mb-4">
|
||||
<div class="white-box h-100 br-5 mb-0">
|
||||
<ul class="episode-menu m-0 p-0">
|
||||
<div class="row m-0 w-100">
|
||||
<div class="col-sm-2">
|
||||
<li class="w-100">
|
||||
<button type="button" class="btn btn-success btn-sm w-100 h-100 br-5" data-toggle="modal"
|
||||
data-target="#demographicsModal">{{ __('layout.demographics') }}</button>
|
||||
</li>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control w-100" name="new_episode_option" id="new_episode_options">
|
||||
<option value="" selected disabled>{{ __('layout.create_new_episode') }}</option>
|
||||
@if (Auth::user()->can('create-patient-episode'))
|
||||
<option value="1">{{ __('layout.new_episode') }}</option>
|
||||
@endif
|
||||
@if (Auth::user()->can('create-patient-episode-with-clinic'))
|
||||
<option value="2"> {{ __('layout.new_episode_with_clinic') }}</option>
|
||||
@endif
|
||||
@if (Auth::user()->can('create-patient-episode-with-doctor'))
|
||||
<option value="3">{{ __('layout.new_episode_with_doctor') }}</option>
|
||||
@endif
|
||||
@if (Auth::user()->can('create-patient-episode-with-doctor-and-clinic'))
|
||||
<option value="4"> {{ __('layout.new_episode_with_doctor_and_clinic') }}
|
||||
</option>
|
||||
@endif
|
||||
@if (Auth::user()->can('create-patient-episode-with-admission'))
|
||||
<option value="5"> {{ __('layout.new_episode_with_admission') }}</option>
|
||||
@endif
|
||||
@if (Auth::user()->can('create-patient-episode-with-self-lab-request'))
|
||||
<option value="6"> {{ __('layout.new_episode_with_inv_self_request') }}
|
||||
</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<div class="modal fade" id="newEpisodeModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="modalNewEpisodeModelLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="modalNewEpisodeModelLabel1">
|
||||
{{ __('patient_episode.new_episode_option') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_special_clinic_episode']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
|
||||
{{ Form::label('new_episode_option', __('patient_episode.new_episode_option')) }}
|
||||
{{ Form::select('new_episode_option', [], '', ['class' => 'form-control', 'required' => 'true']) }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm w-100 h-100 br-5"
|
||||
onclick="return confirm('<?php echo __('layout.are_you_sure_clinic'); ?>');">{{ __('layout.continue_clinic_allocation') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm w-100 h-100 br-5"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Auth::user()->can('create-patient-episode'))
|
||||
<li>
|
||||
<!-- <button type="submit" class="btn btn-success btn-sm show-episode-modal" data-backdrop="static" data-keyboard="false" data-toggle="modal" data-target="#episodeModal">{{ __('layout.new_episode') }}</button> -->
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->can('create-patient-episode-with-clinic'))
|
||||
<li>
|
||||
<!-- <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#newEpisodeAndClinicModal">{{ __('layout.new_episode_clinic') }}</a> -->
|
||||
|
||||
<div class="modal fade" id="newEpisodeAndClinicModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="modalSpecialLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="modalSpecialLabel1">
|
||||
{{ __('layout.clinic_allocation') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_special_clinic_episode']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
|
||||
{{ Form::label('special_clinic_id', __('layout.select_clinic')) }}
|
||||
{{ Form::select('special_clinic_id', $special_clinics, '', ['class' => 'form-control', 'required' => 'true']) }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm w-100 h-100 br-5"
|
||||
onclick="return confirm('<?php echo __('layout.are_you_sure_clinic'); ?>');">{{ __('layout.continue_clinic_allocation') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm w-100 h-100 br-5"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->can('create-patient-episode-with-doctor-and-clinic'))
|
||||
<li>
|
||||
<!-- <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#episodeWithDoctorAndClinicModal">{{ __('patient_episode.new_episode_with_doctor_and_clinic') }}</a> -->
|
||||
|
||||
<div class="modal fade" id="episodeWithDoctorAndClinicModal" tabindex="-1"
|
||||
role="dialog" aria-labelledby="episodeWithDoctorAndClinicLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="episodeWithDoctorAndClinicLabel1">
|
||||
{{ __('patient_episode.doctor_and_clinic_allocation') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_episode_with_doctor_and_clinic']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('special_clinic_id', __('layout.select_clinic')) }}
|
||||
{{ Form::select('special_clinic_id', $special_clinics, '', ['class' => 'form-control', 'required' => 'true']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('allocated_services_id_with_doctor_id', __('patient_episode.doctor_allocation')) }}
|
||||
{{ Form::select('allocated_services_id_with_doctor_id', $users_array, '', ['class' => 'form-control doctorWithClinicDoctorDropDown', 'required' => 'true']) }}
|
||||
</div>
|
||||
|
||||
@if (is_patient_category_pay_later($patient->category_id))
|
||||
<div class="form-group">
|
||||
{{ Form::label('claim_number', __('patient_episode.claim_number')) }}
|
||||
{{ Form::text('claim_number', '', ['class' => 'form-control', 'required' => 'true', 'id' => 'claim_number']) }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm w-100 h-100 br-5"
|
||||
onclick="return confirm('<?php echo __('patient_episode.are_you_sure_doctor_and_clinic'); ?>');">{{ __('patient_episode.continue_allocation') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm w-100 h-100 br-5"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->can('create-patient-episode-with-doctor'))
|
||||
<li>
|
||||
<!-- <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#episodeWithDoctorModal">{{ __('patient_episode.new_episode_with_doctor') }}</a> -->
|
||||
|
||||
<div class="modal fade" id="episodeWithDoctorModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="episodeWithDoctorLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="episodeWithDoctorLabel1">
|
||||
{{ __('patient_episode.doctor_allocation') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_episode_with_doctor']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
|
||||
{{ Form::label('allocated_services_id_with_doctor_id', __('patient_episode.doctor_allocation')) }}
|
||||
{{ Form::select('allocated_services_id_with_doctor_id', $users_array, '', ['class' => 'form-control doctorDropDown', 'required' => 'true']) }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm w-100 h-100 br-5"
|
||||
onclick="return confirm('<?php echo __('patient_episode.are_you_sure_doctor'); ?>');">{{ __('patient_episode.continue_doctor_allocation') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm w-100 h-100 br-5"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->can('create-patient-episode-with-self-lab-request'))
|
||||
<li>
|
||||
<div class="modal fade" id="episodeWithSelfLabRequestModal" tabindex="-1"
|
||||
role="dialog" aria-labelledby="episodeWithSelfLabRequestLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="episodeWithSelfLabRequestLabel1">
|
||||
{{ __('patient_episode.new_episode_with_self_lab_request') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-9" style="margin-top: 5px;">
|
||||
{{ __('layout.are_you_sure_inv_self_request') }}</div>
|
||||
<div class="col-sm-3">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_episode_with_lab_self_request']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
<button type="submit"
|
||||
class="btn btn-success btn-sm w-100 h-100 br-5"
|
||||
name="createNewEpisode">{{ __('layout.yes') }}</button>
|
||||
<button type="button"
|
||||
class="btn btn-default w-100 h-100 br-5"
|
||||
data-dismiss="modal">{{ __('layout.cancel') }}</button>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<li>
|
||||
<a class="btn btn-info btn-small"
|
||||
onclick="return popitup('https://primaryreporting.who-umc.org/Reporting/Reporter?OrganizationID=UG')">
|
||||
{{ __('layout.sadr_report') }}
|
||||
</a>
|
||||
</li>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
@if ($patient->gender == 2)
|
||||
<li>
|
||||
@if (Auth::user()->can('create-maternity-admission'))
|
||||
<a class="btn btn-default" id="maternityAdmissionBtn"><i
|
||||
class="fa fa-plus-square"></i> {{ __('layout.maternity_admission') }}</a>
|
||||
@endif
|
||||
|
||||
@if (Module::has('Maternity') && Module::isEnabled('Maternity'))
|
||||
<!-- materninty modal -->
|
||||
<div class="modal fade" id="maternityModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="modalMaternityLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="modalMaternityLabel1">
|
||||
{{ __('layout.date_of_maternity_admission') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'maternity.create_episode']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
<input type="date" class="form-control" name="maternity_date"
|
||||
id="maternity_date_field" value="{{ date('Y-m-d') }}">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm"
|
||||
onclick="return confirm('<?php echo __('layout.are_you_sure_admit_maternity'); ?>');">{{ __('layout.continue_maternity_admission') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end maternity modal -->
|
||||
@endif
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
@if (Auth::user()->can('create-ward-admission'))
|
||||
<!-- <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#wardAdmissionModal">{{ __('layout.ward_admission') }}</a> -->
|
||||
@endif
|
||||
<div class="modal fade" id="wardAdmissionModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="modalWardAdmissionLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="modalWardAdmissionLabel1">
|
||||
{{ __('layout.ward_admission') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_episode_with_ward']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id, ['id' => 'patient_id']) }}
|
||||
|
||||
{{ Form::label('admission_ward_id', __('layout.select_ward')) }}
|
||||
{{ Form::select('admission_ward_id', $wards, '', ['class' => 'form-control', 'required' => 'true']) }}
|
||||
<br>
|
||||
{{ Form::label('ward_admission_date', __('layout.admission_date')) }}
|
||||
<input type="date" class="form-control" name="ward_admission_date"
|
||||
id="ward_admission_date" value="{{ date('Y-m-d') }}"
|
||||
required="true">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm"
|
||||
onclick="return confirm('<?php echo __('layout.are_you_sure_admit'); ?>');">{{ __('layout.continue_ward_admission') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 mb-4">
|
||||
<div class="white-box h-100 br-5 mb-0">
|
||||
|
||||
<div class="row">
|
||||
<a data-toggle="collapse" data-target="#collapseDiv" class="white-link">
|
||||
<b>{{ __('layout.patient_documents') }} </b><small
|
||||
style="color: blue;">({{ $documents ? count($documents) : '' }})</small>
|
||||
<span class="fa fa-angle-down">
|
||||
</span>
|
||||
</a>
|
||||
<a href="#" style="color: #003399" class="details pull-right">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="collapseDiv" class="">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
@if (!is_null($documents))
|
||||
<ul>
|
||||
@foreach ($documents as $document)
|
||||
<li><a href="/patient_documents/{{ $document->id }}"
|
||||
target="_blank">{{ $document->title }}</a></li>
|
||||
@endforeach
|
||||
<li>
|
||||
<div class="label label-danger">
|
||||
{{ count($documents) }} {{ __('layout.documents_attached') }}
|
||||
</div>
|
||||
</li>
|
||||
<small>
|
||||
<a href="#" onclick="go()"
|
||||
style="font: blue; cursor: pointer; font-weight: bold;">
|
||||
{{ __('layout.view_all') }} </a>
|
||||
</small>
|
||||
<ul>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<!-- <a class="btn btn-warning btn-sm" href="">Add New</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- patient appointments not attached to any episode -->
|
||||
@php
|
||||
$un_fullfilled_appointments = un_fullfilled_patient_appointments($patient->id);
|
||||
@endphp
|
||||
|
||||
@if (count($un_fullfilled_appointments) > 0)
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box" style="padding: 10px;">
|
||||
<strong>{{ __('layout.patient_appointments') }}</strong>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table warning-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('layout.appointment_date') }}</th>
|
||||
<th>{{ __('layout.appointment_time') }}</th>
|
||||
<th>{{ __('layout.episode_started_on') }}</th>
|
||||
<th>{{ __('layout.clinic') }}</th>
|
||||
<th>{{ __('layout.in_charge') }}</th>
|
||||
<th>{{ __('layout.comments') }}</th>
|
||||
<th style="width: 5%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($un_fullfilled_appointments as $appointment)
|
||||
<tr>
|
||||
<td>
|
||||
{{ is_null($appointment->appointment_date) ? '' : streamline_date($appointment->appointment_date) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $appointment->appointment_time }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $appointment->episode_id == 0 ? '' : streamline_date_time(get_name($appointment->episode_id, 'id', 'created_at', 'patient_episodes')) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ get_name($appointment->clinic_allocation, 'id', 'name', 'clinics') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ get_full_name($appointment->incharge_id, 'id', 'first_name', 'last_name', 'users') != 'ALL STAFF' ? get_full_name($appointment->incharge_id, 'id', 'first_name', 'last_name', 'users') : 'N/A' }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $appointment->comments }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-success btn-rounded btn-xs"
|
||||
onclick="displayAppointmentActions({{ $appointment->patient_id }},{{ $appointment->id }})">{{ __('layout.appointment_actions') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
@php $dob = new Carbon\Carbon($patient->date_of_birth); @endphp
|
||||
<div class="modal fade" id="demographicsModal" 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">×</span></button>
|
||||
<h4 class="modal-title" id="exampleModalLabel1">{{ __('layout.patient_details') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.patient_number') }}</th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('layout.male') : __('layout.female') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.date_of_birth') }}</th>
|
||||
<td>{{ streamline_date($patient->date_of_birth) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.age') }}</th>
|
||||
<td>{{ $dob->diffInYears(Carbon\Carbon::now()) }} {{ __('layout.years') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.residence') }}</th>
|
||||
<td>
|
||||
{{ patient_residence($patient->id) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.marital_status') }}</th>
|
||||
<td>
|
||||
{{ isset($marital_statuses[$patient->marital_status]) ? $marital_statuses[$patient->marital_status] : 'N/A' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if (isset($other_patients_info_data->non_ugandan_national_id_no))
|
||||
|
||||
<tr>
|
||||
<th class="highlight"> ID Number</th>
|
||||
<td>{{ $other_patients_info_data->non_ugandan_national_id_no ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
@else
|
||||
<tr>
|
||||
<th class="highlight">National ID</th>
|
||||
<td>{{ $patient->national_id ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@if (mother_of_patient($patient->id))
|
||||
@php
|
||||
$mother_id = mother_of_patient($patient->id);
|
||||
@endphp
|
||||
<tr>
|
||||
<th class="highlight">
|
||||
<font color="black">{{ __('patients.mother_name') }}:</font>
|
||||
</th>
|
||||
<td>
|
||||
<a href="/patients/{{ $mother_id }}">
|
||||
{{ get_full_name($mother_id, 'id', 'first_name', 'last_name', 'patients') }}
|
||||
({{ get_name($mother_id, 'id', 'number', 'patients') }})
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (children_of_patient($patient->id))
|
||||
@php
|
||||
$children_ids_array = children_of_patient($patient->id);
|
||||
@endphp
|
||||
<tr>
|
||||
<th class="highlight">
|
||||
<font color="black">{{ __('patients.children') }}:</font>
|
||||
</th>
|
||||
<td>
|
||||
<ol>
|
||||
@for ($i = 0; $i < count($children_ids_array); $i++)
|
||||
<li>
|
||||
<a href="/patients/{{ $children_ids_array[$i] }}">
|
||||
{{ get_full_name($children_ids_array[$i], 'id', 'first_name', 'last_name', 'patients') }}
|
||||
({{ get_name($children_ids_array[$i], 'id', 'number', 'patients') }})
|
||||
</a>
|
||||
</li>
|
||||
@endfor
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.next_of_kin') }}</th>
|
||||
<td>{{ $patient->next_of_kin }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.relationship') }}</th>
|
||||
<td>
|
||||
{{ isset($relationships[$patient->next_of_kin_relationship]) ? $relationships[$patient->next_of_kin_relationship] : 'N/A' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.mobile_number') }}</th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.phone_name') }}</th>
|
||||
<td>{{ $patient->phone_owner }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.insurance_status') }}</th>
|
||||
<td>
|
||||
@if ($patient->insurance_status == 1)
|
||||
{{ __('layout.insured') }}
|
||||
@else
|
||||
{{ __('layout.not_insured') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.occupation') }}</th>
|
||||
<td>
|
||||
{{ isset($occupations[$patient->occupation_id]) ? $occupations[$patient->occupation_id] : 'N/A' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.patient_category') }}</th>
|
||||
<td>
|
||||
{{ isset($patient_categories[$patient->category_id]) ? $patient_categories[$patient->category_id] : 'N/A' }}
|
||||
</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 class="highlight">{{ get_name($keys[2], 'id', 'name', 'patient_registration_fields') }}</th>
|
||||
<td>{{ $registration_field }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
<tr>
|
||||
<th class="highlight">Referred From</th>
|
||||
<td>{{ $patient->referred_from }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.registered_by') }}</th>
|
||||
<td>{{ get_full_name($patient->created_by, 'id', 'first_name', 'last_name', 'users') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="highlight">{{ __('layout.registered_on') }}</th>
|
||||
<td>
|
||||
{{ streamline_date($patient->created_at) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th class="highlight">Country</th>
|
||||
<td>{{ $country->name ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="highlight">Foreigner / Refugee</th>
|
||||
<td>
|
||||
|
||||
@if(!empty($other_patients_info_data))
|
||||
@if ($other_patients_info_data->non_ugandan_foreigner_or_refugee == 1)
|
||||
<span>{{ __('patients.foreigner') }} </span>
|
||||
@elseif ($other_patients_info_data->non_ugandan_foreigner_or_refugee == 2)
|
||||
<span>{{ __('patients.refugee') }} </span>
|
||||
@else
|
||||
<span></span>
|
||||
@endif
|
||||
@else
|
||||
<span></span>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="edit_patient"
|
||||
onclick="window.location.href='/patients/{{ $patient->id }}/edit'">{{ __('layout.edit_patient') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal that pops up when a new episode is clicked -->
|
||||
@if (Auth::user()->can('create-patient-episode'))
|
||||
<div class="modal fade" id="episodeModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-9" style="margin-top: 5px;">{{ __('layout.begin_episode_for_patient') }}
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{{ Form::open(['route' => 'patient_episodes.create_episode', 'onsubmit' => 'createNewEpisode.disabled = true; return true;']) }}
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
<button type="submit" class="btn btn-success btn-sm"
|
||||
name="createNewEpisode">{{ __('layout.yes') }}</button>
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">{{ __('layout.cancel') }}</button>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- modal that pops up when its an action on an appointment -->
|
||||
<div class="modal" id="modal_select_actions" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg 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">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">{{ __('layout.select_actions') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-success btn-rounded" data-toggle="modal"
|
||||
id="startAppWithClinicBtn">{{ __('layout.start_appointment_with_clinic') }}</button>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a class="btn btn-success btn-rounded"
|
||||
onclick="displayActivationModel()">{{ __('layout.start_appointment') }}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a class="btn btn-warning btn-rounded"
|
||||
onclick="reschedule_appointment()">{{ __('layout.reschedule_appointment') }}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a class="btn btn-danger btn-rounded"
|
||||
onclick="cancel_appointment()">{{ __('layout.cancel_appointment') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="modal_patient_already_admitted" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg 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">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">{{ __('layout.patient_alert') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5>{{ __('layout.pat_still_admitted_discharge') }}</h5>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded" data-dismiss="modal">{{ __('layout.cancel') }}</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info btn-rounded pull-right"
|
||||
id="discharge_patient_button">{{ __('layout.discharge_pat_continue') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- start an appointment with a clinic and a doctor option -->
|
||||
<div class="modal fade" id="startAppointmentWithClinicModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="appointmentWithDoctorAndClinicLabel1">
|
||||
<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">×</span></button>
|
||||
<h4 class="modal-title" id="appointmentWithDoctorAndClinicLabel1">
|
||||
{{ __('patient_episode.doctor_and_clinic_allocation') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ Form::open(['route' => 'patient_episodes.start_appointment_with_doctor_and_clinic']) }}
|
||||
|
||||
{{ Form::hidden('patient_id', $patient->id) }}
|
||||
{{ Form::hidden('selected_appointment_id', 0, ['id' => 'selected_appointment_id']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('special_clinic_id', __('layout.select_clinic')) }}
|
||||
{{ Form::select('special_clinic_id', $special_clinics, '', ['class' => 'form-control', 'required' => 'true']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('allocated_services_id_with_doctor_id', __('patient_episode.doctor_allocation')) }}
|
||||
{{ Form::select('allocated_services_id_with_doctor_id', $users_array, '', ['class' => 'form-control appWithClinicDoctorDropDown']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-success btn-sm"
|
||||
onclick="return confirm('<?php echo __('patient_episode.are_you_sure_doctor_and_clinic'); ?>');">{{ __('patient_episode.continue_allocation') }}</button>
|
||||
{{ Form::close() }}
|
||||
<button type="button" class="btn btn-danger btn-sm"
|
||||
data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$("#new_episode_options").change(function() {
|
||||
var clicked_episode_option = $(this).val();
|
||||
if (clicked_episode_option == 1) {
|
||||
$("#episodeModal").modal("show");
|
||||
} else if (clicked_episode_option == 2) {
|
||||
$("#newEpisodeAndClinicModal").modal("show");
|
||||
} else if (clicked_episode_option == 3) {
|
||||
$("#episodeWithDoctorModal").modal("show");
|
||||
} else if (clicked_episode_option == 4) {
|
||||
$("#episodeWithDoctorAndClinicModal").modal("show");
|
||||
} else if (clicked_episode_option == 5) {
|
||||
$.ajax({
|
||||
url: '/inpatient/check_for_open_admissions/' + $('#patient_id').val(),
|
||||
type: 'get',
|
||||
success: function(response) {
|
||||
if (response > 0) {
|
||||
$("#modal_patient_already_admitted").modal("show");
|
||||
} else {
|
||||
$("#wardAdmissionModal").modal("show");
|
||||
}
|
||||
},
|
||||
error: function(response) {}
|
||||
});
|
||||
} else if (clicked_episode_option == 6) {
|
||||
$("#episodeWithSelfLabRequestModal").modal("show");
|
||||
}
|
||||
});
|
||||
|
||||
$("#discharge_patient_button").click(function() {
|
||||
$.ajax({
|
||||
url: '/inpatient/discharge_patient_past_admissions/' + $('#patient_id').val(),
|
||||
type: 'get',
|
||||
success: function(response) {
|
||||
$("#modal_patient_already_admitted").modal("hide");
|
||||
$("#wardAdmissionModal").modal("show");
|
||||
},
|
||||
error: function(response) {}
|
||||
});
|
||||
});
|
||||
|
||||
$("#maternityAdmissionBtn").click(function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '/inpatient/check_for_open_admissions/' + $('#patient_id').val(),
|
||||
type: 'get',
|
||||
success: function(response) {
|
||||
if (response > 0) {
|
||||
$("#modal_patient_already_admitted").modal("show");
|
||||
} else {
|
||||
$("#maternityModal").modal("show");
|
||||
}
|
||||
},
|
||||
error: function(response) {}
|
||||
});
|
||||
});
|
||||
|
||||
$('.doctorDropDown').select2({
|
||||
placeholder: "Select",
|
||||
width: "100%",
|
||||
dropdownParent: $('#episodeWithDoctorModal')
|
||||
});
|
||||
|
||||
$('.doctorWithClinicDoctorDropDown').select2({
|
||||
placeholder: "Select",
|
||||
width: "100%",
|
||||
dropdownParent: $('#episodeWithDoctorAndClinicModal')
|
||||
});
|
||||
|
||||
$('#startAppWithClinicBtn').click(function(e) {
|
||||
$('#modal_select_actions').modal('hide');
|
||||
$('#selected_appointment_id').val(appointmentId);
|
||||
$('#startAppointmentWithClinicModal').modal('show');
|
||||
});
|
||||
|
||||
$('.appWithClinicDoctorDropDown').select2({
|
||||
placeholder: "Select",
|
||||
width: "100%",
|
||||
dropdownParent: $('#startAppointmentWithClinicModal')
|
||||
});
|
||||
|
||||
function popitup(url) {
|
||||
newwindow = window.open(url, 'name', 'height=700,width=850, top=50, left=300');
|
||||
if (window.focus) {
|
||||
newwindow.focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function go(url) {
|
||||
event.preventDefault();
|
||||
let options = document.getElementsByName('episode_id');
|
||||
let episodeId = 0;
|
||||
if (options) {
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
if (options[i].checked) {
|
||||
episodeId = options[i].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'set_episode_id/' + episodeId + '/patient_documents',
|
||||
type: 'get',
|
||||
success: function(response) {
|
||||
window.location.href = '/patient_documents';
|
||||
},
|
||||
error: function(response) {}
|
||||
});
|
||||
}
|
||||
|
||||
/* stuff for patient appointments */
|
||||
let selectedPatientId = 0;
|
||||
let appointmentId = 0;
|
||||
|
||||
function reschedule_appointment() {
|
||||
if (confirm("<?php echo __('layout.reschedule_appointment_question'); ?>")) {
|
||||
window.location.href = "/patients/reschedule_appointment/" + appointmentId;
|
||||
}
|
||||
}
|
||||
|
||||
function cancel_appointment() {
|
||||
if (confirm("<?php echo __('layout.cancel_appointment_cancel'); ?>")) {
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: '/patients/cancel_patient_appointment/' + appointmentId,
|
||||
success: function(response) {
|
||||
if (response == 1) {
|
||||
alert("<?php echo __('layout.appointment_cancelled'); ?>");
|
||||
$("#modal_select_actions").modal("hide");
|
||||
fetch_patients();
|
||||
} else {
|
||||
alert("<?php echo __('layout.cancel_appointment_failed'); ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function displayAppointmentActions(patientId, appointment_id) {
|
||||
selectedPatientId = patientId;
|
||||
appointmentId = appointment_id;
|
||||
|
||||
$("#modal_select_actions").modal("show");
|
||||
}
|
||||
|
||||
function displayActivationModel() {
|
||||
window.location.href = "/patients/complete_appointment/" + appointmentId;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#new_episode_options, #admission_ward_id').select2({width: "100%"});
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user