{{-- The prescription document. One template, two renderers. The browser draws it as a premium A4-shaped card and prints it; DomPDF draws the same markup for the downloadable copy. That is why the layout is built from tables and simple boxes rather than flex and grid: DomPDF understands CSS 2.1, and a second template for the PDF would be a second thing to keep in step with a legal document. Screen-only chrome — the page background, the toolbar, the card shadow — lives inside @media screen, which DomPDF ignores. --}}
|
{{ $clinicName }}
@if ($clinicAddress)
{{ $clinicAddress }}
@endif
{{ $clinicContact }}
@if ($clinicRegistration)
{{ __('prescriptions::messages.print.clinic_registration') }}: {{ $clinicRegistration }}
@endif
|
|
{{ $patient?->name ?? '—' }}
{{ __('prescriptions::messages.print.mrn') }}: {{ $patient?->mrn ?? '—' }}
|
{{-- Ruled apart, as in the reference: three short facts
run together read as one sentence. --}}
{{ __('prescriptions::messages.print.age') }}
{{ $patient?->ageLabel ?: '—' }}
|
{{-- The reference and the date it was written. The status
and the copy number are not printed: on paper handed to
a patient they say nothing the sheet itself does not,
and both are on the screen where the decisions about
them are actually made. --}}
{{ __('prescriptions::messages.print.title') }}
{{ $prescription->reference }}
{{ __('prescriptions::messages.print.date') }}:
{{ ($prescription->issued_at ?? $prescription->created_at)?->format('d M Y') ?? '—' }}
|
{{ __('prescriptions::messages.print.valid_until') }}
{{ $prescription->valid_until?->format('d M Y') ?? '—' }}
|
| {{ $condition->name }} {{-- Resolved is worth printing and worth marking: a pharmacist reading "hypertension" needs to know it is history, not why this sheet was written. --}} @unless ($condition->isCurrent) · {{ __('patients::messages.status.'.$condition->status) }} @endunless | @if ($condition->diagnosedOn) {{ __('prescriptions::messages.conditions.since') }} {{ \Illuminate\Support\Carbon::parse($condition->diagnosedOn)->format('M Y') }} @endif |
| ℞ | {{ __('prescriptions::messages.print.medications') }} |
| # | {{ __('prescriptions::messages.items.drug') }} | {{ __('prescriptions::messages.items.dose') }} | {{ __('prescriptions::messages.items.frequency') }} | {{ __('prescriptions::messages.items.duration') }} | {{ __('prescriptions::messages.items.quantity') }} |
|---|---|---|---|---|---|
| {{ str_pad((string) $loop->iteration, 2, '0', STR_PAD_LEFT) }} |
{{ $item->drug_name }}
@if ($item->strength) {{ $item->strength }} @endif
@if ($item->form) {{ $item->form }} @endif
@if ($item->is_controlled) CD @endif
@if ($item->generic_name && $item->generic_name !== $item->drug_name)
{{ $item->generic_name }}
@endif
@if ($item->indication)
{{ __('prescriptions::messages.items.indication') }}: {{ $item->indication }}
@endif
{{-- The line the patient follows, kept with the
medicine it belongs to rather than split across
columns that vanish on a phone. --}}
@if ($item->instructions)
{{ $item->instructions }}
@endif
|
{{ $item->dose ?: '—' }} |
{{ $item->frequency ?: '—' }}
@if ($item->is_prn)
{{ __('prescriptions::messages.items.prn') }}
@endif
|
{{ $item->duration ? $item->durationLabel() : '—' }} | {{ $item->quantity ? trim(rtrim(rtrim((string) $item->quantity, '0'), '.').' '.$item->quantity_unit) : '—' }} |
| {{ __('prescriptions::messages.items.empty') }} | |||||
|
{{ __('prescriptions::messages.print.prescriber') }}
{{--
Only what is on file.
A prescriber is resolved through their clinician profile —
qualifications, specialty and registration number all live
there. An account that issues a prescription without one has
no details to print, and inventing them on a legal document
is not an option, so the sheet says plainly that they are
missing and where they come from.
--}}
@if ($doctor)
{{ $doctor->name }}
@if ($doctor->qualifications)
{{ $doctor->qualifications }}
@endif
@if ($doctor->specialty)
{{ $doctor->specialty }}
@endif
@if ($doctor->licenseNumber)
{{ __('prescriptions::messages.print.registration') }}: {{ $doctor->licenseNumber }}
@endif
@else
{{ __('prescriptions::messages.print.prescriber_missing') }}
@endif
|
{{-- A ruled line, not a stored image: nothing in this product holds
a signature, and drawing one that was never given would be a
forgery on a legal document. --}}
{{ __('prescriptions::messages.print.signature') }}
|
| {{ $clinicName }} | {{ $clinicContact }} | {{ $prescription->reference }} · {{ __('prescriptions::messages.print.generated') }} {{ now()->format('d M Y, H:i') }} |