By Anita Charlesworth

Public concern about the pressures facing the NHS loomed large in the debate over the UK's membership of the EU.

That our health service is in a fragile state is beyond debate. NHS providers posted a combined deficit of £2.5 billion in 2015/16 – that is bigger than the entire budget for the Department for Environment, Food and Rural Affairs.

Since 2010 the health budget has been protected from funding cuts but spending growth has lagged well behind the rising demands on the service from population growth, increased chronic disease and additional costs. In exchange for this protection, the NHS has been asked to absorb these extra pressures through improved efficiency. Of course there are opportunities to improve the efficiency of the NHS but realising these savings is proving to be a huge challenge – particularly against a backdrop of staffing shortages.

Money and workforce will be fundamental to a sustainable health service. The decision to leave the EU has potential implications for both.

The NHS currently employs more than a million people, accounting for almost two-thirds of the total budget. Having the right number of professionals, with the right skills, in the right place and working together effectively is at the heart of a high quality and efficient service. But the NHS workforce is under strain. Vacancy rates are high, and the NHS is ever more reliant on expensive agency staff. The agency bill in 2015/16 was a whopping £3.7 billion.

And there's also a problem with low staff morale. Thirty per cent of GPs want to leave the profession within five years, and the junior doctors' dispute has just entered a new phase with BMA members voting against the government's proposed contract.

The National Audit Office estimated that in 2014, the NHS faced a shortage of around 50,000 clinical staff, including 28,000 nurses, midwives and health visitors. Meanwhile, the Royal College of Physicians reports that 40% of advertised consultant posts remain unfilled this year.

This is the backdrop to concerns about the possible increased staff shortages caused by Brexit. One-in-ten doctors in the UK are from other EU member states. Nursing has become increasingly reliant on non-UK trained staff, and nurses from outside the UK have accounted for an increasing proportion of new entrants to the UK nursing register since 2008.

Poor workforce planning has been an Achilles heel of UK health policy for many years, and these failings are at the heart of many of the problems confronting the NHS today. If the NHS cannot recruit and retain staff from EU member states, the problems will become more acute. Remaining as secretary of state for health in Theresa May’s new government, Jeremy Hunt needs to put the development of a coherent NHS workforce strategy at the top of his priorities. And most importantly, the NHS needs to make sure that all those who work in the system feel valued and engaged.

While the workforce is central to a sustainable, high-quality health service, so is the money to pay for it. Six years into the health service's decade of austerity, NHS finances are under pressure in a way few can remember. There has been much discussion of additional funding for the NHS as a result of the UK leaving the EU. But uncertainty after the EU referendum has threatened the very stability of the economy, which in turn poses a real threat to NHS funding.

Spending on the NHS consumes £1 in every £5 of the taxes we pay in the UK, so if slow growth reduces tax receipts, it is unrealistic to expect that the NHS can be immune from the consequences. In the end if the economy sneezes, the NHS will catch a cold.

The National Institute for Economic and Social Research and the Institute for Fiscal Studies has looked at what might happen under relatively optimistic assumptions about the short-term economic impact of the decision to leave the EU. Their analysis suggests that economic growth could slow to around 1.5% a year up to 2019/20 – just over half a percentage point of GDP less than the OBR forecast for the Chancellor's March budget. If that were the case, lower economic growth will result in a bigger deficit and the government would need to borrow around £16 billion to fund current spending plans in 2019/20.

If economic growth slows as predicted, any funding no longer being paid to the EU will be more than cancelled out by the negative economic consequences of leaving. With lower economic growth, the NHS could only receive additional funding if the government is prepared to do one of three things: run a higher fiscal deficit, raise taxes, or cut other areas of public spending.

These would be tough decisions. £100m a week for the NHS is equivalent to a 1p rise in the basic rate of income tax. In fact, there is a real risk that health funding might actually fall in the next few years. But this depends on the government's decisions on the pace and scale of deficit reduction, and how any further fiscal consolidation is shared between higher taxes and spending cuts.

If the government seeks a balanced budget in 2019/20 and the NHS takes an equal share of the resulting cuts, the budget for the health service would be around £2.8bn lower than set out in the spending review. If deficit reduction is delayed, austerity will continue for longer. The NHS is now caught between a rock and a hard place – deeper cuts in the short term or prolonged austerity in the long term.

There are no easy options and all scenarios present the NHS with an even tougher future. Beyond the immediate challenge, there is an umbilical cord between economic prosperity and the sustainability of the health service. Our analysis concludes that even if the UK ends up joining the EEA, there will be difficult decisions ahead as the NHS's need for funding will continue to outpace economic growth. This could result in a shortfall of at least £19bn by 2030/31 (£365m a week) unless the UK is prepared to devote a greater share of GDP to health care.

If the economy doesn't grow there will be less money to spend. This means that difficult choices will have to be made. Those decisions will be at the heart of political debate over the next few years. But it is difficult to see how the NHS could meet all the pressures on the service with a prolonged period of lower spending growth. It is clear that if the NHS is to manage the current challenge and equip the health service for the future, the government and system leaders need to support it to be as efficient as it can be.

There has never been a more urgent need for a clear plan for how the NHS can deliver big savings while ensuring the service has the staff it needs to sustain high quality care. Theresa May and her health secretary have a very tough job ahead of them.

Anita Charlesworth is the director of research and economics at the Health Foundation

The opinions in's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners