@php /* | The status enum names a Bootstrap contextual colour, because that is what | it was written against and the same enum labels the prescriptions listing. | Mapped here rather than changed there — this panel's design language is | not a reason to move it. */ $pill = fn (string $tone): string => match ($tone) { 'success' => 'px-pill--green', 'danger' => 'px-pill--red', 'info' => 'px-pill--blue', default => 'px-pill--grey', }; @endphp {{-- The prescribing panel on the consultation screen. Contributed through the `encounter.sidebar` slot, so it appears only when the Prescriptions module is installed, enabled and licensed. Its data comes from EncounterPanelComposer. --}} @forelse ($encounterPrescriptions as $prescription)
{{ $prescription->reference }} {{ trans_choice('prescriptions::messages.prescriptions.items_count', $prescription->items_count, ['count' => $prescription->items_count]) }}
{{ $prescription->status->label() }}
@empty

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

@endforelse {{-- Only while the consultation is open. A prescription started against a closed encounter has no clinical context behind it, and the listener that abandons unissued drafts on close has already run. --}} @if ($encounterIsOpen && $patientUlid !== null) @can('create', \App\Modules\Prescriptions\Models\Prescription::class)
@csrf
@endcan @endif