{{-- ICTHospital - dispense medicines. Arriving from a prescription pre-loads its drugs, which is the common case at a hospital counter: somebody turns up holding one. Copyright (c) DEVtrust Part of ICTHospital Licensed under the GNU General Public License v3.0. --}} @extends('layouts.master') @section('style') @stop @section('content') @php($prefill = $prescription ? $prescription->items->map(fn ($i) => ['medicine_id' => $i->medicine_id, 'name' => $i->name])->all() : []) @php($rows = old('items', count($prefill) ? $prefill : [[]]))

Dispense

@if (count($errors) > 0)
Check the form.
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if ($prescription)

Loaded from prescription #{{ $prescription->id }}. Quantities still need entering, since a prescription says what to take, not how much to hand over.

@endif
{{ csrf_field() }}

Items *

@foreach ($rows as $i => $row) @endforeach
Medicine or type a name Quantity Unit price
Blank means the full total.
Cancel
@stop @section('script') @stop