Wire Care lists into Ladill Queue workflows instead of reception panels.
Deploy Ladill Care / deploy (push) Successful in 1m45s
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:
@@ -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}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user