{{ __('Patient 360 View') }}: {{ $patient->name }}

MRN: {{ $patient->mrn }}

{{ __('Basic Information') }}

{{ __('Mobile') }}: {{ $patient->phone }}
{{ __('Email') }}: {{ $patient->email ?? '-' }}
{{ __('Gender') }}: {{ ucfirst($patient->gender) }}
{{ __('Birthday') }}: {{ $patient->date_of_birth?->format('Y-m-d') ?? '-' }}

{{ __('Marketing Attribution') }}

@if($patient->leads->first()) @php $lead = $patient->leads->first(); @endphp
{{ __('Source') }}: {{ $lead->source->name ?? '-' }}
{{ __('Campaign') }}: {{ $lead->campaign->name ?? '-' }}
{{ __('UTM Parameters') }}
Src: {{ $lead->utm_source ?? 'N/A' }}
Med: {{ $lead->utm_medium ?? 'N/A' }}
@else

{{ __('No CRM data available') }}

@endif

{{ __('Financial Summary') }}

{{ __('Total Revenue') }}
SAR {{ number_format($invoices->sum('total_amount'), 2) }}
{{ __('Invoices') }}
{{ $invoices->count() }}
{{ __('Paid') }}
{{ $invoices->where('status', 'paid')->count() }}
    @foreach($patient->leads as $lead) @foreach($lead->activities as $activity)
  • {{ $activity->type->name ?? __('Activity') }}

    {{ $activity->description }}

    {{ $activity->activity_at->format('Y-m-d H:i') }}
  • @endforeach @endforeach @foreach($patient->appointments as $appointment)
  • {{ __('Medical Appointment') }}

    {{ $appointment->clinic->name ?? '' }} - Dr. {{ $appointment->doctor->name ?? '' }}

    {{ $appointment->status }}
    {{ $appointment->appointment_date }}
  • @endforeach @endforeach

{{ __('Sales Opportunities') }}

@forelse($patient->opportunities as $opp) @empty @endforelse
{{ __('Opportunity') }} {{ __('Stage') }} {{ __('Value') }} {{ __('Closing Date') }}
{{ $opp->name }} {{ $opp->stage->name ?? '-' }} SAR {{ number_format($opp->expected_revenue, 2) }} {{ $opp->expected_closing_date?->format('Y-m-d') ?? '-' }}
{{ __('No opportunities found') }}