{{ $data['title'] }}

@if(isset($clinic) && $clinic) @else @endif
Generated: {{ $dateFrom->format('d M Y') }} - {{ $dateTo->format('d M Y') }}
Clinic: {{ $clinic->name }}
Clinic: All Clinics
Report Type: {{ ucwords(str_replace('_', ' ', $type)) }}
Printed: {{ now()->format('d M Y, h:i A') }}
@if($type === 'expectant_mothers' && isset($data['mothers']))
Total Mothers
{{ $data['total'] }}
Active
{{ $data['active'] }}
Registration Completed
{{ $data['registered_completed'] }}
@foreach($data['mothers'] as $mother) @endforeach
Series No. Full Name Email Phone Clinic Zone Registered
{{ $mother->series_number }} {{ $mother->mother_full_name }} {{ $mother->user->email ?? 'N/A' }} {{ $mother->phone_number ?? 'N/A' }} {{ $mother->clinic->name ?? 'N/A' }} {{ $mother->currentAssignment?->zone->zone_code ?? 'Unassigned' }} {{ $mother->created_at->format('d M Y') }}
@elseif($type === 'nurses' && isset($data['nurses']))
Total Nurses
{{ $data['total'] }}
Active
{{ $data['active'] }}
Inactive
{{ $data['inactive'] }}
@foreach($data['nurses'] as $nurse) @endforeach
Staff ID Name Email Phone Clinic Status Registered
{{ $nurse->staff_id ?? 'N/A' }} {{ $nurse->name }} {{ $nurse->email }} {{ $nurse->phone ?? 'N/A' }} {{ $nurse->clinic->name ?? 'N/A' }} {{ $nurse->is_active ? 'Active' : 'Inactive' }} {{ $nurse->created_at->format('d M Y') }}
@elseif($type === 'clinic_admins' && isset($data['admins']))
Total Admins
{{ $data['total'] }}
Active
{{ $data['active'] }}
Inactive
{{ $data['inactive'] }}
@foreach($data['admins'] as $admin) @endforeach
Name Email Phone Clinic Status Registered
{{ $admin->name }} {{ $admin->email }} {{ $admin->phone ?? 'N/A' }} {{ $admin->clinic->name ?? 'N/A' }} {{ $admin->is_active ? 'Active' : 'Inactive' }} {{ $admin->created_at->format('d M Y') }}
@elseif($type === 'staff_summary' && isset($data['summary'])) @foreach($data['summary'] as $item) @endforeach
Clinic Total Nurses Active Nurses Total Admins Active Admins
{{ $item['clinic']->name }} {{ $item['nurses'] }} {{ $item['active_nurses'] }} {{ $item['clinic_admins'] }} {{ $item['active_admins'] }}
@elseif($type === 'mothers_summary' && isset($data['summary']))
Total Mothers (System-wide)
{{ $data['total_mothers'] }}
@foreach($data['summary'] as $item) @endforeach
Clinic Total Mothers Active Mothers Assigned Unassigned
{{ $item['clinic']->name }} {{ $item['total_mothers'] }} {{ $item['active_mothers'] }} {{ $item['assigned_mothers'] }} {{ $item['unassigned_mothers'] }}
@elseif($type === 'zone_distribution' && isset($data['zones']))
Total Zones
{{ $data['total_zones'] }}
Active Zones
{{ $data['active_zones'] }}
Total Mothers
{{ $data['zones']->sum(function($zone) { return $zone->motherAssignments->count(); }) }}
Total Nurses
{{ $data['zones']->sum('active_nurses_count') }}
@foreach($data['zones'] as $zone)

Zone {{ $zone->zone_code }} - {{ $zone->zone_name }} @if($zone->is_active) Active @else Inactive @endif

Coverage Areas: @if($zone->coverage_areas && is_array($zone->coverage_areas) && count($zone->coverage_areas) > 0) {{ implode(', ', $zone->coverage_areas) }} @else Not specified @endif

Boundary Notes: {{ $zone->boundary_notes ?? 'No notes' }}

Assigned Nurses ({{ $zone->active_nurses_count ?? 0 }})

@if($zone->nurses && $zone->nurses->count() > 0)
    @foreach($zone->nurses as $nurse)
  • {{ $nurse->name }} ({{ $nurse->staff_id ?? 'N/A' }}) @if($zone->currentNurse && $zone->currentNurse->id === $nurse->id) Current @endif
  • @endforeach
@else

No nurses assigned

@endif

Assigned Mothers ({{ $zone->motherAssignments->count() }})

@if($zone->motherAssignments && $zone->motherAssignments->count() > 0) @foreach($zone->motherAssignments as $index => $assignment) @endforeach
No. Mother Name Series Number Assigned Nurse Assignment Type
{{ $index + 1 }} {{ $assignment->expectantMother->mother_full_name ?? 'N/A' }} {{ $assignment->expectantMother->series_number ?? 'N/A' }} {{ $assignment->nurse->name ?? 'Unassigned' }} {{ ucfirst($assignment->assignment_type ?? 'N/A') }}
@else

No mothers assigned

@endif
@endforeach @elseif($type === 'registration_trends' && isset($data['mothers_trend']))

Mothers Registration Trend

@foreach($data['mothers_trend'] as $trend) @endforeach
Month Registrations
{{ $trend->month }} {{ $trend->count }}

Nurses Registration Trend

@foreach($data['nurses_trend'] as $trend) @endforeach
Month Registrations
{{ $trend->month }} {{ $trend->count }}
@elseif($type === 'clinic_overview' && isset($data['clinic']))
Total Nurses
{{ $data['nurses'] }}
Clinic Admins
{{ $data['clinic_admins'] }}
Total Mothers
{{ $data['mothers'] }}
Total Zones
{{ $data['zones'] }}

Clinic Information

Clinic Name: {{ $data['clinic']->name }}
Clinic Code: {{ $data['clinic']->clinic_code ?? 'N/A' }}
Address: {{ $data['clinic']->address ?? 'N/A' }}
Phone: {{ $data['clinic']->phone ?? 'N/A' }}
Total Zones: {{ $data['zones'] }} ({{ $data['active_zones'] }} Active)
Active Mothers: {{ $data['active_mothers'] }} / {{ $data['mothers'] }}
Active Nurses: {{ $data['active_nurses'] }} / {{ $data['nurses'] }}
@else

Report data not available for printing.

@endif