More than 1,000 operations at NHS hospitals were cancelled because of the heat during record-breaking heatwaves in May and June, figures show..