Wire Care lists into Ladill Queue workflows instead of reception panels.
Deploy Ladill Care / deploy (push) Successful in 1m45s

When Queue integration is on, role pages issue tickets into their own
department queues and drive Call next → Serve → Complete on the native
lists. Integration off leaves existing UI unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 16:27:48 +00:00
co-authored by Cursor
parent 15638d1672
commit 015a4cc7fe
38 changed files with 1857 additions and 196 deletions
+63
View File
@@ -0,0 +1,63 @@
<?php
namespace App\Services\Care;
/**
* Canonical Care Ladill Queue department / specialty contexts.
*/
class CareQueueContexts
{
public const RECEPTION = 'reception';
public const CONSULTATION = 'consultation';
public const PHARMACY = 'pharmacy';
public const LABORATORY = 'laboratory';
public const BILLING = 'billing';
/**
* Core department queues provisioned for every branch when Queue integration is on.
*
* @return array<string, array{name: string, prefix: string}>
*/
public static function departments(): array
{
return [
self::RECEPTION => ['name' => 'Reception', 'prefix' => 'R'],
self::CONSULTATION => ['name' => 'Consultation', 'prefix' => 'C'],
self::PHARMACY => ['name' => 'Pharmacy', 'prefix' => 'P'],
self::LABORATORY => ['name' => 'Laboratory', 'prefix' => 'L'],
self::BILLING => ['name' => 'Billing', 'prefix' => 'B'],
];
}
public static function isDepartment(string $context): bool
{
return array_key_exists($context, self::departments());
}
public static function isSpecialty(string $context): bool
{
return array_key_exists($context, config('care.specialty_modules', []));
}
public static function queueExternalKey(string $context, int|string $careBranchId): string
{
if (self::isSpecialty($context)) {
return "care:specialty:{$context}:queue:{$careBranchId}";
}
return "care:dept:{$context}:queue:{$careBranchId}";
}
public static function counterExternalKey(string $context, int|string $careBranchId): string
{
if (self::isSpecialty($context)) {
return "care:specialty:{$context}:counter:{$careBranchId}";
}
return "care:dept:{$context}:counter:{$careBranchId}";
}
}