@php $item = $drug->inventoryItem; $lowStock = $item && $item->reorder_level && $item->quantity_on_hand <= $item->reorder_level; $safety = collect([ $drug->is_controlled ? ['shield', 'text-red-500', $drug->controlled_schedule_label.' — controlled'] : null, $drug->is_high_alert ? ['exclamation', 'text-amber-500', 'High alert'] : null, $drug->is_essential ? ['check', 'text-emerald-500', 'Essential'] : null, $drug->is_pregnancy_safe ? ['heart-pulse', 'text-pink-500', 'Pregnancy category '.strtoupper((string) $drug->pregnancy_category)] : null, ! $drug->is_active ? ['x', 'text-slate-400', 'Retired'] : null, ])->filter(); @endphp {{ $drug->code }} @if ($drug->strength) {{ $drug->strength }} @endif @foreach ($safety as [$icon, $tone, $label]) {{ $label }} @endforeach @can('drugs.manage') Amend @endcan @can('prescriptions.create') Write prescription @endcan @if ($stock !== null && $stock <= 0) {{ $drug->display_name }} is linked to the shelf but nothing is on it — the counter cannot dispense until a batch is received. @elseif ($lowStock) {{ number_format($item->quantity_on_hand) }} {{ $item->unit }} on hand against a reorder level of {{ number_format($item->reorder_level) }}. @endif
Formulary code
{{ $drug->code }}
Default route
{{ $drug->route_label }}
Therapeutic class
{{ $drug->therapeutic_class ?? '—' }}
Pharmacological class
{{ $drug->pharmacological_class ?? '—' }}
Pregnancy category
{{ $drug->pregnancy_category ? strtoupper($drug->pregnancy_category) : '—' }} @if ($drug->is_pregnancy_safe) · safe in pregnancy @endif @if ($drug->is_breastfeeding_safe) · safe while breastfeeding @endif
Storage
{{ $drug->storage_conditions ?? $item?->storage_conditions ?? '—' }}
Adult dose
{{ $drug->adult_dose ?? '—' }}
Paediatric dose
{{ $drug->pediatric_dose ?? '—' }}
Maximum daily dose
{{ $drug->max_daily_dose ?? '—' }}
Default frequency
{{ lookup_label('drug_frequency', $drug->default_frequency) }}
Default course
{{ $drug->default_duration_days ? $drug->default_duration_days.' day'.((int) $drug->default_duration_days === 1 ? '' : 's') : '—' }}
@if ($drug->prescription_notes)
Note shown when prescribing
{{ $drug->prescription_notes }}
@endif
@if ($drug->indications || $drug->contraindications || $drug->side_effects || $drug->drug_interactions || $drug->precautions)
@foreach ([ 'Indications' => $drug->indications, 'Contraindications' => $drug->contraindications, 'Side effects' => $drug->side_effects, 'Interactions' => $drug->drug_interactions, 'Precautions' => $drug->precautions, ] as $heading => $body) @if ($body)

{{ $heading }}

{{ $body }}

@endif @endforeach
@endif @if ($item) Shortest-dated first — what the pharmacy reaches for under FEFO. @if ($item->batches->isEmpty())
@else
@foreach ($item->batches as $batch) @endforeach
Batch Expiry Available Cost Price Status
{{ $batch->batch_number }} @if ($batch->expiry_date) {{ $batch->expiry_date->format('d M Y') }} {{ $batch->days_to_expiry }} days @else No date @endif {{ number_format($batch->quantity_available) }} {{ money($batch->unit_cost, false) }} {{ money($batch->selling_price, false) }}
@endif
@endif
@if ($item)
Item
{{ $item->name }}
On hand
{{ number_format($item->quantity_on_hand) }} {{ $item->unit }}
Reorder level
{{ $item->reorder_level !== null ? number_format($item->reorder_level).' '.$item->unit : '—' }}
Selling price
{{ $item->selling_price !== null ? money($item->selling_price) : '—' }}
@else

Not linked to a shelf item — the drug can be written on a script, but the pharmacy cannot hand it over from stock until it is linked in administration.

@endif
Prescription lines
{{ number_format($prescribedLines) }}
Availability
{{ $drug->is_active ? 'Available for new scripts' : 'Retired — past scripts only' }}