{{-- DTHospital - ward board. Copyright (c) ICT Innovations Part of DTHospital Licensed under the GNU General Public License v3.0. --}} @extends('layouts.master') @section('style') @stop @section('content') @if (Session::get('success'))
{{ Session::get('success') }}
@endif @if (Session::get('error'))
{{ Session::get('error') }}
@endif

Beds {{ $free }} free of {{ $beds->count() }}


@if ($beds->isEmpty())

No beds yet. @if ($categories->isEmpty()) Add a ward type first. @else Add one. @endif

@else @foreach ($beds as $bed) @php($admission = $occupants->get((string) $bed->id)) @endforeach
Ward Bed Description Status Occupant Actions
{{ optional($categories->firstWhere('id', $bed->category))->category ?? '-' }} {{ $bed->number }} {{ $bed->description }} @if ($admission) Occupied @else Free @endif @if ($admission) {{ $patients[$admission->patient] ?? 'Unknown patient' }} since {{ $admission->a_time }} @else Admit @endif @unless ($admission)
{{ csrf_field() }}
@endunless
@endif
@stop @section('script') @stop