{{-- 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)
{{ trans('site.medical_file.welcome', ['name' => auth('web')->user()->name]) }}
@endunless
@csrf @method('PUT')

{{ trans('site.medical_file.intro') }}

@foreach ($steps as $n => $step)
{{ $n + 1 }} {{ trans("site.medical_file.steps.$step.title") }} {{ trans("site.medical_file.steps.$step.text") }} @if ($step === 'conditions')
@error('date_of_birth')
{{ $message }}
@enderror
@error('gender')
{{ $message }}
@enderror
@error('occupation')
{{ $message }}
@enderror
@foreach ($conditionOptions as $option) code] ?? false))> @endforeach
@error('medical_history.other')
{{ $message }}
@enderror
@elseif ($step === 'surgery')
@error('surgical_history.type')
{{ $message }}
@enderror
@error('surgical_history.date')
{{ $message }}
@enderror
@error('surgical_history.hospital')
{{ $message }}
@enderror
@error('surgical_history.notes')
{{ $message }}
@enderror
@elseif ($step === 'medications')
@foreach ($medicationOptions as $option) code] ?? false))> @endforeach
@error('medication_history.other')
{{ $message }}
@enderror
@error('medication_history.notes')
{{ $message }}
@enderror
@else
@error('allergy_type')
{{ $message }}
@enderror
@error('allergy_severity')
{{ $message }}
@enderror
@error('allergy_substance')
{{ $message }}
@enderror
@error('allergy_notes')
{{ $message }}
@enderror
@endif
@endforeach
@if ($hasFile) {{ trans('site.medical_file.cancel') }} @else {{ trans('site.medical_file.later') }} @endif