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
+14
View File
@@ -22,6 +22,7 @@ class BillService
public function __construct(
protected InvoiceNumberGenerator $invoices,
protected MerchantGatewayService $gateway,
protected CareQueueBridge $queueBridge,
) {}
public function queryForOrganization(string $ownerRef, int $organizationId): Builder
@@ -81,6 +82,11 @@ class BillService
AuditLogger::record($ownerRef, 'bill.created', $visit->organization_id, $actorRef, Bill::class, $bill->id);
$bill = $bill->fresh(['lineItems', 'patient', 'payments']);
if ($visit->organization) {
$this->queueBridge->issueForBill($visit->organization, $bill);
}
return $bill->fresh(['lineItems', 'patient', 'payments']);
}
@@ -441,6 +447,7 @@ class BillService
$bill->refresh();
$paid = $this->paidSum($bill);
$balance = max(0, $bill->total_minor - $paid);
$wasPaid = $bill->status === Bill::STATUS_PAID;
$status = Bill::STATUS_OPEN;
if ($paid > 0 && $balance > 0) {
@@ -460,6 +467,13 @@ class BillService
'balance_minor' => $balance,
'status' => $status,
]);
if (! $wasPaid && $status === Bill::STATUS_PAID) {
$organization = Organization::query()->find($bill->organization_id);
if ($organization) {
$this->queueBridge->complete($organization, $bill);
}
}
}
protected function paidSum(Bill $bill): int