Keep consultation context on nested clinical pages and add Call again on patient queue cards.
Deploy Ladill Care / deploy (push) Successful in 1m7s
Deploy Ladill Care / deploy (push) Successful in 1m7s
Doctors can return to the active consultation from forms, lab, prescriptions, pathways, and bills; queue cards can re-announce called/serving tickets via the existing Queue recall bridge. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -320,5 +320,53 @@ class CareQueueBridgeTest extends TestCase
|
||||
->assertSessionHas('info', 'No patients waiting at your consultation service point.')
|
||||
->assertSessionMissing('error');
|
||||
}
|
||||
|
||||
public function test_recall_reannounces_called_ticket_from_patient_queue(): void
|
||||
{
|
||||
$appointment = Appointment::create([
|
||||
'owner_ref' => $this->owner->public_id,
|
||||
'organization_id' => $this->organization->id,
|
||||
'branch_id' => $this->branch->id,
|
||||
'patient_id' => $this->patient->id,
|
||||
'type' => Appointment::TYPE_WALK_IN,
|
||||
'status' => Appointment::STATUS_WAITING,
|
||||
'scheduled_at' => now(),
|
||||
'waiting_at' => now(),
|
||||
'queue_position' => 1,
|
||||
'queue_ticket_uuid' => 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee',
|
||||
'queue_ticket_number' => 'C055',
|
||||
'queue_ticket_status' => 'called',
|
||||
]);
|
||||
|
||||
Http::fake([
|
||||
'*/tickets/*/action*' => Http::response([
|
||||
'data' => [
|
||||
'uuid' => 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee',
|
||||
'ticket_number' => 'C055',
|
||||
'status' => 'called',
|
||||
'customer_name' => 'Ada Lovelace',
|
||||
],
|
||||
], 200),
|
||||
]);
|
||||
|
||||
$this->actingAs($this->owner)
|
||||
->from(route('care.queue.index'))
|
||||
->post(route('care.queue.recall', $appointment))
|
||||
->assertRedirect(route('care.queue.index'))
|
||||
->assertSessionHas('success');
|
||||
|
||||
Http::assertSent(function ($request) {
|
||||
return str_contains($request->url(), '/tickets/eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee/action')
|
||||
&& ($request['action'] ?? null) === 'recall';
|
||||
});
|
||||
|
||||
$this->assertSame('called', $appointment->fresh()->queue_ticket_status);
|
||||
|
||||
$this->actingAs($this->owner)
|
||||
->get(route('care.queue.index', ['branch_id' => $this->branch->id]))
|
||||
->assertOk()
|
||||
->assertSee('Call again')
|
||||
->assertSee('C055');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user