@extends('layouts.app') @section('title', 'Prisoner Details') @section('content')

Prisoner Details

Complete prisoner information and history
Back to List @can('prison.prisoners.edit') Edit @endcan
{{-- Basic Information Card --}}
Basic Information
@if($prisoner->photo) @else
@endif

{{ $prisoner->name }}

{{ $prisoner->prisoner_number }}

{{-- Details Card --}}
Personal Details

Gender: {{ $prisoner->gender }}

Date of Birth: {{ $prisoner->dob }}

Case Number: {{ $prisoner->case_number }}

Current Location: @if($currentLocation) {{ $currentLocation->branch_name ?? 'N/A' }} @else Not in custody @endif

Latest Reception: @if($latestReception) #{{ $latestReception->reception_number }} - {{ $latestReception->created_at->format('Y-m-d') }} @else None @endif

Total Receptions: {{ $receptions->count() }}

{{-- Next of Kin --}}
Next of Kin
@forelse($prisoner->nextOfKin as $nok)
{{ $nok->name }} @if($nok->is_primary) Primary @else Secondary @endif
Relationship: {{ $nok->relationship ?? 'N/A' }}
Phone: {{ $nok->phone ?? 'N/A' }}{{ $nok->alt_phone ? ' / '.$nok->alt_phone : '' }}
Email: {{ $nok->email ?? 'N/A' }}
@if($nok->address)
Address: {{ $nok->address }}
@endif
@if(!$loop->last)
@endif @empty

No next of kin recorded.

@endforelse
{{-- Reception History --}}
Reception History ({{ $receptions->count() }} total)
@forelse($receptions as $rec) @empty @endforelse
# Date Branch Source Status Action
#{{ $rec->reception_number }} {{ $rec->created_at->format('Y-m-d H:i') }} {{ $rec->branch->branch_name ?? 'N/A' }} {{ $rec->source }} {{ ucfirst($rec->status) }} View
No reception records found
{{-- Risk Assessments --}}
Risk Assessments
@forelse($assessments as $assessment) @empty @endforelse
Assessment Date Overall Risk Security Risk Violence Risk Escape Risk Assessor Status Action
{{ $assessment->assessment_date->format('Y-m-d') }} {{ $assessment->overall_risk_category }} {{ $assessment->security_risk_level }} {{ $assessment->violence_risk_level }} {{ $assessment->escape_risk_level }} {{ $assessment->assessor->name ?? 'N/A' }} @if($assessment->status == 'Approved') Approved @else Draft @endif View
No risk assessments found
{{-- Admissions --}}
Admissions ({{ $admissions->count() }})
@forelse($admissions as $adm) @empty @endforelse
Admission DateBranchCell BlockCustody Level StatusChildrenBelongings
{{ $adm->admission_date ? \Carbon\Carbon::parse($adm->admission_date)->format('d-m-Y') : 'N/A' }} {{ $adm->branch->branch_name ?? 'N/A' }} {{ $adm->cell_block ?? 'N/A' }} {{ $adm->custody_level ?? 'N/A' }} @if($adm->release_date) Released {{ \Carbon\Carbon::parse($adm->release_date)->format('d-m-Y') }} @else In Custody @endif {{ $adm->children->count() }} {{ $adm->belongings->count() }}
No admissions found
{{-- Classification --}}
Classification ({{ $classifications->count() }})
@forelse($classifications as $c) @empty @endforelse
DateSecurity LevelBlock / CellReview StatusNext ReviewAction
{{ $c->classification_date?->format('d-m-Y') ?? 'N/A' }} {{ $c->security_level ?? 'N/A' }} {{ $c->assigned_block ?? 'N/A' }}{{ $c->assigned_cell ? ' / '.$c->assigned_cell : '' }} {{ $c->review_status ?? 'N/A' }} {{ $c->next_review_date?->format('d-m-Y') ?? 'N/A' }} View
No classification records found
{{-- Rehabilitation --}}
Rehabilitation ({{ $rehabilitations->count() }})
@forelse($rehabilitations as $r) @empty @endforelse
ProgramRecordedStatusAction
{{ $r->program_name ?? $r->program_type ?? $r->program ?? 'N/A' }} {{ $r->created_at?->format('d-m-Y') ?? 'N/A' }} @php $ps = $r->progress_status ?? null; @endphp {{ $ps ?? 'N/A' }} View
No rehabilitation records found
{{-- Court Production --}}
Court Production ({{ $courtProductions->count() }})
@forelse($courtProductions as $cp) @empty @endforelse
Production DateCourtCase No.StatusOutcomeNext CourtAction
{{ $cp->production_date?->format('d-m-Y') ?? 'N/A' }} {{ $cp->court_name ?? 'N/A' }}{{ $cp->court_location ? ' ('.$cp->court_location.')' : '' }} {{ $cp->case_number ?? 'N/A' }} {{ $cp->production_status ?? 'N/A' }} @if($cp->outcome_type) {{ $cp->outcome_type }} @else — @endif {{ $cp->next_court_date?->format('d-m-Y') ?? '—' }} View
No court production records found
{{-- Transfers --}}
Transfers ({{ $transfers->count() }})
@forelse($transfers as $t) @empty @endforelse
DateFromToStatusAction
{{ $t->transfer_date ? \Carbon\Carbon::parse($t->transfer_date)->format('d-m-Y') : ($t->created_at?->format('d-m-Y') ?? 'N/A') }} {{ $t->from_branch ?? optional($t->fromBranch)->branch_name ?? 'N/A' }} {{ $t->to_branch ?? optional($t->toBranch)->branch_name ?? 'N/A' }} {{ $t->status ?? $t->transfer_status ?? 'N/A' }} View
No transfer records found
{{-- Discharge --}}
Discharge ({{ $discharges->count() }})
@forelse($discharges as $d) @empty @endforelse
DateTypeStatusOfficerGate MoneySupervisedAction
{{ $d->discharge_date?->format('d-m-Y') ?? 'N/A' }} {{ ucwords(str_replace('_', ' ', $d->discharge_type ?? 'N/A')) }} {{ ucfirst($d->status ?? 'N/A') }} {{ $d->discharge_officer ?? 'N/A' }} {{ $d->gate_money_amount !== null ? 'KSh '.number_format($d->gate_money_amount, 2) : 'N/A' }} @if($d->is_supervised)Yes@elseNo@endif View
No discharge records found
@endsection