Expand specialty modules; pin Emergency and Blood Bank on Pro.
Deploy Ladill Care / deploy (push) Successful in 1m37s

Add Cardiology through Child Welfare to the specialty catalog, keep Emergency and Blood Bank always enabled on Pro/Enterprise sidebars, and generate matching demo specialty doctors.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 09:27:05 +00:00
co-authored by Cursor
parent f87f216fb4
commit e9a76fec80
9 changed files with 524 additions and 140 deletions
+61 -73
View File
@@ -186,6 +186,36 @@ final class DemoWorld
* account_role?: string
* }>>
*/
/**
* Care specialty module doctors (Pro / Enterprise). Emails: demo-{tier}-{key}@ladill.com
*
* @var array<string, string> 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;
}