@extends('layouts.app') @section('title', 'الوصفات الطبية') @push('head') @endpush @section('content') @can('prescriptions.create') @endcan

آخر الوصفات

@if($prescriptions->isEmpty())

لا توجد وصفات بعد

الوصفات الجديدة تظهر هنا تلقائياً عند إنشائها من سجل الزيارة.

@else
@foreach($prescriptions as $rx) @php $name = trim(($rx->patient->first_name ?? '').' '.($rx->patient->last_name ?? '')); $initials = collect(preg_split('/\s+/u', $name)) ->filter()->take(2) ->map(fn ($w) => mb_substr($w, 0, 1)) ->implode('') ?: '؟'; $genderClass = ($rx->patient->gender ?? null) === 'female' ? 'gender-female' : ''; @endphp @endforeach
الرقم المريض الطبيب التاريخ الإجراءات
{{ $rx->prescription_number ?? '#'.$rx->id }}
{{ $initials }}
{{ $name ?: '—' }} @if($rx->patient?->file_number)
{{ $rx->patient->file_number }}
@endif
د. {{ $rx->doctor?->name ?? '—' }}
{{ $rx->issued_at?->translatedFormat('j M Y') }}
{{ $rx->issued_at?->diffForHumans() }}
@if($prescriptions->hasPages()) @endif @endif
{{-- ============================================================ --}} {{-- New prescription modal --}} {{-- ============================================================ --}} {{-- Hidden template for one prescription-item row. Cloned by JS. --}} @endsection @push('scripts') @endpush