Files
streamline-emr/docker/streamline-src/Modules/Patients/Resources/views/patients/show.blade.php
T
alec.turner 4a89356390 Import latest app updates from streamline
An updated set of source files and initialization was provided by streamline to
address issues observed during initial testing. These files have been updated in
order to generate a new set of app images.
2024-04-11 11:16:51 -07:00

216 lines
9.8 KiB
PHP
Executable File

@extends('layouts.main')
@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">{{ __('patients.view') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patients.dashboard') }}</a></li>
<li><a href="{{ route('patients.index') }}">{{ __('patients.patients') }}</a></li>
<li class="active">{{ __('patients.view') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="white-box">
<div class="row">
<div class="col-sm-3">
<a class="img" href="#modal-photo" data-toggle="modal" style="color: whitesmoke">
@if(!is_null($patient->photo) && $patient->photo != "")
<img src='{{ asset($patient->photo) }}' class="img-rounded center" alt='Photo not available' />
@else
<img src="/uploads/streamline_images/person-place-holder.jpg" class="img-rounded center" style='height: 120px; width: 50%' alt='Photo not available' />
@endif
</a>
</div>
<div class="col-sm-6">
<table class="table-bordered table-condensed table-striped">
<tbody>
<tr>
<th><font color="black">{{ __('patients.patient_number') }}</font></th>
<td>{{ $patient->number }}</td>
</tr>
<tr>
<th>Code</th>
<td>
{{ getDNS1DBarcodePNGOtherOption(sprintf("%04u", $patient->id)) }}
<h4>{{ sprintf("%04u", $patient->id) }}</h4>
</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.full_names') }}</font></th>
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.gender') }}</font></th>
<td>{{ $patient->gender == 1 ? 'Male' : 'Female' }}</td>
</tr>
<tr>
<th class="hidden-phone"><font color="black">{{ __('patients.age') }}</font></th>
<td>{{ get_patients_age($patient->date_of_birth) }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-3">
<a href="/patient_card/{{ $patient->id }}" target="_blank" class="btn btn-rounded btn-primary btn-sm float-right">{{ __('patients.print_patient_card') }}</a>
</div>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-sm-4">
<table class="table-bordered table-condensed table-striped">
<tr>
<th><font color="black">{{ __('patients.phone') }}</font></th>
<td>{{ $patient->phone }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.occupation') }}</font></th>
<td>{{ get_name($patient->occupation_id, 'id', 'name', 'occupations') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.insurance') }}</font></th>
<td>{{ $patient->insurance_status == 1 ? __('patients.yes') : __('patients.no') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.religion') }}</font></th>
<td>{{ get_name($patient->religion_id, 'id', 'name', 'religions') }}</td>
</tr>
<tr>
<th><font color="black">{{__('patients.next_of_kin')}}</font></th>
<td>{{ $patient->next_of_kin }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.next_of_kin_relationship') }}</font></th>
<td>{{ get_name($patient->next_of_kin_relationship, 'id', 'name', 'family_relations') }}</td>
</tr>
<tr>
<th><font color="black">{{__('patients.phone_of_next_of_kin')}}</font></th>
<td>{{ $patient->phone_of_next_of_kin }}</td>
</tr>
</table>
</div>
<div class="col-sm-4">
<table class="table-bordered table-condensed table-striped">
<tr>
<th><font color="black">{{ __('patients.district') }}</font></th>
<td>{{ get_name($patient->district_id, 'id', 'name', 'districts') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.county') }}</font></th>
<td>{{ get_name($patient->county_id, 'id', 'name', 'counties') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.sub_county') }}</font></th>
<td>{{ get_name($patient->subcounty_id, 'id', 'name', 'subcounties') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.parish') }}</font></th>
<td>{{ get_name($patient->parish_id, 'id', 'name', 'parishes') }}</td>
</tr>
<tr>
<th><font color="black">{{ __('patients.village') }}</font></th>
<td>{{ get_name($patient->village_id, 'id', 'name', 'villages') }}</td>
</tr>
<tr>
<th><font color="black">Referred From</font></th>
<td>{{ $patient->referred_from }}</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><font color="black">{{ get_name($keys[2], 'id', 'name', 'patient_registration_fields') }}</font></th>
<td>{{ $registration_field }}</td>
</tr>
@endif
@endforeach
</table>
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<th style="width: 30%"><font color="black">{{ __('patients.last_patient_visit') }} : </font></th>
<td>
@if(!is_null($last_episode))
@php
$diagnosis = null;
$primary_diagnosis_id = get_name($last_episode->id, 'episode_id', 'primary_diagnosis', 'consultations');
if($primary_diagnosis_id != "N/A" && $primary_diagnosis_id != ""){
$diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($primary_diagnosis_id);
}
@endphp
<strong>{{ __('patients.primary_diagnosis') }} : </strong>{{ !is_null($diagnosis) ? $diagnosis->name : '' }}<br>
<strong>{{ __('patients.comments') }} : </strong>{{ get_name($last_episode->id, 'episode_id', 'comments', 'consultations') }}<br>
@endif
<strong>{{ __('patients.date') }} : </strong> {{ !is_null($last_episode) ? streamline_date($last_episode->created_at) : __('patients.no_visit_yet') }}
</td>
</tr>
<tr>
<th style="width: 30%"><font color="black">{{ __('patients.date_registered') }} :</font></th>
<td>{{streamline_date($patient->created_at) }}</td>
</tr>
<tr>
<th style="width: 30%"><font color="black">{{ __('patients.created_by') }} :</font></th>
<td>{{ get_full_name($patient->created_by, "id", "first_name", "last_name", "users") }}</td>
</tr>
@if (mother_of_patient($patient->id))
@php
$mother_id = mother_of_patient($patient->id);
@endphp
<tr>
<th style="width: 30%; font-size: 16px; font-weight:bolder"><font color="black">{{ __('patients.mother_name') }}:</font></th>
<td style="font-size: 16px;">
<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 style="width: 30%; font-size: 16px; font-weight:bolder"><font color="black">{{ __('patients.children') }}:</font></th>
<td style="font-size: 16px;">
<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
</table>
<a href="/patient_episodes/set_patient_id/{{ $patient->id }}" class="btn btn-success btn-sm">{{ __('patients.select_patient_history') }}</a>
</div>
</div>
</div>
</div>
</div>
@endsection