The NHS needs to learn lessons from last winter, the Health Secretary said, as a new report said the service had come under "increased and prolonged pressure" in 2014/15.

There were 2,118 patients admitted to hospital suffering from flu over the winter period - almost three times the total of the previous year, and more than in the last three years put together.

The pressures put on the system by levels of respiratory illness were "the highest seen in the last ten years", a Scottish Government report revealed.

Problems caused by bed-blocking - also known as delayed discharge - increased in the period up to the end of 2014 as people who were medically well were unable to leave hospital because they were waiting for care to be arranged.

The situation resulted in patients having planned surgeries cancelled while in January alone 703 people had to wait for more than 12 hours in accident-and-emergency departments, with just over 87% of patients seen within the four-hour target time.

Health Secretary Shona Robison said: "We know that the winter months are always more challenging for our health boards, with today's report showing that hospitals saw more, sicker, people last winter compared to previous years.

"With more people now living with long-term conditions and a growing number of older people with multiple conditions and complex needs, it is vital that we learn from the lessons of last winter and have robust plans in place not only for this winter, but throughout the year."

The Scottish Government has now issued guidance to NHS boards on how to prepare for the coming winter - the earliest ministers have done this.

Last year, health boards were asked to have their winter plans formally signed off by the end of November but the deadline has been brought forward to October this year.

Ms Robison said: "We know that the increased pressure on our emergency departments led to health boards having to cancel some elective procedures, which is why we're asking boards for whole system activity plans for winter.

"Our guidance also asks boards to have in place strategies for staffing additional capacity to maintain progress towards minimising delays in discharging patients."

While she said A&E waiting-times figures were "down on recent winters", she added that "emergency departments across the country have improved steadily over recent months - and the latest figures are now better than at this point last year".

The report for winter 2014/15 said: "In winter 2014/15 pressures impacted on A&E waiting-times performance, with A&E waiting-times performance improving significantly into the spring and summer

"With the increased pressures in emergency activity, NHS boards reported increased levels of cancellation of elective inpatients on the day or day before the planned procedures over the winter."

The report stated: "There were increased and prolonged pressures from influenza and respiratory illness.

"Pressures from delayed discharge continued to increase through to the end of 2014 and eased in to 2015.

"These pressures will have contributed to the reduced key whole-system four-hour A&E waiting-times performance in December, January and February."

Hospital A&E departments dealt with 3,924 more cases than the previous winter, with a rise in both emergency and planned in-patients and an increase in day patients.