Route pharmacy, lab, and billing tickets through a shared FIFO pool.
Deploy Ladill Care / deploy (push) Successful in 57s

Stop pre-assigning prescriptions to a default counter so Call next follows arrival order and each pharmacist only serves one active patient at a time.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 19:06:36 +00:00
co-authored by Cursor
parent 5e8c082e02
commit a3521247e0
5 changed files with 62 additions and 31 deletions
+6 -17
View File
@@ -109,7 +109,6 @@ class CareQueueBridge
return $prescription;
}
$point = $this->provisioner->defaultPoint($organization, CareQueueContexts::PHARMACY, $branchId);
$ticket = $this->issue(
$organization,
CareQueueContexts::PHARMACY,
@@ -122,14 +121,14 @@ class CareQueueBridge
],
'walk_in',
'api',
$point,
null,
);
if (! $ticket) {
return $prescription;
}
$this->applyTicket($prescription, $ticket, $point);
$this->applyTicket($prescription, $ticket, null);
return $prescription->fresh();
}
@@ -141,11 +140,6 @@ class CareQueueBridge
}
$request->loadMissing('patient');
$point = $this->provisioner->defaultPoint(
$organization,
CareQueueContexts::LABORATORY,
(int) $request->branch_id,
);
$ticket = $this->issue(
$organization,
CareQueueContexts::LABORATORY,
@@ -158,14 +152,14 @@ class CareQueueBridge
],
'walk_in',
'api',
$point,
null,
);
if (! $ticket) {
return $request;
}
$this->applyTicket($request, $ticket, $point);
$this->applyTicket($request, $ticket, null);
return $request->fresh();
}
@@ -181,11 +175,6 @@ class CareQueueBridge
}
$bill->loadMissing('patient');
$point = $this->provisioner->defaultPoint(
$organization,
CareQueueContexts::BILLING,
(int) $bill->branch_id,
);
$ticket = $this->issue(
$organization,
CareQueueContexts::BILLING,
@@ -198,14 +187,14 @@ class CareQueueBridge
],
'walk_in',
'api',
$point,
null,
);
if (! $ticket) {
return $bill;
}
$this->applyTicket($bill, $ticket, $point);
$this->applyTicket($bill, $ticket, null);
return $bill->fresh();
}