@extends('layouts.practice-onboarding') @section('title', 'Practice Onboarding') @section('content') @php $statusClasses = [ 'action_required' => 'status-pill-warning', 'pending' => 'status-pill-warning', 'under_review' => 'status-pill-neutral', 'completed' => 'status-pill-good', 'rejected' => 'status-pill-critical', 'locked' => 'status-pill-neutral', 'not_applicable' => 'status-pill-neutral', ]; $categoryLabels = [ 'registration' => 'Registration', 'access' => 'Access', 'compliance' => 'Compliance', 'practice_setup' => 'Practice Setup', 'clinical_setup' => 'Clinical Setup', 'integration' => 'Integration', 'billing' => 'Billing', 'patient_access' => 'Patient Access', 'activation' => 'Activation', ]; $documentStatusClasses = [ 'under_review' => 'status-pill-neutral', 'verified' => 'status-pill-good', 'rejected' => 'status-pill-critical', 'superseded' => 'status-pill-neutral', ]; $setupStatus = fn (string $key): string => $setupTaskStatuses->get($key)?->status ?? 'action_required'; $setupStatusLabel = fn (string $key): string => ucfirst(str_replace('_', ' ', $setupStatus($key))); $setupStatusClass = fn (string $key): string => $statusClasses[$setupStatus($key)] ?? 'status-pill-neutral'; $locationIntake = data_get($tenant->public_signup_intake, 'location', []); $commonTimezones = [ 'America/New_York' => 'Eastern', 'America/Chicago' => 'Central', 'America/Denver' => 'Mountain', 'America/Los_Angeles' => 'Pacific', 'America/Phoenix' => 'Arizona', 'America/Anchorage' => 'Alaska', 'Pacific/Honolulu' => 'Hawaii', 'UTC' => 'UTC', ]; if ($tenant->operational_timezone && ! array_key_exists($tenant->operational_timezone, $commonTimezones)) { $commonTimezones = [$tenant->operational_timezone => $tenant->operational_timezone] + $commonTimezones; } $psychiatricStatusLabels = [ 'internal' => 'Internal consultant', 'external' => 'External consultant', 'needs_assistance' => 'Need Meduvo assistance', 'not_required' => 'Not required', ]; $ehrStatusLabels = [ 'not_started' => 'Not started', 'planning' => 'Planning', 'authorization_submitted' => 'Authorization submitted', 'not_needed' => 'Not needed', ]; $consentDeliveryLabels = [ 'verbal' => 'Verbal', 'written' => 'Written', 'esign' => 'e-sign', 'verbal_and_written' => 'Verbal + written', ]; $currentUser = auth()->user(); $canManagePracticeProfile = $currentUser?->canManagePracticeProfile() ?? false; $canManagePracticeLocations = $currentUser?->canManagePracticeLocations() ?? false; $canManageClinicalSetup = $currentUser?->canManageClinicalSetup() ?? false; $canInvitePracticeStaff = $currentUser?->canInvitePracticeStaff() ?? false; $canManageIntegrationSetup = $currentUser?->canManageIntegrationSetup() ?? false; $canManageBillingSetup = $currentUser?->canManageBillingSetup() ?? false; $canManageConsentConfiguration = $currentUser?->canManageConsentConfiguration() ?? false; $canManageComplianceDocuments = $currentUser?->canManageComplianceDocuments() ?? false; $progressTotal = max((int) $progress['total'], 0); $progressDone = max((int) $progress['done'], 0); $progressRemaining = max($progressTotal - $progressDone, 0); $progressPercentage = min(100, max(0, (int) $progress['percentage'])); $taskCounts = collect($progress['counts'] ?? []); $progressSegments = [ ['label' => 'Complete', 'count' => $progressDone, 'class' => 'bg-status-good'], ['label' => 'In review', 'count' => (int) $taskCounts->get('under_review', 0), 'class' => 'bg-accent'], ['label' => 'Needs work', 'count' => (int) $taskCounts->get('action_required', 0) + (int) $taskCounts->get('rejected', 0), 'class' => 'bg-status-critical'], ['label' => 'Pending', 'count' => (int) $taskCounts->get('pending', 0), 'class' => 'bg-status-warning'], ['label' => 'Locked', 'count' => (int) $taskCounts->get('locked', 0), 'class' => 'bg-ink-muted'], ]; $onboardingTabs = [ 'profile' => ['label' => 'Profile', 'status' => $setupStatusLabel('practice_profile')], 'locations' => ['label' => 'Locations', 'status' => $setupStatusLabel('locations')], 'team' => ['label' => 'Team', 'status' => $setupStatusLabel('clinical_team')], 'configuration' => ['label' => 'Configuration', 'status' => 'Setup'], 'documents' => ['label' => 'Documents', 'status' => $requirements->count().' required'], 'tasks' => ['label' => 'Tasks', 'status' => $progressDone.'/'.$progressTotal], ]; $tabPanelClass = 'mt-5 rounded-lg border border-accent/15 bg-[linear-gradient(135deg,rgba(255,255,255,0.97),rgba(233,238,247,0.92)_48%,rgba(255,241,233,0.88))] p-5 shadow-[inset_0_1px_0_rgba(255,255,255,0.98),0_1px_2px_rgba(11,39,84,0.08),0_28px_78px_-46px_rgba(11,39,84,0.82),0_0_42px_-30px_rgba(255,122,53,0.72)] backdrop-blur-xl sm:p-6'; $tabHeaderClass = 'mb-5 flex flex-col gap-3 border-b border-accent/10 pb-4 sm:flex-row sm:items-start sm:justify-between'; $contentCardClass = 'rounded-lg border border-accent/10 bg-white/[0.84] p-4 shadow-[inset_0_1px_0_rgba(255,255,255,0.88),0_14px_34px_-28px_rgba(11,39,84,0.54)]'; $rowCardClass = 'rounded-lg border border-accent/10 bg-white/[0.84] px-4 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.86),0_12px_30px_-26px_rgba(11,39,84,0.52)]'; $emptyStateClass = 'rounded-lg border border-accent/10 bg-accent-muted/60 px-3 py-3 text-sm text-ink-secondary shadow-sm'; @endphp
Practice onboarding
Complete setup items here while Meduvo verifies compliance and prepares activation.
Progress
{{ $progress['percentage'] }}%
Done
{{ $progress['done'] }}
Open
{{ $blockers->count() }}
{{ $progressPercentage }}%
Complete
Track setup work, review status, and remaining activation items in one place.
Done
{{ $progressDone }}
Left
{{ $progressRemaining }}
Blocked
{{ $blockers->count() }}
Registration details and primary implementation contact.
Your role can view this section but cannot edit practice profile details.
@endifService addresses and launch phone/fax details.
{{ $location->name }}
@if ($location->is_primary) Primary @endif{{ $location->formattedAddress() }}
@if ($location->phone || $location->fax)@if ($location->phone) Phone {{ \App\Support\UsFormat::phone($location->phone) }} @endif @if ($location->fax) · Fax {{ \App\Support\UsFormat::phone($location->fax) }} @endif
@endifNo practice locations have been added yet. Add the main clinic location to keep activation moving.
@endif @if ($canManagePracticeLocations) @elseYour role can view locations but cannot add or change them.
@endifStaff invitations and psychiatric consultant setup.
{{ $member->name }}
{{ $member->email }}
No active staff yet.
@endforelse{{ $invitation->recipientName() }}
{{ $invitation->email }} · {{ $staffRoleLabels[$invitation->role] ?? ucfirst($invitation->role) }}
No staff invitations yet.
@endforelseYour role can view the team list but cannot send account invitations.
@endif @if ($canManageClinicalSetup) @elseYour role can view clinical setup but cannot submit changes.
@endifCoordinate EHR readiness, billing contacts, and patient consent defaults.
EHR system and onboarding status without credential collection.
Your role can view integration setup but cannot submit changes.
@endifBilling contact and claims readiness notes.
Your role can view billing setup but cannot submit changes.
@endifPractice-level consent defaults for CoCM launch.
Your role can view consent configuration but cannot submit changes.
@endifUpload signed PDF evidence for Meduvo review.
Version {{ $latestDocument->version }} · Uploaded {{ \App\Support\UsFormat::dateTime($latestDocument->uploaded_at) }}
@elseNo document uploaded yet.
@endif{{ $latestDocument->document_name }}
{{ $latestDocument->original_filename }} · {{ number_format($latestDocument->file_size / 1024, 1) }} KB
@if ($latestDocument->signed_by_name)Signed by {{ $latestDocument->signed_by_name }}{{ $latestDocument->signed_by_title ? ', '.$latestDocument->signed_by_title : '' }}
@endif @if ($latestDocument->rejection_reason){{ $latestDocument->rejection_reason }}
@endif DownloadBAA and eSign evidence are managed by the Clinic Admin or Practice Manager.
Your role can view compliance readiness, but document uploads are restricted.
Current practice status: {{ ucfirst(str_replace('_', ' ', $tenant->status)) }}
{{ $task->description }}
@if ($task->completed_at) Submitted {{ \App\Support\UsFormat::dateTime($task->completed_at) }} @endif @if ($task->reviewed_at) · Reviewed {{ \App\Support\UsFormat::dateTime($task->reviewed_at) }} @endif
@if ($task->rejection_reason){{ $task->rejection_reason }}
@endif