{{-- Read-only medical file, shown once the patient has filled it. --}} @php $medicalHistory = $profile->medical_history ?? []; $surgicalHistory = $profile->surgical_history ?? []; $medicationHistory = $profile->medication_history ?? []; $conditions = $conditionOptions->filter(fn ($option) => ! empty($medicalHistory[$option->code] ?? false)); $medications = $medicationOptions->filter(fn ($option) => ! empty($medicationHistory[$option->code] ?? false)); $notSet = trans('site.medical_file.not_set'); @endphp

{{ trans('site.medical_file.last_updated', ['date' => $profile->updated_at?->translatedFormat('j F Y')]) }}

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

{{ trans('clinic.patient_profile.basic_info') }}

{{ trans('clinic.patient_profile.date_of_birth') }}
{{ $profile->date_of_birth?->translatedFormat('j F Y') ?? $notSet }}
{{ trans('clinic.patient_profile.gender') }}
{{ $profile->gender ? trans('clinic.patient_profile.'.$profile->gender) : $notSet }}
{{ trans('clinic.patient_profile.occupation') }}
{{ $profile->occupation ?: $notSet }}

{{ trans('site.medical_file.steps.conditions.title') }}

@if ($conditions->isEmpty() && empty($medicalHistory['other']))

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

@else
@foreach ($conditions as $option) {{ $option->name }} @endforeach @if (! empty($medicalHistory['other'])) {{ $medicalHistory['other'] }} @endif
@endif

{{ trans('site.medical_file.steps.surgery.title') }}

@if (empty($surgicalHistory['had_surgery']))

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

@else
{{ trans('clinic.patient_profile.surgery_type') }}
{{ ($surgicalHistory['type'] ?? null) ?: $notSet }}
{{ trans('clinic.patient_profile.surgery_date') }}
{{ ($surgicalHistory['date'] ?? null) ? \Illuminate\Support\Carbon::parse($surgicalHistory['date'])->translatedFormat('j F Y') : $notSet }}
{{ trans('clinic.patient_profile.hospital') }}
{{ ($surgicalHistory['hospital'] ?? null) ?: $notSet }}
@if (! empty($surgicalHistory['notes']))
{{ trans('clinic.patient_profile.notes') }}
{{ $surgicalHistory['notes'] }}
@endif
@endif

{{ trans('site.medical_file.steps.medications.title') }}

@if ($medications->isEmpty() && empty($medicationHistory['other']) && empty($medicationHistory['notes']))

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

@else
@foreach ($medications as $option) {{ $option->name }} @endforeach @if (! empty($medicationHistory['other'])) {{ $medicationHistory['other'] }} @endif
@if (! empty($medicationHistory['notes']))

{{ $medicationHistory['notes'] }}

@endif @endif

{{ trans('site.medical_file.steps.allergies.title') }}

@if (! $profile->allergy_type && ! $profile->allergy_substance)

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

@else
{{ trans('clinic.patient_profile.allergy_type') }}
{{ $profile->allergy_type ? trans('clinic.patient_profile.allergy_types.'.$profile->allergy_type) : $notSet }}
{{ trans('clinic.patient_profile.allergy_substance') }}
{{ $profile->allergy_substance ?: $notSet }}
{{ trans('clinic.patient_profile.allergy_severity') }}
{{ $profile->allergy_severity ? trans('clinic.patient_profile.severities.'.$profile->allergy_severity) : $notSet }}
@if ($profile->allergy_notes)
{{ trans('clinic.patient_profile.notes') }}
{{ $profile->allergy_notes }}
@endif
@endif