@extends('layouts.app') @section('title', 'Issue Sick Leave | ' . ($patient->full_name ?? '')) @section('content')
{{-- Breadcrumb / back --}}
← Back to {{ $patient->full_name }}

Issue Sick Leave Certificate

For {{ $patient->full_name }} · MRN {{ $patient->mrn }} · {{ ucfirst($patient->gender ?? '—') }} · {{ $patient->age ?? '—' }}

{{-- Inpatient pill (informs the days warning logic) --}} @if($isInpatient)
Patient is currently admitted as inpatient — no upper-limit warning will appear regardless of days selected.
@endif {{-- Minor pill (informs the recipient toggle below) --}} @if($isMinor)
Patient is a minor ({{ $patient->age }}). You can issue this certificate to a guardian instead — the medical justification stays the patient's; the time off is granted to the guardian for caregiving.
@endif @if($errors->any())
    @foreach($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif
@csrf {{-- ── Recipient toggle (only when patient is a minor) ── --}} @if($isMinor)

Issue Certificate To

{{-- Guardian sub-form: hidden until the radio flips --}}
@endif {{-- Treatment date --}}

The date the patient sought treatment at the facility. Defaults to today; you can backdate.

{{-- Days off --}}
{{-- Soft warning, only shown when days > 3 AND patient is not inpatient --}}
{{-- Attending clinician (sign-off name) --}}

@if($defaultClinicianId) Auto-selected: the clinician on this patient's most recent visit. Change if needed. @else No prior visit on record — select the clinician whose name should appear on the sign-off. @endif

{{-- Optional notes --}}

Use for documentation rationale (e.g., "approved by consultant for 5 days post-op"). Not printed on the certificate.

Cancel
{{-- Past certificates for this patient (audit context) --}} @if($previous->count())

Recent Certificates Issued to this Patient

@foreach($previous as $sl) @endforeach
Issued Treatment Date Days Sign-off Issued By
{{ $sl->issued_at?->format('d M Y H:i') }} {{ $sl->treatment_date?->format('d M Y') }} {{ $sl->days }} {{ $sl->sign_off_name }} {{ optional($sl->issuer)->name ?? '—' }} View
@endif
@endsection