Wharfedale Hospital in Otley has opened a new £12m unit which could reduce waiting times for operations.