Record numbers waiting for hospital bed