Tens of thousands of patients were waiting for routine treatment at Royal United Hospitals Bath in October, new figures show.