diff --git a/app/Http/Controllers/Care/SettingsModulesController.php b/app/Http/Controllers/Care/SettingsModulesController.php index c772254..90ad70c 100644 --- a/app/Http/Controllers/Care/SettingsModulesController.php +++ b/app/Http/Controllers/Care/SettingsModulesController.php @@ -21,6 +21,11 @@ class SettingsModulesController extends Controller $member = $this->member($request); $canManage = app(\App\Services\Care\CarePermissions::class)->can($member, 'settings.manage'); + if ($modules->canManage($organization)) { + $modules->ensureDefaultModulesProvisioned($organization, $this->ownerRef($request)); + $organization->refresh(); + } + return view('care.settings.modules', [ 'organization' => $organization, 'canManage' => $canManage, @@ -46,9 +51,13 @@ class SettingsModulesController extends Controller $desired = []; foreach ($keys as $key) { $desired[$key] = $request->boolean("modules.{$key}"); + if ($modules->isDefaultOnPaidPlans($key)) { + $desired[$key] = true; + } } - $result = $modules->sync($organization, $this->ownerRef($request), $desired); + $modules->ensureDefaultModulesProvisioned($organization, $this->ownerRef($request)); + $result = $modules->sync($organization->fresh(), $this->ownerRef($request), $desired); if ($result['errors'] !== []) { return back()->with('error', 'Some modules could not be updated: '.implode(' ', $result['errors'])); diff --git a/app/Services/Care/DemoTenantSeeder.php b/app/Services/Care/DemoTenantSeeder.php index e0284ca..5f55d22 100644 --- a/app/Services/Care/DemoTenantSeeder.php +++ b/app/Services/Care/DemoTenantSeeder.php @@ -802,11 +802,28 @@ class DemoTenantSeeder } $reasons = [ + 'emergency' => ['Chest pain', 'Trauma review', 'Acute fever'], + 'blood_bank' => ['Cross-match request', 'Transfusion review', 'Blood product issue'], 'dentistry' => ['Toothache', 'Dental cleaning', 'Extraction review'], 'ophthalmology' => ['Blurry vision', 'Eye exam', 'Contact lens fitting'], 'physiotherapy' => ['Back pain rehab', 'Post-injury physio', 'Mobility session'], 'maternity' => ['Antenatal visit', 'Pregnancy check', 'Postnatal review'], 'radiology' => ['X-ray referral', 'Ultrasound', 'Imaging review'], + 'cardiology' => ['Chest pain review', 'ECG follow-up', 'Hypertension clinic'], + 'psychiatry' => ['Mental health review', 'Counselling session', 'Medication review'], + 'pediatrics' => ['Well-child visit', 'Fever in child', 'Growth check'], + 'orthopedics' => ['Fracture follow-up', 'Joint pain', 'Cast review'], + 'ent' => ['Ear infection', 'Sore throat', 'Sinus review'], + 'oncology' => ['Chemo day-care', 'Oncology review', 'Symptom management'], + 'renal' => ['Dialysis session', 'Nephrology review', 'Fluid assessment'], + 'surgery' => ['Pre-op assessment', 'Surgical review', 'Wound check'], + 'vaccination' => ['Routine immunization', 'Catch-up vaccine', 'Travel vaccine'], + 'pathology' => ['Biopsy review', 'Histology result', 'Cytology sample'], + 'infusion' => ['IV infusion', 'Iron infusion', 'Day-care therapy'], + 'dermatology' => ['Skin rash', 'Mole review', 'Dermatology procedure'], + 'podiatry' => ['Diabetic foot care', 'Nail procedure', 'Foot pain'], + 'fertility' => ['Fertility consult', 'Cycle review', 'IVF follow-up'], + 'child_welfare' => ['Growth monitoring', 'Immunization CWC', 'Well-baby visit'], ]; $count = 0; diff --git a/app/Services/Care/SpecialtyModuleService.php b/app/Services/Care/SpecialtyModuleService.php index 60375b1..e479398 100644 --- a/app/Services/Care/SpecialtyModuleService.php +++ b/app/Services/Care/SpecialtyModuleService.php @@ -41,15 +41,69 @@ class SpecialtyModuleService return $catalog[$key] ?? null; } + public function isDefaultOnPaidPlans(string $key): bool + { + return (bool) ($this->definition($key)['default_on_paid_plans'] ?? false); + } + public function isEnabled(Organization $organization, string $key): bool { if (! $this->definition($key)) { return false; } + if ($this->isDefaultOnPaidPlans($key) && $this->plans->hasPaidPlan($organization)) { + return true; + } + return (bool) data_get($organization->settings, "specialty_modules.{$key}", false); } + /** + * @return list + */ + public function defaultKeysForPaidPlans(): array + { + $keys = []; + foreach (array_keys($this->catalog()) as $key) { + if ($this->isDefaultOnPaidPlans($key)) { + $keys[] = $key; + } + } + + return $keys; + } + + /** + * Provision Emergency / Blood Bank (and any other default_on_paid_plans modules). + */ + public function ensureDefaultModulesProvisioned(Organization $organization, string $ownerRef): void + { + if (! $this->plans->hasPaidPlan($organization)) { + return; + } + + foreach ($this->defaultKeysForPaidPlans() as $key) { + $provisioned = data_get( + $organization->settings, + "specialty_module_provisioning.{$key}.active", + ); + if ($provisioned) { + continue; + } + + try { + $this->activate($organization->fresh(), $ownerRef, $key); + $organization->refresh(); + } catch (\Throwable $e) { + Log::warning('specialty_module.default_provision_failed', [ + 'key' => $key, + 'message' => $e->getMessage(), + ]); + } + } + } + /** * @return list */ @@ -116,6 +170,11 @@ class SpecialtyModuleService } if ($member && $member->role === 'doctor') { + // Default Pro surfaces (Emergency, Blood Bank) are available to all doctors. + if ($this->isDefaultOnPaidPlans($key)) { + return true; + } + return $this->doctorAssignedToModule($organization, $member, $key); } @@ -187,9 +246,23 @@ class SpecialtyModuleService foreach ($this->catalog() as $key => $definition) { $want = (bool) ($desired[$key] ?? false); + if ($this->isDefaultOnPaidPlans($key) && $this->plans->hasPaidPlan($organization)) { + $want = true; + } $have = $this->isEnabled($organization, $key); if ($want === $have) { + // Still ensure defaults are provisioned even when already "enabled". + if ($want && $this->isDefaultOnPaidPlans($key) + && ! data_get($organization->settings, "specialty_module_provisioning.{$key}.active")) { + try { + $this->activate($organization, $ownerRef, $key); + $organization->refresh(); + } catch (\Throwable $e) { + $errors[] = ($definition['label'] ?? $key).': '.$e->getMessage(); + } + } + continue; } @@ -274,6 +347,10 @@ class SpecialtyModuleService throw new \InvalidArgumentException("Unknown specialty module [{$key}]."); } + if ($this->isDefaultOnPaidPlans($key) && $this->plans->hasPaidPlan($organization)) { + throw new \RuntimeException(($this->definition($key)['label'] ?? $key).' stays enabled on Pro and Enterprise.'); + } + $settings = $organization->settings ?? []; $modules = is_array($settings['specialty_modules'] ?? null) ? $settings['specialty_modules'] : []; $modules[$key] = false; diff --git a/app/Support/DemoWorld.php b/app/Support/DemoWorld.php index 56e4793..5605f75 100644 --- a/app/Support/DemoWorld.php +++ b/app/Support/DemoWorld.php @@ -186,6 +186,36 @@ final class DemoWorld * account_role?: string * }>> */ + /** + * Care specialty module doctors (Pro / Enterprise). Emails: demo-{tier}-{key}@ladill.com + * + * @var array module key => display name + */ + public const SPECIALTY_DOCTORS = [ + 'emergency' => 'Dr. Kojo Emergency', + 'blood_bank' => 'Dr. Ama Blood Bank', + 'dentistry' => 'Dr. Ama Dental', + 'ophthalmology' => 'Dr. Kofi Eye', + 'physiotherapy' => 'Dr. Efua Physio', + 'maternity' => 'Dr. Abena Maternity', + 'radiology' => 'Dr. Yaw Radiology', + 'cardiology' => 'Dr. Kwesi Cardiology', + 'psychiatry' => 'Dr. Adwoa Psychiatry', + 'pediatrics' => 'Dr. Fiifi Pediatrics', + 'orthopedics' => 'Dr. Kojo Orthopedics', + 'ent' => 'Dr. Esi ENT', + 'oncology' => 'Dr. Mansa Oncology', + 'renal' => 'Dr. Nana Renal', + 'surgery' => 'Dr. Kwadwo Surgery', + 'vaccination' => 'Dr. Afia Vaccination', + 'pathology' => 'Dr. Yaw Pathology', + 'infusion' => 'Dr. Akosua Infusion', + 'dermatology' => 'Dr. Ama Dermatology', + 'podiatry' => 'Dr. Kofi Podiatry', + 'fertility' => 'Dr. Abena Fertility', + 'child_welfare' => 'Dr. Efua Child Welfare', + ]; + public const STAFF = [ 'free' => [ [ @@ -272,41 +302,6 @@ final class DemoWorld 'meet' => 'member', ], ], - [ - 'key' => 'dentistry', - 'email' => 'demo-pro-dentistry@ladill.com', - 'name' => 'Dr. Ama Dental (Pro)', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'ophthalmology', - 'email' => 'demo-pro-ophthalmology@ladill.com', - 'name' => 'Dr. Kofi Eye (Pro)', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'physiotherapy', - 'email' => 'demo-pro-physiotherapy@ladill.com', - 'name' => 'Dr. Efua Physio (Pro)', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'maternity', - 'email' => 'demo-pro-maternity@ladill.com', - 'name' => 'Dr. Abena Maternity (Pro)', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'radiology', - 'email' => 'demo-pro-radiology@ladill.com', - 'name' => 'Dr. Yaw Radiology (Pro)', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], ], 'enterprise' => [ [ @@ -381,41 +376,6 @@ final class DemoWorld 'events' => 'member', ], ], - [ - 'key' => 'dentistry', - 'email' => 'demo-enterprise-dentistry@ladill.com', - 'name' => 'Dr. Ama Dental', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'ophthalmology', - 'email' => 'demo-enterprise-ophthalmology@ladill.com', - 'name' => 'Dr. Kofi Eye', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'physiotherapy', - 'email' => 'demo-enterprise-physiotherapy@ladill.com', - 'name' => 'Dr. Efua Physio', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'maternity', - 'email' => 'demo-enterprise-maternity@ladill.com', - 'name' => 'Dr. Abena Maternity', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], - [ - 'key' => 'radiology', - 'email' => 'demo-enterprise-radiology@ladill.com', - 'name' => 'Dr. Yaw Radiology', - 'apps' => ['care'], - 'roles' => ['care' => 'doctor'], - ], ], ]; @@ -541,7 +501,35 @@ final class DemoWorld */ public static function staff(string $tier): array { - return self::STAFF[self::normalizeTier($tier)] ?? []; + $tier = self::normalizeTier($tier); + $roster = self::STAFF[$tier] ?? []; + if (! in_array($tier, ['pro', 'enterprise'], true)) { + return $roster; + } + + foreach (self::SPECIALTY_DOCTORS as $key => $name) { + $email = sprintf('demo-%s-%s@ladill.com', $tier, $key); + $already = false; + foreach ($roster as $row) { + if (strtolower((string) ($row['email'] ?? '')) === $email) { + $already = true; + break; + } + } + if ($already) { + continue; + } + $suffix = $tier === 'pro' ? ' (Pro)' : ''; + $roster[] = [ + 'key' => $key, + 'email' => $email, + 'name' => $name.$suffix, + 'apps' => ['care'], + 'roles' => ['care' => 'doctor'], + ]; + } + + return $roster; } /** @@ -554,8 +542,8 @@ final class DemoWorld return null; } - foreach (self::STAFF as $roster) { - foreach ($roster as $member) { + foreach (['free', 'pro', 'enterprise'] as $tier) { + foreach (self::staff($tier) as $member) { if (strtolower($member['email']) === $email) { return $member; } diff --git a/config/care.php b/config/care.php index d58d54f..00b33b0 100644 --- a/config/care.php +++ b/config/care.php @@ -25,70 +25,31 @@ return [ 'dental' => 'Dental', 'ophthalmology' => 'Ophthalmology / Eye care', 'physiotherapy' => 'Physiotherapy', + 'blood_bank' => 'Blood Bank', + 'cardiology' => 'Cardiology', + 'psychiatry' => 'Psychiatry', + 'pediatrics' => 'Pediatrics', + 'orthopedics' => 'Orthopedics', + 'ent' => 'ENT', + 'oncology' => 'Oncology', + 'renal' => 'Renal Care', + 'surgery' => 'Surgery', + 'vaccination' => 'Vaccination & Immunization', + 'pathology' => 'Pathology', + 'infusion' => 'Infusion Centre', + 'dermatology' => 'Dermatology', + 'podiatry' => 'Podiatry', + 'fertility' => 'Fertility', + 'child_welfare' => 'Child Welfare Clinic', ], /* | Specialty practice modules (Settings → Modules). | Pro-gated via plans.*.features specialty_modules — expansions beyond core | outpatient/lab/pharmacy belong on paid plans, matching queue_integration. + | See config/care_specialty_modules.php (default_on_paid_plans for Emergency / Blood Bank). */ - 'specialty_modules' => [ - 'dentistry' => [ - 'label' => 'Dentistry', - 'description' => 'Dental chairs, oral consults, and dentistry waiting lists.', - 'department_type' => 'dental', - 'department_name' => 'Dentistry', - 'queue_name' => 'Dentistry', - 'queue_prefix' => 'DEN', - 'nav_label' => 'Dentistry', - 'queue_keywords' => ['dent', 'dental', 'oral'], - 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], - ], - 'ophthalmology' => [ - 'label' => 'Eye care', - 'description' => 'Ophthalmology and optometry clinics with dedicated queues.', - 'department_type' => 'ophthalmology', - 'department_name' => 'Eye care', - 'queue_name' => 'Eye care', - 'queue_prefix' => 'EYE', - 'nav_label' => 'Eye care', - 'queue_keywords' => ['eye', 'ophthal', 'optom'], - 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], - ], - 'physiotherapy' => [ - 'label' => 'Physiotherapy', - 'description' => 'Rehab sessions and physiotherapy treatment queues.', - 'department_type' => 'physiotherapy', - 'department_name' => 'Physiotherapy', - 'queue_name' => 'Physiotherapy', - 'queue_prefix' => 'PHY', - 'nav_label' => 'Physiotherapy', - 'queue_keywords' => ['physio', 'rehab', 'therapy'], - 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], - ], - 'maternity' => [ - 'label' => 'Maternity / Antenatal', - 'description' => 'Antenatal clinics, maternity wards, and related queues.', - 'department_type' => 'maternity', - 'department_name' => 'Maternity', - 'queue_name' => 'Maternity', - 'queue_prefix' => 'MAT', - 'nav_label' => 'Maternity', - 'queue_keywords' => ['matern', 'antenatal', 'obstetric'], - 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], - ], - 'radiology' => [ - 'label' => 'Radiology', - 'description' => 'Imaging requests and radiology service counters.', - 'department_type' => 'radiology', - 'department_name' => 'Radiology', - 'queue_name' => 'Radiology', - 'queue_prefix' => 'RAD', - 'nav_label' => 'Radiology', - 'queue_keywords' => ['radio', 'imaging', 'x-ray', 'xray', 'ultrasound', 'ct', 'mri'], - 'roles' => ['doctor', 'lab_technician', 'receptionist', 'hospital_admin', 'super_admin'], - ], - ], + 'specialty_modules' => require __DIR__.'/care_specialty_modules.php', 'audit_actions' => [ 'organization.created' => 'Organization created', diff --git a/config/care_specialty_modules.php b/config/care_specialty_modules.php new file mode 100644 index 0000000..c79486a --- /dev/null +++ b/config/care_specialty_modules.php @@ -0,0 +1,256 @@ +> + */ +return [ + 'emergency' => [ + 'label' => 'Emergency', + 'description' => 'Emergency department triage, resus, and urgent care queues.', + 'department_type' => 'emergency', + 'department_name' => 'Emergency', + 'queue_name' => 'Emergency', + 'queue_prefix' => 'ER', + 'nav_label' => 'Emergency', + 'queue_keywords' => ['emerg', 'casualty', 'trauma', 'er', 'a&e'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + 'default_on_paid_plans' => true, + ], + 'blood_bank' => [ + 'label' => 'Blood Bank', + 'description' => 'Blood products, cross-match requests, and transfusion counters.', + 'department_type' => 'blood_bank', + 'department_name' => 'Blood Bank', + 'queue_name' => 'Blood Bank', + 'queue_prefix' => 'BB', + 'nav_label' => 'Blood Bank', + 'queue_keywords' => ['blood', 'transfusion', 'crossmatch', 'donor'], + 'roles' => ['doctor', 'nurse', 'lab_technician', 'receptionist', 'hospital_admin', 'super_admin'], + 'default_on_paid_plans' => true, + ], + 'dentistry' => [ + 'label' => 'Dentistry', + 'description' => 'Dental chairs, oral consults, and dentistry waiting lists.', + 'department_type' => 'dental', + 'department_name' => 'Dentistry', + 'queue_name' => 'Dentistry', + 'queue_prefix' => 'DEN', + 'nav_label' => 'Dentistry', + 'queue_keywords' => ['dent', 'dental', 'oral'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'ophthalmology' => [ + 'label' => 'Eye care', + 'description' => 'Ophthalmology and optometry clinics with dedicated queues.', + 'department_type' => 'ophthalmology', + 'department_name' => 'Eye care', + 'queue_name' => 'Eye care', + 'queue_prefix' => 'EYE', + 'nav_label' => 'Eye care', + 'queue_keywords' => ['eye', 'ophthal', 'optom'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'physiotherapy' => [ + 'label' => 'Physiotherapy', + 'description' => 'Rehab sessions and physiotherapy treatment queues.', + 'department_type' => 'physiotherapy', + 'department_name' => 'Physiotherapy', + 'queue_name' => 'Physiotherapy', + 'queue_prefix' => 'PHY', + 'nav_label' => 'Physiotherapy', + 'queue_keywords' => ['physio', 'rehab', 'therapy'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'maternity' => [ + 'label' => 'Maternity / Antenatal', + 'description' => 'Antenatal clinics, maternity wards, and related queues.', + 'department_type' => 'maternity', + 'department_name' => 'Maternity', + 'queue_name' => 'Maternity', + 'queue_prefix' => 'MAT', + 'nav_label' => 'Maternity', + 'queue_keywords' => ['matern', 'antenatal', 'obstetric'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'radiology' => [ + 'label' => 'Radiology', + 'description' => 'Imaging requests and radiology service counters.', + 'department_type' => 'radiology', + 'department_name' => 'Radiology', + 'queue_name' => 'Radiology', + 'queue_prefix' => 'RAD', + 'nav_label' => 'Radiology', + 'queue_keywords' => ['radio', 'imaging', 'x-ray', 'xray', 'ultrasound', 'ct', 'mri'], + 'roles' => ['doctor', 'lab_technician', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'cardiology' => [ + 'label' => 'Cardiology', + 'description' => 'Heart clinics, ECG follow-up, and cardiology waiting lists.', + 'department_type' => 'cardiology', + 'department_name' => 'Cardiology', + 'queue_name' => 'Cardiology', + 'queue_prefix' => 'CAR', + 'nav_label' => 'Cardiology', + 'queue_keywords' => ['cardio', 'heart', 'ecg', 'echo'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'psychiatry' => [ + 'label' => 'Psychiatry', + 'description' => 'Mental health consultations and psychiatry clinic queues.', + 'department_type' => 'psychiatry', + 'department_name' => 'Psychiatry', + 'queue_name' => 'Psychiatry', + 'queue_prefix' => 'PSY', + 'nav_label' => 'Psychiatry', + 'queue_keywords' => ['psych', 'mental', 'behaviour'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'pediatrics' => [ + 'label' => 'Pediatrics', + 'description' => 'Child health clinics and pediatric consultation queues.', + 'department_type' => 'pediatrics', + 'department_name' => 'Pediatrics', + 'queue_name' => 'Pediatrics', + 'queue_prefix' => 'PED', + 'nav_label' => 'Pediatrics', + 'queue_keywords' => ['pedia', 'paedia', 'child', 'infant'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'orthopedics' => [ + 'label' => 'Orthopedics', + 'description' => 'Bones, joints, fracture clinics, and orthopedic queues.', + 'department_type' => 'orthopedics', + 'department_name' => 'Orthopedics', + 'queue_name' => 'Orthopedics', + 'queue_prefix' => 'ORT', + 'nav_label' => 'Orthopedics', + 'queue_keywords' => ['ortho', 'fracture', 'bone', 'joint'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'ent' => [ + 'label' => 'ENT', + 'description' => 'Ear, nose, and throat clinics with dedicated queues.', + 'department_type' => 'ent', + 'department_name' => 'ENT', + 'queue_name' => 'ENT', + 'queue_prefix' => 'ENT', + 'nav_label' => 'ENT', + 'queue_keywords' => ['ent', 'ear', 'nose', 'throat', 'otolaryng'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'oncology' => [ + 'label' => 'Oncology', + 'description' => 'Cancer care clinics, chemo day-care, and oncology queues.', + 'department_type' => 'oncology', + 'department_name' => 'Oncology', + 'queue_name' => 'Oncology', + 'queue_prefix' => 'ONC', + 'nav_label' => 'Oncology', + 'queue_keywords' => ['oncol', 'cancer', 'chemo'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'renal' => [ + 'label' => 'Renal Care', + 'description' => 'Dialysis, nephrology clinics, and renal care queues.', + 'department_type' => 'renal', + 'department_name' => 'Renal Care', + 'queue_name' => 'Renal Care', + 'queue_prefix' => 'REN', + 'nav_label' => 'Renal Care', + 'queue_keywords' => ['renal', 'dialysis', 'nephro', 'kidney'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'surgery' => [ + 'label' => 'Surgery', + 'description' => 'Surgical OPD, pre-op assessment, and theatre-linked queues.', + 'department_type' => 'surgery', + 'department_name' => 'Surgery', + 'queue_name' => 'Surgery', + 'queue_prefix' => 'SUR', + 'nav_label' => 'Surgery', + 'queue_keywords' => ['surg', 'theatre', 'operat', 'pre-op'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'vaccination' => [ + 'label' => 'Vaccination & Immunization', + 'description' => 'Immunization clinics, EPI schedules, and vaccine queues.', + 'department_type' => 'vaccination', + 'department_name' => 'Vaccination', + 'queue_name' => 'Vaccination', + 'queue_prefix' => 'VAX', + 'nav_label' => 'Vaccination', + 'queue_keywords' => ['vaccin', 'immun', 'epi', 'injection'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'pathology' => [ + 'label' => 'Pathology', + 'description' => 'Histopathology, cytology, and pathology service counters.', + 'department_type' => 'pathology', + 'department_name' => 'Pathology', + 'queue_name' => 'Pathology', + 'queue_prefix' => 'PATH', + 'nav_label' => 'Pathology', + 'queue_keywords' => ['pathol', 'histo', 'cytol', 'biopsy'], + 'roles' => ['doctor', 'lab_technician', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'infusion' => [ + 'label' => 'Infusion Centre', + 'description' => 'IV therapy, infusion chairs, and day-care infusion queues.', + 'department_type' => 'infusion', + 'department_name' => 'Infusion Centre', + 'queue_name' => 'Infusion', + 'queue_prefix' => 'INF', + 'nav_label' => 'Infusion', + 'queue_keywords' => ['infusion', 'iv', 'drip', 'day care'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'dermatology' => [ + 'label' => 'Dermatology', + 'description' => 'Skin clinics, dermatology procedures, and specialty queues.', + 'department_type' => 'dermatology', + 'department_name' => 'Dermatology', + 'queue_name' => 'Dermatology', + 'queue_prefix' => 'DER', + 'nav_label' => 'Dermatology', + 'queue_keywords' => ['derma', 'skin', 'rash'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'podiatry' => [ + 'label' => 'Podiatry', + 'description' => 'Foot clinics, diabetic foot care, and podiatry queues.', + 'department_type' => 'podiatry', + 'department_name' => 'Podiatry', + 'queue_name' => 'Podiatry', + 'queue_prefix' => 'POD', + 'nav_label' => 'Podiatry', + 'queue_keywords' => ['podiat', 'foot', 'diabetic foot'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'fertility' => [ + 'label' => 'Fertility', + 'description' => 'Fertility / IVF clinics and reproductive health queues.', + 'department_type' => 'fertility', + 'department_name' => 'Fertility', + 'queue_name' => 'Fertility', + 'queue_prefix' => 'FER', + 'nav_label' => 'Fertility', + 'queue_keywords' => ['fertil', 'ivf', 'reproduct'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], + 'child_welfare' => [ + 'label' => 'Child Welfare Clinic', + 'description' => 'Well-child visits, growth monitoring, and CWC queues.', + 'department_type' => 'child_welfare', + 'department_name' => 'Child Welfare Clinic', + 'queue_name' => 'Child Welfare', + 'queue_prefix' => 'CWC', + 'nav_label' => 'Child Welfare', + 'queue_keywords' => ['cwc', 'child welfare', 'well baby', 'growth'], + 'roles' => ['doctor', 'nurse', 'receptionist', 'hospital_admin', 'super_admin'], + ], +]; diff --git a/resources/views/care/settings/modules.blade.php b/resources/views/care/settings/modules.blade.php index 92ccd1c..fbbb849 100644 --- a/resources/views/care/settings/modules.blade.php +++ b/resources/views/care/settings/modules.blade.php @@ -13,7 +13,7 @@ @if (! $canUseSpecialtyModules) -

Unlock dentistry, eye care, physiotherapy, maternity, and radiology practice pages with matching departments and queue stubs.

+

Unlock specialty practice pages with matching departments and queue stubs. Emergency and Blood Bank are included by default on Pro and Enterprise.

View plans
@else @@ -21,18 +21,25 @@ @csrf @method('PUT') -
+
@foreach ($catalog as $key => $module) -