diff --git a/src/app/page.tsx b/src/app/page.tsx index 6410269..7d9fd71 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -24,6 +24,7 @@ import { PrePaidPackage, WaitlistEntry, StaffRole, + Provider, } from '@/types/clinical'; import { CalendarView } from '@/components/calendar/CalendarView'; import { SoapChartEditor } from '@/components/charting/SoapChartEditor'; @@ -39,6 +40,7 @@ import { CourtAuditVaultModal } from '@/components/compliance/CourtAuditVaultMod import { CommandPalette } from '@/components/ui/CommandPalette'; import { InactivityLockoutModal } from '@/components/ui/InactivityLockoutModal'; import { ClinicalToastContainer, ToastMessage } from '@/components/ui/ClinicalToast'; +import { DoctorOnboardingView } from '@/components/onboarding/DoctorOnboardingView'; import { clinicalAudio } from '@/lib/clinical-audio'; import { Calendar, @@ -68,8 +70,8 @@ export default function Home() { const [tenants, setTenants] = useState(INITIAL_TENANTS); const [activeTenantId, setActiveTenantId] = useState(INITIAL_TENANTS[0].id); - // 'clinic' | 'patient' | 'superadmin' - const [portalMode, setPortalMode] = useState<'clinic' | 'patient' | 'superadmin'>('clinic'); + // 'clinic' | 'patient' | 'superadmin' | 'onboarding' + const [portalMode, setPortalMode] = useState<'clinic' | 'patient' | 'superadmin' | 'onboarding'>('clinic'); // Staff Role: 'doctor' | 'front_desk' | 'billing_admin' const [staffRole, setStaffRole] = useState('doctor'); @@ -81,6 +83,7 @@ export default function Home() { const [appointments, setAppointments] = useState(INITIAL_APPOINTMENTS); const [patients, setPatients] = useState(INITIAL_PATIENTS); + const [providers, setProviders] = useState(INITIAL_PROVIDERS); const [soapNotes, setSoapNotes] = useState(INITIAL_SOAP_NOTES); const [superbills, setSuperbills] = useState(INITIAL_SUPERBILLS); const [products, setProducts] = useState(INITIAL_PRODUCTS); @@ -101,8 +104,8 @@ export default function Home() { const [activeSuperbill, setActiveSuperbill] = useState(INITIAL_SUPERBILLS[0]); const activeTenant = tenants.find((t) => t.id === activeTenantId) || tenants[0]; - const activeProviders = INITIAL_PROVIDERS.filter((p) => p.tenantId === activeTenant.id); - const activeProvider = activeProviders[0] || INITIAL_PROVIDERS[0]; + const activeProviders = providers.filter((p) => p.tenantId === activeTenant.id); + const activeProvider = activeProviders[0] || providers[0]; // Toast notification helper const addToast = (type: 'success' | 'alert' | 'info', title: string, description?: string) => { @@ -261,6 +264,83 @@ export default function Home() { addToast('success', 'New Clinic Deployed', `${newTenant.name} onboarded to Mediusa OS`); }; + const handleCompleteOnboarding = (newTenant: ClinicTenant, leadDoctor: Provider) => { + setTenants((prev) => [...prev, newTenant]); + setProviders((prev) => [...prev, leadDoctor]); + setActiveTenantId(newTenant.id); + + // Seed 1 active patient and encounter for instant clinic operation + const samplePatientId = `pat-${Date.now()}`; + const samplePatient: Patient = { + id: samplePatientId, + tenantId: newTenant.id, + firstName: 'Michael', + lastName: 'Sterling', + email: 'm.sterling@example.com', + phone: '(555) 349-1102', + dob: '1984-06-12', + gender: 'Male', + address: '742 Evergreen Terrace, McLean, VA 22102', + insuranceName: 'CareFirst BlueCross', + insuranceId: 'CFB-94021-X', + status: 'active', + chiefComplaint: 'Acute thoracic and lumbar stiffness following marathon training; radiates to right hamstring', + daysSinceLastVisit: 0, + lastVisitDate: new Date().toISOString().substring(0, 10), + nextAppointmentDate: new Date().toISOString().substring(0, 10), + vitals: { + bloodPressure: '122/78', + heartRate: 68, + temperature: '98.4°F', + oxygenSat: 99, + painLevel: 6, + bmi: '23.4', + allergies: ['Penicillin', 'Latex'], + contraindications: ['High-velocity cervical rotation'], + }, + carePlan: { + title: 'Spinal Alignment & Thoracic Mobility Protocol', + totalVisits: 12, + completedVisits: 1, + frequency: '2x / week for 6 weeks', + targetCondition: 'Thoracolumbar Subluxation Complex', + startDate: new Date().toISOString().substring(0, 10), + status: 'on_track', + }, + }; + + const sampleApt: Appointment = { + id: `apt-${Date.now()}`, + tenantId: newTenant.id, + patientId: samplePatientId, + patientName: `${samplePatient.firstName} ${samplePatient.lastName}`, + patientPhone: samplePatient.phone, + providerId: leadDoctor.id, + providerName: leadDoctor.name, + date: new Date().toISOString().substring(0, 10), + time: '10:00 AM', + durationMinutes: 45, + serviceType: 'Initial Clinical Examination & Spinal Adjustment', + status: 'confirmed', + room: 'Operatory 1', + notes: 'Initial evaluation under newly executed HIPAA BAA enclave. Full spinal visualizer and CMS-1500 queued.', + fee: 85, + }; + + setPatients((prev) => [samplePatient, ...prev]); + setAppointments((prev) => [sampleApt, ...prev]); + setActivePatient(samplePatient); + + setPortalMode('clinic'); + setClinicTab('calendar'); + + addToast( + 'success', + 'Clinic Enclave Deployed & BAA Sealed', + `${newTenant.name} is online on https://${newTenant.domain}. Lead Doctor: ${leadDoctor.name}.` + ); + }; + const handleSwitchTenant = (tenantId: string) => { clinicalAudio.playClick(); setActiveTenantId(tenantId); @@ -496,6 +576,22 @@ export default function Home() { Mediusa Super-Admin + + @@ -703,6 +799,13 @@ export default function Home() { onSwitchTenant={handleSwitchTenant} /> )} + + {portalMode === 'onboarding' && ( + setPortalMode('clinic')} + /> + )} {/* Cancellation Waitlist Modal */} @@ -754,6 +857,7 @@ export default function Home() { audioEnabled={audioEnabled} onOpenCourtVault={() => setIsCourtVaultOpen(true)} onLockTerminal={() => setIsTerminalLocked(true)} + onOpenOnboarding={() => setPortalMode('onboarding')} /> {/* Hospital Clinical Toast Notification System */} diff --git a/src/components/onboarding/DoctorOnboardingView.tsx b/src/components/onboarding/DoctorOnboardingView.tsx new file mode 100644 index 0000000..51d01c3 --- /dev/null +++ b/src/components/onboarding/DoctorOnboardingView.tsx @@ -0,0 +1,854 @@ +'use client'; + +import React, { useState } from 'react'; +import { + Building2, + UserCheck, + ShieldCheck, + CheckCircle2, + ArrowRight, + ArrowLeft, + Lock, + Download, + Sparkles, + Stethoscope, + Globe, + CreditCard, + Layers, + FileCheck2, + Calendar, + Zap, +} from 'lucide-react'; +import { ClinicTenant, Provider, ClinicalDiscipline } from '@/types/clinical'; +import { clinicalAudio } from '@/lib/clinical-audio'; +import { generateHipaaBaaPdf } from '@/lib/pdf-generator'; + +interface DoctorOnboardingViewProps { + onCompleteOnboarding: (tenant: ClinicTenant, leadDoctor: Provider) => void; + onCancel?: () => void; +} + +export const DoctorOnboardingView: React.FC = ({ + onCompleteOnboarding, + onCancel, +}) => { + const [step, setStep] = useState<1 | 2 | 3 | 4>(1); + + // Step 1: Practice & Provider Info + const [clinicName, setClinicName] = useState('Apex Spine & Sports Medicine'); + const [address, setAddress] = useState('8400 Westpark Drive, Suite 210'); + const [cityStateZip, setCityStateZip] = useState('McLean, VA 22102'); + const [phone, setPhone] = useState('(703) 555-0198'); + const [email, setEmail] = useState('doctor@apexspine.com'); + const [subdomain, setSubdomain] = useState('apex-spine'); + const [discipline, setDiscipline] = useState('chiropractic'); + + // Lead Doctor credentials + const [doctorName, setDoctorName] = useState('Dr. Jessica Vance'); + const [doctorCredentials, setDoctorCredentials] = useState('D.C., CCSP, FICC'); + const [npi, setNpi] = useState('1942857391'); + const [taxId, setTaxId] = useState('54-1892401'); + const [licenseNumber, setLicenseNumber] = useState('DC-48192'); + + // Step 2: Practice Configuration + const [roomCount, setRoomCount] = useState(3); + const [planType, setPlanType] = useState<'Starter' | 'Pro Clinic' | 'Multi-Doc Enterprise'>('Pro Clinic'); + const [standardAdjustmentFee, setStandardAdjustmentFee] = useState(85); + const [initialExamFee, setInitialExamFee] = useState(175); + const [rehabFee, setRehabFee] = useState(65); + const [enableStripeCopay, setEnableStripeCopay] = useState(true); + + // Step 3: BAA Execution + const [signerTitle, setSignerTitle] = useState('Clinic Owner & Medical Director'); + const [baaAttested, setBaaAttested] = useState(true); + const [baaSigned, setBaaSigned] = useState(false); + const [agreementId] = useState(`BAA-2026-${Math.floor(100000 + Math.random() * 900000)}`); + const [verificationHash] = useState( + 'SHA-256: 9e7c3a812f901ab7c541289de6f2b3810a9c7d1e45f28019ab6741029c3f81e0' + ); + + // Step 4: Provisioning state + const [isProvisioning, setIsProvisioning] = useState(false); + const [provisionProgress, setProvisionProgress] = useState(0); + + const handleNextStep = () => { + clinicalAudio.playClick(); + if (step === 1) setStep(2); + else if (step === 2) setStep(3); + else if (step === 3) { + if (!baaSigned) { + clinicalAudio.playAlert(); + return; + } + setStep(4); + runProvisioningSequence(); + } + }; + + const handlePrevStep = () => { + clinicalAudio.playClick(); + if (step === 2) setStep(1); + else if (step === 3) setStep(2); + }; + + const handleExecuteBaa = (e: React.FormEvent) => { + e.preventDefault(); + if (!baaAttested || !doctorName.trim()) { + clinicalAudio.playAlert(); + return; + } + clinicalAudio.playSuccess(); + setBaaSigned(true); + }; + + const handleDownloadBaaPdf = () => { + clinicalAudio.playSuccess(); + generateHipaaBaaPdf({ + tenant: { + name: clinicName, + address, + cityStateZip, + phone, + email, + taxId, + npi, + }, + signerName: doctorName, + signerTitle, + signedAt: new Date().toISOString().replace('T', ' ').substring(0, 19) + ' UTC', + agreementId, + verificationHash, + }); + }; + + const runProvisioningSequence = () => { + setIsProvisioning(true); + setProvisionProgress(15); + + const stages = [ + { pct: 35, delay: 500 }, + { pct: 65, delay: 1100 }, + { pct: 90, delay: 1800 }, + { pct: 100, delay: 2400 }, + ]; + + stages.forEach((s) => { + setTimeout(() => { + setProvisionProgress(s.pct); + clinicalAudio.playClick(); + }, s.delay); + }); + + setTimeout(() => { + setIsProvisioning(false); + clinicalAudio.playSuccess(); + }, 2700); + }; + + const handleFinalLaunch = () => { + clinicalAudio.playSuccess(); + + const newTenant: ClinicTenant = { + id: `tenant-${Date.now()}`, + name: clinicName, + slug: subdomain || clinicName.toLowerCase().replace(/[^a-z0-9]/g, '-'), + domain: `${subdomain || 'clinic'}.mediusaos.com`, + phone, + email, + address, + cityStateZip, + npi, + taxId, + logoText: clinicName.substring(0, 2).toUpperCase(), + brandColor: '#0284c7', + accentColor: '#0ea5e9', + plan: planType, + mrr: planType === 'Starter' ? 99 : planType === 'Pro Clinic' ? 149 : 199, + stripeConnected: enableStripeCopay, + createdAt: new Date().toISOString(), + baaStatus: 'executed', + baaSignedAt: new Date().toISOString(), + baaSignerName: doctorName, + baaSignerTitle: signerTitle, + baaAgreementId: agreementId, + }; + + const newDoctor: Provider = { + id: `prov-${Date.now()}`, + tenantId: newTenant.id, + name: doctorName, + title: 'Medical Director', + credentials: doctorCredentials, + specialty: + discipline === 'chiropractic' + ? 'Chiropractic Sports Medicine' + : discipline === 'physical_therapy' + ? 'Orthopedic Physical Therapy' + : discipline === 'acupuncture' + ? 'Integrative Acupuncture' + : 'Medical Massage Therapy', + npi, + email, + phone, + avatarUrl: 'https://images.unsplash.com/photo-1559839734-2b71ea197ec2?w=150&auto=format&fit=crop&q=80', + color: '#0284c7', + }; + + onCompleteOnboarding(newTenant, newDoctor); + }; + + return ( +
+ {/* Header Banner */} +
+
+
+ +
+
+
+ + Mediusa OS Clinic Onboarding + + + AWS HIPAA BAA Enclave + +
+

