@extends('layouts.app') @section('title', 'Manajemen Pasien - MCU Klinik Mustika') @section('breadcrumb')

Manajemen Pasien

@endsection @section('content')
Jenis Pasien
@canRoute ('patients.index') Korporat
{{ $counts['corporate'] }}
@endcanRoute @canRoute ('patients.index') Individu
{{ $counts['individual'] }}
@endcanRoute @canRoute ('patients.index') Semua
{{ $counts['total'] }}
@endcanRoute
Filter Perusahaan
@if (request()->has('date_filter')) @endif @if (request()->has('patient_type')) @endif @if (request()->has('search')) @endif @if (request()->has('company_id') || request()->has('date_filter') || request()->has('patient_type')) @canRoute ('patients.index') Reset @endcanRoute @endif
Daftar Pasien
@if (app(\App\Services\RoleAccess::class)->allows( auth()->user(), 'patients.bulk-move-to-invitation' ))
Centang pasien (termasuk status Undangan) lalu pindahkan ke undangan perusahaan.
@endif
@php $quickDateValue = request('date_from') ?? ''; @endphp
{{ $patients->total() }} Pasien {{ \App\Helpers\DateHelper::formatShort(now()) }}
@include('partials.tables.filters', [ 'paginator' => $patients, 'tableFilters' => ['company_id', 'date_filter', 'date_from', 'date_to', 'patient_type', 'sort', 'direction'] ]) @forelse ($patients as $patient) @empty @endforelse
No. @include('partials.tables.sort_link', ['column' => 'created_at', 'label' => 'Tanggal Daftar']) @include('partials.tables.sort_link', ['column' => 'medical_record_number', 'label' => 'No. MR']) @include('partials.tables.sort_link', ['column' => 'name', 'label' => 'Nama Pasien']) @include('partials.tables.sort_link', ['column' => 'nik', 'label' => 'NIK']) @include('partials.tables.sort_link', ['column' => 'gender', 'label' => 'Jenis Kelamin']) @include('partials.tables.sort_link', ['column' => 'birth_date', 'label' => 'Tanggal Lahir']) @include('partials.tables.sort_link', ['column' => 'phone_number', 'label' => 'Telepon']) @include('partials.tables.sort_link', ['column' => 'company', 'label' => 'Perusahaan']) @include('partials.tables.sort_link', ['column' => 'mcu_visits_count', 'label' => 'Jumlah MCU']) Aksi
{{ $patients->firstItem() + $loop->index }}
{{ \App\Helpers\DateHelper::formatShort( $patient->created_at, ) }} {{ \Carbon\Carbon::parse($patient->created_at)->format( 'H:i', ) }}
{{ $patient->medical_record_number }}
@if (app(\App\Services\RoleAccess::class)->allows( auth()->user(), 'patients.bulk-move-to-invitation' ))
@endif
{{ $patient->name }} @if ($patient->nickname)
({{ $patient->nickname }}) @endif
{{ $patient->nik ?? '-' }} {{ $patient->gender == 'male' ? 'Laki-laki' : 'Perempuan' }} {{ \App\Helpers\DateHelper::formatShort( $patient->birth_date, ) }} {{ $patient->phone_number }} @if ($patient->company)
{{ $patient->company->name }} @if ($patient->job_position) {{ $patient->job_position }} @endif @if (($patient->corporate_invitation_employees_count ?? 0) > 0) Undangan @else Bukan Undangan @endif
@else Individu @endif
@php $mcuAppointments = $patient->appointments ->filter(function ($apt) { return $apt->status !== 'cancelled'; }) ->sortBy('appointment_date'); $mcuCount = $mcuAppointments->count(); @endphp @if ($mcuCount > 0)
{{ $mcuCount }}x MCU @foreach ($mcuAppointments as $mcuAppointment) MCU Ke-{{ $loop->iteration }} : {{ \App\Helpers\DateHelper::formatFull( $mcuAppointment->appointment_date, ) }} @endforeach
@else - @endif
@canRoute ('patients.show') @endcanRoute @canRoute ('patients.edit') @endcanRoute
{{ $patients->links('pagination::bootstrap-5') }}
@if (app(\App\Services\RoleAccess::class)->allows( auth()->user(), 'patients.bulk-move-to-invitation' )) @endif @endsection @push('scripts') @endpush