@extends('layouts.app') @section('title','Patient record') @section('content')

{{ $patient->first_name }} {{ $patient->middle_name }} {{ $patient->last_name }}

{{ $patient->patient_number }}

Edit demographics New encounter
DOB: {{ $patient->date_of_birth?->format('d M Y')??'Unknown' }}
Gender: {{ ucfirst($patient->gender) }}
Phone: {{ $patient->phone??'—' }}
Allergies: {{ is_array($patient->allergies)?implode(', ',$patient->allergies):($patient->allergies??'Not recorded') }}

Clinical encounter history

@forelse($patient->encounters as $e)
{{ $e->encounter_type }} · {{ $e->encounter_number }}{{ $e->status }}
{{ $e->encountered_at->format('d M Y H:i') }} · {{ $e->facility->name }}

Complaint: {{ $e->presenting_complaint }}

Diagnosis: {{ $e->diagnosis??'Not entered' }}

Observations recorded: {{ $e->observations()->count() }}
@foreach($e->observations as $o)
{{ $o->observed_at->format('d M Y H:i') }} · {{ str_replace('_',' ',$o->observation_type) }}: {{ $o->value }} {{ $o->unit }}
@endforeach @foreach($e->amendments as $am)
Amendment request: {{ $am->reason }} — {{ $am->correction_text }} {{ $am->approved_at?'Approved':'Pending review' }} @if(!$am->approved_at && auth()->user()->hasRole(['super_administrator','lcda_administrator','lcda_medical_director']))
@csrf
@endif
@endforeach @if(!$e->signed_at)
@csrf
@else
@csrf
@endif@if(!$e->signed_at && ($e->clinician_id===auth()->id()||auth()->user()->hasRole('facility_administrator')))
@csrf
@endif
@empty

No encounters recorded.

@endforelse@endsection