{{-- Partial: Patient Summary card --}}
| Nama Lengkap | {{ $appointment->patient->name }} |
| NIK | {{ $appointment->patient->nik ?? '-' }} |
| Tanggal Lahir | {{ $appointment->patient->birth_date ? \App\Helpers\DateHelper::formatShort($appointment->patient->birth_date) : '-' }} |
| No. Registrasi | {{ $appointment->registration_number ?? $appointment->id }} |
| Tanggal MCU | {{ \App\Helpers\DateHelper::formatShort( $appointment->appointment_date, ) }} |
| Paket MCU | {{ $appointment->mcuPackage->name ?? '-' }} |
| MCU Ke | @php $mcuOrder = $appointment->patient ->appointments() ->where('status', '!=', 'cancelled') ->where(function ($q) use ($appointment) { $q->where('appointment_date', '<', $appointment->appointment_date)->orWhere(function ($q2) use ($appointment) { $q2->where('appointment_date', $appointment->appointment_date)->where('id', '<=', $appointment->id); }); }) ->count(); $previousMcu = $appointment->patient ->appointments() ->where('status', '!=', 'cancelled') ->where(function ($q) use ($appointment) { $q->where('appointment_date', '<', $appointment->appointment_date)->orWhere(function ($q2) use ($appointment) { $q2->where('appointment_date', $appointment->appointment_date)->where('id', '<', $appointment->id); }); }) ->orderByDesc('appointment_date') ->first(); @endphp MCU ke-{{ $mcuOrder }} @if ($previousMcu) MCU Terakhir: {{ \App\Helpers\DateHelper::formatFull($previousMcu->appointment_date) }} @else Pertama kali @endif |
| Perusahaan/Jabatan | @php $companyRel = $appointment->company ?? ($appointment->patient->company ?? ($appointment->mcuResult->company ?? null)); $companyName = $companyRel->name ?? null; @endphp @if ($companyName) {{ $companyName }} @else Pribadi @endif / {{ $appointment->patient->job_position ?? ($appointment->patient->occupation ?? '-') }} |