@extends('secretary.layouts.app') @section('title', $patient->user->name) @section('page-title', 'ملف المريض') @section('content')
{{-- ══ بطاقة المريض ══ --}}
{{ $patient->user->name }}
{{ $patient->gender==='male' ? 'ذكر' : ($patient->gender==='female' ? 'أنثى' : '—') }} @if($patient->date_of_birth) · {{ $patient->date_of_birth->age }} سنة @endif
@if($patient->blood_type)
{{ $patient->blood_type }}
@endif
{{ $patient->user->phone ?? '—' }}
@if($patient->user->email)
{{ $patient->user->email }}
@endif @if($patient->national_id)
{{ $patient->national_id }}
@endif
{{ $patient->date_of_birth?->format('Y/m/d') ?? '—' }}

تعديل @if(!$inQueue)
@csrf
@else في الطابور #{{ $inQueue->queue_number }} @endif
{{-- إحصائيات سريعة --}}
{{ $totalVisits }}
زيارة
{{ $patient->appointments->count() }}
موعد
{{-- الأمراض المزمنة --}} @if($patient->chronic_diseases)
أمراض مزمنة
{{ $patient->chronic_diseases }}
@endif {{-- الحساسية --}} @if($patient->allergies)
تحذير — الحساسية
{{ $patient->allergies }}
@endif {{-- الأدوية الحالية --}} @if($patient->current_medications)
الأدوية الحالية
{{ $patient->current_medications }}
@endif {{-- الطوارئ --}} @if($patient->emergency_contact_phone)
جهة الطوارئ
{{ $patient->emergency_contact_name ?? '—' }}
{{ $patient->emergency_contact_phone }}
{{ $patient->emergency_contact_relation ?? '' }}
@endif
{{-- ══ السجلات الطبية + المواعيد ══ --}}
{{-- آخر الزيارات --}}
آخر الزيارات الطبية {{ $totalVisits }} زيارة
@if($patient->medicalRecords->count())
@foreach($patient->medicalRecords as $record) @endforeach
التاريخ الشكوى التشخيص المتابعة
{{ $record->visit_date->format('Y/m/d') }} {{ Str::limit($record->chief_complaint, 40) ?? '—' }} {{ Str::limit($record->diagnosis, 50) }} @if($record->next_visit_date) {{ $record->next_visit_date->format('Y/m/d') }} @else @endif
@else
لا توجد زيارات سابقة عند هذا الطبيب
@endif
{{-- المواعيد --}} @if($patient->appointments->count())
آخر المواعيد
@foreach($patient->appointments as $appt) @endforeach
التاريخالوقتسبب الزيارةالحالة
{{ $appt->appointment_date->format('Y/m/d') }} {{ $appt->appointment_time }} {{ $appt->reason ?? '—' }} @php $map=['pending'=>['bg-light text-dark','بانتظار'],'confirmed'=>['b-waiting','مؤكد'],'completed'=>['b-completed','منتهي'],'cancelled'=>['bg-danger text-white','ملغي']]; [$cls,$lbl]=$map[$appt->status]??['bg-secondary text-white',$appt->status]; @endphp {{ $lbl }}
@endif
@endsection