table}` r LEFT JOIN `queues` q ON r.current_queue_id = q.id LEFT JOIN `patients` p ON q.patient_id = p.id LEFT JOIN `therapists` t ON q.therapist_id = t.id LEFT JOIN `users` u ON t.user_id = u.id WHERE r.branch_id = :bid AND r.is_active = 1 ORDER BY r.room_no ASC"; $stmt = self::getDB()->prepare($sql); $stmt->execute(['bid' => $branchId]); return $stmt->fetchAll(); } /** * Update room status */ public function updateStatus(int $roomId, string $status, ?int $queueId = null): bool { return $this->update($roomId, [ 'status' => $status, 'current_queue_id' => $queueId, ]); } }