@extends('layouts.app') @section('title', 'السجلات الطبية') @push('head') @endpush @section('content') @can('medical_records.create') @endcan

آخر الزيارات

@forelse($records as $r) @php $name = trim(($r->patient->first_name ?? '') . ' ' . ($r->patient->last_name ?? '')); $initials = collect(preg_split('/\s+/u', $name)) ->filter()->take(2) ->map(fn ($w) => mb_substr($w, 0, 1)) ->implode('') ?: '؟'; $genderClass = ($r->patient->gender ?? null) === 'female' ? 'gender-female' : ''; @endphp
{{ $initials }}
{{ $name ?: '—' }} @if($r->patient?->file_number) {{ $r->patient->file_number }} @endif
{{ $r->visit_date?->translatedFormat('j M Y، h:i A') }}
د. {{ $r->doctor?->name ?? '—' }}
@if($r->chief_complaint)
الشكوى: {{ $r->chief_complaint }}
@endif @if($r->diagnosis) {{ $r->diagnosis }} @endif
@empty

لا توجد سجلات بعد

سيظهر هنا كل زيارة جديدة بمجرد تسجيل سجل طبي للمريض.

@endforelse @if($records->hasPages())
{{ $records->links() }}
@endif
{{-- ============================================================ --}} {{-- New visit modal — picks patient then redirects to the rich --}} {{-- visit form that already exists at /patients/{patient}/visits/ --}} {{-- create. Keeps that 310-line view as the single source of truth --}} {{-- for the actual data entry while letting the user start from --}} {{-- the records list. --}} {{-- ============================================================ --}} @endsection @push('scripts') @endpush