{{-- resources/views/admin/patients/show.blade.php --}}
@extends('layouts.app')
@section('content')
{{ $patient->first_name }} {{ $patient->last_name }}
Patient No:
{{ $patient->patient_no }}
@php
$bg = match($patient->status) {
'active' => '#dcfce7',
'inactive' => '#fef3c7',
'archived' => '#fee2e2',
default => '#f3f4f6'
};
$color = match($patient->status) {
'active' => '#166534',
'inactive' => '#92400e',
'archived' => '#991b1b',
default => '#374151'
};
@endphp
{{ ucfirst($patient->status) }}
← Back
Edit
+ New Visit
@if($patient->status !== 'active')
@endif
@if($patient->status === 'active')
@endif
@if($patient->status !== 'archived')
@endif
Basic Information
|
First Name
|
{{ $patient->first_name }}
|
|
Last Name
|
{{ $patient->last_name }}
|
|
Sex
|
{{ $patient->sex ?? '—' }}
|
|
Date of Birth
|
@if(!empty($patient->dob))
{{ \Carbon\Carbon::parse($patient->dob)->format('d M Y') }}
@else
—
@endif
|
|
Age
|
@if(!empty($patient->dob))
{{ \Carbon\Carbon::parse($patient->dob)->age }} years
@else
—
@endif
|
|
Phone
|
{{ $patient->phone ?? '—' }}
|
|
Email
|
{{ $patient->email ?? '—' }}
|
Location
|
Village
|
{{ $patient->village ?? '—' }}
|
Next of Kin
|
First Name
|
{{ $patient->nok_first_name ?? '—' }}
|
|
Last Name
|
{{ $patient->nok_last_name ?? '—' }}
|
|
Other Names
|
{{ $patient->nok_other_names ?? '—' }}
|
|
Relationship
|
{{ $patient->next_of_kin_relationship ?? '—' }}
|
|
Phone
|
{{ $patient->next_of_kin_phone ?? '—' }}
|
Record Information
|
Registered
|
{{ $patient->created_at }}
|
|
Last Updated
|
{{ $patient->updated_at }}
|
Visit History
Clinical encounters and consultations
+ New Visit
@php
$visits = DB::table('patient_visits')
->leftJoin(
'facilities',
'facilities.id',
'=',
'patient_visits.facility_id'
)
->where('patient_visits.patient_id', $patient->id)
->orderByDesc('visit_date')
->select(
'patient_visits.*',
'facilities.name as facility_name'
)
->get();
@endphp
@if($visits->isEmpty())
@else
|
Visit No
|
Type
|
Facility
|
Date
|
Status
|
|
@foreach($visits as $visit)
|
{{ $visit->visit_no }}
|
{{ $visit->visit_type }}
|
{{ $visit->facility_name ?? '—' }}
|
{{ \Carbon\Carbon::parse($visit->visit_date)->format('d M Y H:i') }}
|
{{ ucfirst($visit->visit_status) }}
|
Open
|
@endforeach
@endif
Clinical Encounters
No encounters yet
Allergies
No allergies recorded
Immunization
No immunization records
Documents
No uploaded documents
Admissions
No admission history
@endsection