Give specialty modules the same Queue UI as GPs.
Deploy Ladill Care / deploy (push) Successful in 36s
Deploy Ladill Care / deploy (push) Successful in 36s
Specialty homes now use the shared Waiting/In care board with Call next, Start routes specialty tickets into specialty workspaces, and redundant Dentistry/Specialty module chrome is removed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,6 +40,15 @@ class CareQueueBridge
|
||||
return CareQueueContexts::CONSULTATION;
|
||||
}
|
||||
|
||||
return $this->contextForDepartment($organization, (int) $departmentId);
|
||||
}
|
||||
|
||||
public function contextForDepartment(Organization $organization, int $departmentId): string
|
||||
{
|
||||
if ($departmentId <= 0) {
|
||||
return CareQueueContexts::CONSULTATION;
|
||||
}
|
||||
|
||||
foreach ($this->specialties->enabledKeys($organization) as $key) {
|
||||
$deptIds = data_get($organization->settings, "specialty_module_provisioning.{$key}.department_ids", []);
|
||||
if (is_array($deptIds) && in_array($departmentId, array_map('intval', $deptIds), true)) {
|
||||
@@ -50,6 +59,15 @@ class CareQueueBridge
|
||||
return CareQueueContexts::CONSULTATION;
|
||||
}
|
||||
|
||||
public function contextForPractitioner(Organization $organization, ?Practitioner $practitioner): string
|
||||
{
|
||||
if (! $practitioner?->department_id) {
|
||||
return CareQueueContexts::CONSULTATION;
|
||||
}
|
||||
|
||||
return $this->contextForDepartment($organization, (int) $practitioner->department_id);
|
||||
}
|
||||
|
||||
public function issueForAppointment(Organization $organization, Appointment $appointment): ?Appointment
|
||||
{
|
||||
if (! $this->isEnabled($organization) || filled($appointment->queue_ticket_uuid)) {
|
||||
|
||||
Reference in New Issue
Block a user