@include('admin.header')
@include('admin.topbar') @include('admin.leftbar')

Doctor List

New Doctor
@php function formatGrowth($growth) { $percentage = $growth['percentage'] ?? 0; $trend = $growth['trend'] ?? 'up'; // Cap extreme values if ($percentage > 999) { $display = '999%+'; } else { $display = round($percentage) . '%'; } return [ 'display' => $display, 'badgeClass' => $trend === 'up' ? 'bg-success' : 'bg-danger' ]; } $totalDoctorGrowth = formatGrowth($doctor_graph_data['doctorGrowth']); $totalActiveGrowth = formatGrowth($doctor_graph_data['activeGrowth']); $totalInactiveGrowth = formatGrowth($doctor_graph_data['inactiveGrowth']); $totalVerifiedGrowth = formatGrowth($doctor_graph_data['verifiedGrowth']); @endphp
img
{{ $totalDoctorGrowth['display'] }}

vs last month

Total Doctors

{{ $doctor_graph_data['totalDoctors'] }}

img
{{ $totalVerifiedGrowth['display'] }}

vs last month

Total Verified

{{ $doctor_graph_data['totalVerified'] }}

img
{{ $totalActiveGrowth['display'] }}

vs last month

Total Active

{{ $doctor_graph_data['totalActive'] }}

img
{{ $totalInactiveGrowth['display'] }}

vs last month

Total Inactive

{{ $doctor_graph_data['totalInactive'] }}

Doctors Management
@if(!empty($doctor_array)) @php $i=1; @endphp @foreach($doctor_array as $key => $list_data) @php $totalPatients = CommonTrait::getTotalPatientsByDoctor($list_data->id); $totalEarning = CommonTrait::getTotalearningByDoctor($list_data->id); $doctorFees = CommonTrait::getDoctorConsultationFees($list_data->id,$list_data->clinic_id); $specilitiesName = CommonTrait::getSpecilitiesName($list_data->id); $verifiedStatus = CommonTrait::getVerifyiedStatus($list_data->id); $checklist = CommonTrait::getDoctorProfileChecklist($list_data->id); $profileData = CommonTrait::getDoctorProfileCompletion($list_data->id); $profilePercent = $profileData['percent']; $checkVerification = CommonTrait::getVerificationStatus($list_data->doctor_id,$list_data->id); $getCityName = CommonTrait::getCity($list_data->city_id); $getStateName = CommonTrait::getState($list_data->state_id); $profileUpdateRequest = DB::table('doctor_profile_update_requests') ->where('doctor_user_id', $list_data->id) ->whereIn('status', ['pending', 'partial']) ->latest() ->first(); $requestData = []; $approvalStatus = []; if ($profileUpdateRequest) { $requestData = json_decode($profileUpdateRequest->request_data, true) ?? []; $approvalStatus = json_decode($profileUpdateRequest->approval_status, true) ?? []; } $pendingFields = []; foreach ($approvalStatus as $field => $status) { if ($status == 'pending') { $pendingFields[] = ucwords(str_replace('_', ' ', $field)); }else if($status == 'rejected') { $pendingFields[] = ucwords(str_replace('_', ' ', $field)) . ' (Rejected)'; } } @endphp
# Doctor Status Performance State/City Fees / Earnings Activity Actions
{{$i}}
{{$list_data->salutation}} {{$list_data->first_name}} {{$list_data->last_name}} @if($list_data->recommendation_status == 1) Top Rated @endif @if(!empty($pendingFields))
Update Pending Approval
@foreach($pendingFields as $field) {{ $field }} @endforeach
@endif
{{$specilitiesName}}
{{$list_data->doctor_qualifications}}
Reg: {{$list_data->registration_number ?? 'N/A'}}
{{$list_data->clinic_name}}, {{$list_data->clinic_address}}, {{$list_data->state}}
{{$list_data->email}} | +91 {{$list_data->phone}}
Profile Completation : {{$profilePercent}}%
{{ ucwords($list_data->status) }} @if($list_data->doctor_live_web_app == 'Yes') Live on Web App @else Web App Not Active @endif {{ $verifiedStatus }} @if($list_data->CMS_access == 'Yes') CMS Enabled @else No CMS @endif @if($checkVerification->final_verification_status == 'approved') Verified @else Verification Pending @endif Patients: {{ $totalPatients > 0 ? '(' . number_format($totalPatients) . ')' : 0 }}
Rating: ⭐ {{ number_format($list_data->avg_rating ?? 0, 1) }} {{$list_data->total_reviews > 0 ? '(' . number_format($list_data->total_reviews) . ')' : '' }}
Exp: {{$list_data->years_of_experience}} years
State : {{ $getStateName }}
City : {{ $getCityName }}
Video: ₹{{ number_format($doctorFees['online']) }}
Clinic: ₹{{ number_format($doctorFees['clinic']) }}
Total Earned: ₹{{ \App\Helpers\CommonHealper::formatIndianCurrency($totalEarning ?? 0) }}
Registered: {{$list_data->registered_date}}
Last Login: {{$list_data->last_login_at ?? 'N/A'}}