{{-- Medical file form in four steps (Figma "Patient-details"): conditions, surgery, medications, allergies. --}} @php $hasFile = (bool) $profile?->hasMedicalFile(); $medicalHistory = old('medical_history', $profile?->medical_history ?? []); $surgicalHistory = old('surgical_history', $profile?->surgical_history ?? []); $medicationHistory = old('medication_history', $profile?->medication_history ?? []); $hadSurgery = (bool) ($surgicalHistory['had_surgery'] ?? false); $steps = ['conditions', 'surgery', 'medications', 'allergies']; $laterUrl = Route::has('account.dashboard') ? route('account.dashboard') : route('home'); @endphp @unless ($hasFile)