@extends('layouts.app') @section('title', 'التحاليل والفحوصات') @push('head') @endpush @php $statusMeta = [ 'requested' => ['label' => 'مطلوب', 'color' => 'info', 'icon' => 'clock'], 'in_progress' => ['label' => 'قيد التنفيذ', 'color' => 'warning', 'icon' => 'loader'], 'completed' => ['label' => 'مكتمل', 'color' => 'success', 'icon' => 'check'], 'cancelled' => ['label' => 'ملغي', 'color' => 'danger', 'icon' => 'x'], ]; @endphp @section('content') @can('lab_tests.create') @endcan

سجل التحاليل

@if($tests->isEmpty())

لا توجد تحاليل

طلبات التحاليل الجديدة هتظهر هنا.

@else
@foreach($tests as $t) @php $name = trim(($t->patient?->first_name ?? '').' '.($t->patient?->last_name ?? '')); $initials = collect(preg_split('/\s+/u', $name)) ->filter()->take(2) ->map(fn ($w) => mb_substr($w, 0, 1)) ->implode('') ?: '؟'; $genderClass = ($t->patient->gender ?? null) === 'female' ? 'gender-female' : ''; $sm = $statusMeta[$t->status] ?? ['label' => $t->status, 'color' => 'secondary', 'icon' => 'circle']; @endphp @endforeach
المريض التحليل الطبيب التاريخ الحالة الملف
{{ $initials }}
{{ $name ?: '—' }} @if($t->patient?->file_number)
{{ $t->patient->file_number }}
@endif
{{ $t->test_name }} @if($t->notes)
{{ Str::limit($t->notes, 40) }}
@endif
د. {{ $t->doctor?->name ?? '—' }} {{ optional($t->test_date)->format('Y-m-d') ?? '—' }} {{ $sm['label'] }} @if($t->file_path) @else @endif
@if($tests->hasPages()) @endif @endif
{{-- ============================================================ --}} {{-- Request lab-test modal --}} {{-- ============================================================ --}} @endsection @push('scripts') @endpush