Impact on emergency and elective hospital-based care in Scotland over the first 12 months of the pandemic: interrupted time-series analysis of national lockdowns