export const PRO_PLUS_PERMISSIONS_BY_ROLE: Record<string, PermissionKey[]> = {
admin: [...PERMISSION_KEYS],
doctor: [...(DEFAULT_PERMISSIONS_BY_ROLE.doctor as PermissionKey[])],
receptionist: [
// Appointments
'appointments.view', 'appointments.view_detail', 'appointments.create', 'appointments.edit',
'appointments.delete', 'appointments.change_status', 'appointments.send_summary',
'appointments.view_all_doctors',
// Patients
'patients.view', 'patients.view_detail', 'patients.create', 'patients.edit',
'patients.invite_portal', 'patients.view_medical_history',
// Clinical (view/support, no chart editing or notes writing)
'clinical.treatment_plans.view',
'clinical.prescriptions.view',
'clinical.patient_files.view', 'clinical.patient_files.upload',
'clinical.consent.view', 'clinical.consent.upload',
'clinical.recalls.view', 'clinical.recalls.create', 'clinical.recalls.edit',
'clinical.recalls.delete', 'clinical.recalls.batch_generate',
// Billing — full operational
'billing.invoices.view', 'billing.invoices.view_detail', 'billing.invoices.create',
'billing.invoices.send', 'billing.invoices.share',
'billing.receipts.view', 'billing.receipts.create', 'billing.receipts.send',
'billing.payments.view', 'billing.payments.record',
'billing.quotations.view', 'billing.quotations.create', 'billing.quotations.send',
'billing.installments.view',
// Inventory — full (Pro+ upgrade over Pro)
'inventory.view', 'inventory.create', 'inventory.edit',
'inventory.adjust_stock', 'inventory.view_alerts', 'inventory.manage_suppliers',
// Lab
'lab.cases.view', 'lab.cases.create', 'lab.cases.update_status',
'lab.services.view', 'lab.laboratories.view',
// Bridge
'bridge.view',
// Comms
'comms.messages.view', 'comms.messages.send_patient', 'comms.messages.send_staff',
'comms.templates.view', 'comms.bulk.send',
// AI — operational nudges
'ai.appointment_nudges', 'ai.daily_brief', 'ai.payment_reminder',
// Settings
'settings.staff.view',
'settings.signatures.view', 'settings.signatures.manage',
// Notifications
'notifications.manage',
],
patient: [...(DEFAULT_PERMISSIONS_BY_ROLE.patient as PermissionKey[])],
};
export const PRO_PERMISSIONS_BY_ROLE: Record<string, PermissionKey[]> = {
admin: [...PERMISSION_KEYS],
doctor: [
// Appointments
'appointments.view', 'appointments.view_detail', 'appointments.create', 'appointments.edit',
'appointments.delete', 'appointments.change_status', 'appointments.send_summary',
'appointments.view_all_doctors', 'appointments.block_time',
// Patients
'patients.view', 'patients.view_detail', 'patients.create', 'patients.edit', 'patients.delete',
'patients.invite_portal', 'patients.view_medical_history',
// Clinical — full, NO ipd
'clinical.dental_chart.view', 'clinical.dental_chart.create', 'clinical.dental_chart.edit', 'clinical.dental_chart.initialize',
'clinical.notes.view', 'clinical.notes.create', 'clinical.notes.edit', 'clinical.notes.delete',
'clinical.treatment_plans.view', 'clinical.treatment_plans.create', 'clinical.treatment_plans.edit',
'clinical.treatment_plans.delete', 'clinical.treatment_plans.complete',
'clinical.treatment_plans.approve', 'clinical.treatment_plans.ai_presentation',
'clinical.treatment_plans.share', 'clinical.treatment_plans.revoke_share',
'clinical.vital_signs.view', 'clinical.vital_signs.record',
'clinical.consent.view', 'clinical.consent.upload',
'clinical.prescriptions.view', 'clinical.prescriptions.create', 'clinical.prescriptions.edit',
'clinical.prescriptions.delete', 'clinical.prescriptions.manage_template',
'clinical.medications.view', 'clinical.medications.create', 'clinical.medications.delete',
'clinical.procedures.view', 'clinical.procedures.create', 'clinical.procedures.edit', 'clinical.procedures.delete',
'clinical.patient_files.view', 'clinical.patient_files.upload', 'clinical.patient_files.edit', 'clinical.patient_files.delete',
'clinical.recalls.view', 'clinical.recalls.create', 'clinical.recalls.edit', 'clinical.recalls.delete', 'clinical.recalls.batch_generate',
// NO clinical.ipd.*
// Billing — NO insurance
'billing.invoices.view', 'billing.invoices.view_detail', 'billing.invoices.create',
'billing.invoices.send', 'billing.invoices.share',
'billing.receipts.view', 'billing.receipts.create', 'billing.receipts.send',
'billing.payments.view', 'billing.payments.record',
'billing.installments.view', 'billing.installments.create', 'billing.installments.generate_invoice',
'billing.quotations.view', 'billing.quotations.create', 'billing.quotations.edit',
'billing.quotations.send', 'billing.quotations.share',
// NO billing.insurance.*
// Inventory
'inventory.view', 'inventory.view_alerts',
// Lab
'lab.cases.view', 'lab.cases.create', 'lab.cases.update_status',
'lab.services.view', 'lab.services.manage', 'lab.services.delete',
'lab.laboratories.view', 'lab.laboratories.create', 'lab.laboratories.edit', 'lab.laboratories.delete',
// NO bridge.*
// Comms
'comms.messages.view', 'comms.messages.send_patient', 'comms.messages.send_staff',
'comms.messages.delete', 'comms.messages.check_window', 'comms.messages.mark_read',
'comms.templates.view',
// Reports — stats only
'reports.stats',
// AI — core clinical + scheduling, NO business intelligence
'ai.patient_brief', 'ai.clinical_assist', 'ai.shorten_expand', 'ai.recall_message',
'ai.daily_brief', 'ai.appointment_nudges',
'ai.treatment_plan_presentation',
'ai.payment_reminder', 'ai.eod_summary', 'ai.grammar_rewrite',
// Notifications & Audit
'notifications.manage',
'audit.activity.view',
],
receptionist: [
// Appointments
'appointments.view', 'appointments.view_detail', 'appointments.create', 'appointments.edit',
'appointments.delete', 'appointments.change_status', 'appointments.send_summary',
'appointments.view_all_doctors',
// Patients
'patients.view', 'patients.view_detail', 'patients.create', 'patients.edit',
'patients.invite_portal', 'patients.view_medical_history',
// Clinical (view/support only)
'clinical.treatment_plans.view',
'clinical.prescriptions.view',
'clinical.patient_files.view', 'clinical.patient_files.upload',
'clinical.consent.view', 'clinical.consent.upload',
'clinical.recalls.view', 'clinical.recalls.create', 'clinical.recalls.edit',
'clinical.recalls.delete', 'clinical.recalls.batch_generate',
// Billing
'billing.invoices.view', 'billing.invoices.view_detail', 'billing.invoices.create',
'billing.invoices.send', 'billing.invoices.share',
'billing.receipts.view', 'billing.receipts.create', 'billing.receipts.send',
'billing.payments.view', 'billing.payments.record',
'billing.quotations.view', 'billing.quotations.create', 'billing.quotations.send',
'billing.installments.view',
// Inventory — view + adjust only (no write/suppliers)
'inventory.view', 'inventory.adjust_stock', 'inventory.view_alerts',
// Lab — cases + services only (no laboratories management)
'lab.cases.view', 'lab.cases.create', 'lab.cases.update_status',
'lab.services.view',
// Bridge
'bridge.view',
// Comms
'comms.messages.view', 'comms.messages.send_patient', 'comms.messages.send_staff',
'comms.templates.view', 'comms.bulk.send',
// AI — scheduling nudges only
'ai.appointment_nudges', 'ai.payment_reminder',
// Settings
'settings.staff.view',
'settings.signatures.view',
// Notifications
'notifications.manage',
],
patient: [...(DEFAULT_PERMISSIONS_BY_ROLE.patient as PermissionKey[])],
};