{{-- DTHospital - write or edit a prescription. The medicine rows repeat. A drug can be picked from the catalogue or typed in free, because a doctor writing something the hospital does not stock should not be blocked by the stock list. Copyright (c) ICT Innovations Part of DTHospital Licensed under the GNU General Public License v3.0. --}} @extends('layouts.master') @section('style') @stop @section('content') @php($editing = (bool) $prescription->id) @php($rows = old('items', $editing ? $prescription->items->toArray() : [])) @php($rows = count($rows) ? $rows : [[]])

{{ $editing ? 'Edit prescription' : 'Write prescription' }}

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

Medicines *

@foreach ($rows as $i => $row) @endforeach
From the catalogue or type a name Dosage Duration Instructions
Cancel
@stop @section('script') @stop