@extends('hms.layout') @section('title','Laboratory') @section('content')

Requested tests from physician consultations. Record patient arrival before entering results.

@forelse($orders as $order) @php $e = $encounters[$order->encounter_id] ?? null; $p = $e ? ($patients[$e->patient_id] ?? null) : null; @endphp @empty@endforelse
PatientTest requestedRequestedStatusAction
{{ $p?->first_name }} {{ $p?->last_name }}@foreach($items->get($order->id,collect()) as $item)
{{ $item->test_name }}@if($item->outcome) {{ ucfirst(str_replace('_',' ',$item->outcome)) }}@endif @if($item->result_details)
{{ $item->result_details }}
@endif
@endforeach
{{ $order->created_at->format('d M Y H:i') }} {{ str_replace('_',' ',$order->status) }} @if($canProcess && $order->status==='ordered')
@csrf
@elseif($canProcess && $order->status==='arrived')
@csrf @foreach($items->get($order->id,collect()) as $item)
@endforeach
@else Result recorded (awaiting verification) @endif
No test requests.
{{ $orders->links() }}
@endsection