@extends('layouts.admin') @section('page_kicker', 'Clinical ops') @section('page_title', 'Patient management') @section('content')

Search patients

Filter by name, email, or phone.

@foreach($patients as $patient) @php($profile = $patient->patientProfiles->first())

{{ $patient->name }}

{{ $patient->is_active ? 'Active' : 'Inactive' }}

{{ $patient->email }} · Phone: {{ $patient->phone ?? 'N/A' }}

Appointments: {{ \App\Models\HospitalAppointment::where('hospital_id', auth()->user()->hospital_id)->where('patient_id', $patient->id)->count() }} · Prescriptions: {{ \App\Models\Prescription::where('hospital_id', auth()->user()->hospital_id)->where('patient_id', $patient->id)->count() }}

@csrf @method('PATCH')
@if($profile)
is_vip) onchange="document.getElementById('restricted-{{ $patient->id }}').disabled = !this.checked">
chart_restricted) @disabled(! $profile->is_vip)>

Restricted charts are hidden from department lists for other doctors; enable VIP first.

@endif
@endforeach
{{ $patients->links() }}
@endsection