+ Launch Your High-Velocity Practice +

+

+ Configure your practice credentials, setup subluxation fee schedules, execute your binding + HIPAA Business Associate Agreement, and deploy your live clinic in under 2 minutes. +

+
+ + {onCancel && ( + + )} +
+ + {/* 4-Step Progress Indicator */} +
+ {[ + { s: 1, title: '1. Practice & Credentials', desc: 'NPI, Tax ID & Subdomain' }, + { s: 2, title: '2. Operatories & Fees', desc: 'Rooms & Procedure Rates' }, + { s: 3, title: '3. HIPAA BAA Sign-Off', desc: 'Statutory 45 CFR § 164.504' }, + { s: 4, title: '4. Live Launch', desc: 'AWS Enclave Activation' }, + ].map((item) => ( +
item.s + ? 'bg-slate-800/60 border-emerald-500/40 text-emerald-300' + : 'bg-slate-800/30 border-slate-800 text-slate-500' + }`} + > +
+ {step > item.s ? ( + + ) : ( + + {item.s} + + )} + {item.title} +
+

{item.desc}

+
+ ))} +
+
+ + {/* STEP 1: Practice Details & Medical Director Credentials */} + {step === 1 && ( +
+
+

+ Step 1: Practice Profile & Attending Physician +

+

+ Enter your clinic information as it should appear on medical superbills, CMS-1500 claims, and court affidavits. +

+
+ +
+
+ + setClinicName(e.target.value)} + className="w-full px-3.5 py-2.5 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:bg-white focus:outline-none focus:border-sky-500 font-semibold" + placeholder="e.g. Apex Spine & Sports Medicine" + /> +
+ +
+ + +
+ +
+ + setAddress(e.target.value)} + className="w-full px-3.5 py-2.5 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:bg-white focus:outline-none focus:border-sky-500" + placeholder="Suite 210, 8400 Westpark Dr" + /> +
+ +
+ + setCityStateZip(e.target.value)} + className="w-full px-3.5 py-2.5 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:bg-white focus:outline-none focus:border-sky-500" + placeholder="McLean, VA 22102" + /> +
+ +
+ + setPhone(e.target.value)} + className="w-full px-3.5 py-2.5 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:bg-white focus:outline-none focus:border-sky-500" + placeholder="(703) 555-0198" + /> +
+ +
+ +
+ setSubdomain(e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, ''))} + className="w-full px-3.5 py-2.5 bg-slate-50 border border-slate-300 rounded-l-xl text-slate-900 focus:bg-white focus:outline-none focus:border-sky-500 font-mono text-right" + placeholder="apex-spine" + /> + + .mediusaos.com + +
+
+
+ +
+

+ Medical Director & Regulatory Identifiers +

+ +
+
+ + setDoctorName(e.target.value)} + className="w-full px-3.5 py-2 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:outline-none focus:border-sky-500 font-semibold" + placeholder="Dr. Jessica Vance" + /> +
+ +
+ + setDoctorCredentials(e.target.value)} + className="w-full px-3.5 py-2 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:outline-none focus:border-sky-500" + placeholder="D.C., CCSP, FICC" + /> +
+ +
+ + setNpi(e.target.value.replace(/\D/g, ''))} + className="w-full px-3.5 py-2 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 font-mono focus:outline-none focus:border-sky-500" + placeholder="1942857391" + /> +
+ +
+ + setTaxId(e.target.value)} + className="w-full px-3.5 py-2 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 font-mono focus:outline-none focus:border-sky-500" + placeholder="54-1892401" + /> +
+ +
+ + setLicenseNumber(e.target.value)} + className="w-full px-3.5 py-2 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 font-mono focus:outline-none focus:border-sky-500" + placeholder="DC-48192" + /> +
+ +
+ + setEmail(e.target.value)} + className="w-full px-3.5 py-2 bg-slate-50 border border-slate-300 rounded-xl text-slate-900 focus:outline-none focus:border-sky-500" + placeholder="doctor@apexspine.com" + /> +
+
+
+ +
+ +
+
+ )} + + {/* STEP 2: Operatories & Fee Schedule Setup */} + {step === 2 && ( +
+
+

+ Step 2: Clinic Operatories & Fee Schedule +

+

+ Configure your treatment bays and standard clinical fee schedules for out-of-network superbills. +

+
+ +
+ {/* Rooms Setup */} +
+
+ +
+ {[1, 2, 3, 4, 5, 6, 7, 8].map((num) => ( + + ))} +
+
+ + {/* Plan Type */} +
+ +
+ {[ + { id: 'Starter', label: 'Starter ($99/mo)', desc: '1 Solo Doctor' }, + { id: 'Pro Clinic', label: 'Pro Clinic ($149/mo)', desc: '1-3 Docs + Staff' }, + { id: 'Multi-Doc Enterprise', label: 'Enterprise ($199/mo)', desc: 'Unlimited Bays' }, + ].map((p) => ( + + ))} +
+
+ + {/* Stripe Copay Terminal */} +
+
+ Stripe Card Terminal & Copay Checkout + + Accept tap-to-pay, FSA/HSA cards, and store encrypted cards for care plan installments. + +
+ setEnableStripeCopay(e.target.checked)} + className="w-5 h-5 text-sky-600 rounded border-slate-300 focus:ring-sky-500" + /> +
+
+ + {/* Default Fee Schedule */} +
+
+ Standard Baseline Fee Schedule + + CMS-1500 Ready + +
+ +
+ +
+ $ + setStandardAdjustmentFee(Number(e.target.value))} + className="w-full pl-7 pr-3 py-1.5 bg-white border border-slate-300 rounded-xl text-slate-800 font-mono font-bold focus:outline-none focus:border-sky-500" + /> +
+
+ +
+ +
+ $ + setInitialExamFee(Number(e.target.value))} + className="w-full pl-7 pr-3 py-1.5 bg-white border border-slate-300 rounded-xl text-slate-800 font-mono font-bold focus:outline-none focus:border-sky-500" + /> +
+
+ +
+ +
+ $ + setRehabFee(Number(e.target.value))} + className="w-full pl-7 pr-3 py-1.5 bg-white border border-slate-300 rounded-xl text-slate-800 font-mono font-bold focus:outline-none focus:border-sky-500" + /> +
+
+ +

+ Fees can be modified per provider or per discipline inside the billing console anytime. +

+
+
+ +
+ + +
+
+ )} + + {/* STEP 3: Statutory HIPAA BAA Execution */} + {step === 3 && ( +
+
+
+

+ Step 3: Statutory HIPAA Business Associate Agreement +

+

+ Mandatory federal agreement under 45 CFR § 164.502(e) and § 164.504(e) establishing + legal data custody on the AWS HIPAA enclave. +

+
+ + {baaSigned && ( + + )} +
+ + {/* Legal Agreement Scroll Box */} +
+

+ BUSINESS ASSOCIATE ADDENDUM (BAA) — REVISED STATUTORY TERMS (2026) +

+

+ This Business Associate Agreement is entered into by and between {clinicName} (“Covered Entity”), + and Mediusa OS / aai.dev Healthcare Cloud Group (“Business Associate”). +

+

+ 1. Permitted Uses and Disclosures: Business Associate agrees not to use or disclose Protected + Health Information (ePHI) other than as permitted or required by this Agreement, or as required by law. +

+

+ 2. Appropriate Safeguards: Business Associate warrants that all electronic PHI is exclusively + stored within an enterprise Amazon Web Services (AWS Account 691829191123) healthcare enclave governed under an + executed AWS Business Associate Addendum, utilizing hardware AES-256 KMS encryption at rest and TLS 1.3 in transit. +

+

+ 3. Subcontractor Liability Flow-Down: In accordance with 45 CFR § 164.504(e)(1)(ii), Business + Associate warrants that any downstream subcontractors (including AWS) have agreed in writing to the exact same statutory restrictions. +

+

+ 4. Evidentiary Integrity & Audit: Clinical encounters are sealed with NIST SHA-256 cryptographic + digests and comply with 21 CFR Part 11 and Fed. R. Evid. 902(11) self-authenticating record standards. +

+
+ + {/* Digital Signature Form */} + {!baaSigned ? ( +
+
+ + ELECTRONIC SIGNATURE & LEGAL EXECUTION +
+ +
+
+ + setDoctorName(e.target.value)} + className="w-full px-3.5 py-2 bg-white border border-slate-300 rounded-xl text-slate-900 font-semibold focus:outline-none focus:border-sky-500" + /> +
+ +
+ + setSignerTitle(e.target.value)} + className="w-full px-3.5 py-2 bg-white border border-slate-300 rounded-xl text-slate-900 focus:outline-none focus:border-sky-500" + /> +
+
+ +
+ setBaaAttested(e.target.checked)} + className="mt-0.5 rounded border-slate-300 text-sky-700 focus:ring-sky-500" + /> + +
+ + +
+ ) : ( +
+
+ + HIPAA BUSINESS ASSOCIATE AGREEMENT OFFICIALLY EXECUTED & BINDING +
+
+

+ Signatory: {doctorName} ({signerTitle}) +

+

+ Agreement ID: {agreementId} +

+

+ Verification Digest: {verificationHash} +

+
+
+ )} + +
+ + +
+
+ )} + + {/* STEP 4: Live Provisioning & Handoff */} + {step === 4 && ( +
+ {isProvisioning ? ( +
+
+ +
+

Provisioning Clinic Enclave on AWS...

+

+ Registering multi-tenant database partitions, setting up provider RBAC roles, and securing KMS keys. +

+ + {/* Progress Bar */} +
+
+
+ {provisionProgress}% Complete +
+ ) : ( +
+
+ +
+ +
+ + Enclave Ready & BAA Sealed + +

+ Welcome to Mediusa OS, {doctorName}! +

+

+ {clinicName} is now initialized with full sub-30s SOAP charting, 2D spine maps, + CMS-1500 superbills, and 21 CFR Part 11 court-admissible audit logging. +

+
+ + {/* Clinic Live Summary Card */} +
+
+ Clinic Portal Domain: + + + https://{subdomain}.mediusaos.com + +
+
+
+ Medical Director: + {doctorName}, {doctorCredentials} +
+
+ NPI / Tax ID: + {npi} • {taxId} +
+
+ Active Operatories: + {roomCount} Treatment Bays +
+
+ HIPAA Compliance: + 100% Certified (BAA Sealed) +
+
+
+ +
+ + +
+
+ )} +
+ )} +
+ ); +}; diff --git a/src/components/ui/CommandPalette.tsx b/src/components/ui/CommandPalette.tsx index 1ca72f0..d1d1948 100644 --- a/src/components/ui/CommandPalette.tsx +++ b/src/components/ui/CommandPalette.tsx @@ -46,6 +46,7 @@ interface CommandPaletteProps { audioEnabled: boolean; onOpenCourtVault?: () => void; onLockTerminal?: () => void; + onOpenOnboarding?: () => void; } export const CommandPalette: React.FC = ({ @@ -60,6 +61,7 @@ export const CommandPalette: React.FC = ({ audioEnabled, onOpenCourtVault, onLockTerminal, + onOpenOnboarding, }) => { const [query, setQuery] = useState(''); const [selectedIndex, setSelectedIndex] = useState(0); @@ -208,6 +210,18 @@ export const CommandPalette: React.FC = ({ onClose(); }, }, + { + id: 'action-onboard-doctor', + category: 'Actions', + title: 'Onboard New Clinic & Sign Statutory BAA', + subtitle: '4-step practice registration, NPI setup, fee schedules & HIPAA enclave launch', + badge: 'Onboarding', + icon: , + action: () => { + if (onOpenOnboarding) onOpenOnboarding(); + onClose(); + }, + }, // Staff Roles {