@extends('layouts.app') @section('title', __('prescriptions::messages.formulary.title')) @section('content') {{-- ── Page head ──────────────────────────────────────────────────────── --}}

{{ __('prescriptions::messages.formulary.title') }}

{{ __('prescriptions::messages.formulary.subtitle') }}

{{-- The count, where a listing of a thousand rows needs it: knowing the formulary holds 1,183 drugs is the difference between "the search found nothing" and "there is nothing to find". --}} {{ trans_choice('prescriptions::messages.formulary.count', $drugs->total(), ['count' => number_format($drugs->total())]) }}
{{-- ── Search ─────────────────────────────────────────────────── --}} {{-- Outside the results region on purpose: that region is replaced wholesale when the filter runs, which would destroy the field somebody is typing into. --}}
{{ __('common.reset') }} {{-- Kept even though the list filters live: without a script this button is the only way to search. --}}
{{-- ── The list ───────────────────────────────────────────────── --}}
@if ($drugs->isEmpty())

{{ __('prescriptions::messages.formulary.empty') }}

{{ __('prescriptions::messages.formulary.empty_text') }}

@else
@foreach ($drugs as $drug) @endforeach
{{ __('prescriptions::messages.formulary.name') }} {{ __('prescriptions::messages.formulary.ingredients') }} {{ __('prescriptions::messages.formulary.form') }} {{ __('prescriptions::messages.formulary.strength') }}
{{ $drug->name }} @if ($drug->is_controlled) {{ __('prescriptions::messages.items.controlled') }} @endif @if ($drug->generic_name && $drug->generic_name !== $drug->name) {{ $drug->generic_name }} @endif {{ $drug->ingredients ?: '—' }} {{-- "Other" means the form is not recorded, which is true of most of the imported generics. Set quietly so a column of them does not read as a column of findings. --}} {{ $drug->form->label() }} {{ $drug->strength ?: '—' }}
@endif
@if ($drugs->hasPages())
{{ $drugs->links() }}
@endif
{{-- ── Add a drug ─────────────────────────────────────────────────── --}} @can('create', \App\Modules\Prescriptions\Models\Drug::class) @endcan
@endsection