A major health board has warned there is a "very high" risk that Brexit could cause disruption to its services.

NHS Lanarkshire said it was working with the Scottish government to identify potential problems.

A wider BBC investigation has uncovered NHS concerns that leaving the EU could worsen staff shortages and limit access to specialist medicines and doctors.

The UK government said it was confident of securing a Brexit deal that would benefit patients and the NHS.

However, ministers are also preparing for the possibility of a no-deal Brexit.

While NHS Scotland is under the control of the Scottish parliament, the Brexit negotiations are the responsibility of the UK government at Westminster.

Impact assessments

The UK is due to leave the EU on 29 March 2019.

The BBC asked health boards across Scotland for details of their Brexit preparations and any impact assessments.

Their responses - under freedom of information law - reveal concerns, uncertainty and some confusion.

NHS Lanarkshire's warnings are the starkest but many of its concerns are shared across the health service.

One of the key issues is the impact leaving the EU will have on retaining and recruiting European staff.

EU nationals living in the UK when Brexit happens should be allowed to remain.

But NHS Lothian is concerned some will choose to leave anyway and that others may be excluded from the workforce by failing to secure settled status.

NHS Orkney said a "large proportion" of its doctors were EU nationals from outside the UK.

It said there had already been a "dramatic reduction" in applications for posts in Orkney, which it links to Brexit.

There is already a shortage of NHS doctors in Scotland.

It is estimated that about 17,000 EU nationals work in health and social care in Scotland.

That accounts for less than 5% of the workforce, but the proportion is much higher in some specialisms.

As NHS Scotland does not routinely record the nationality of staff members, it does not have precise information.

NHS Borders said an attempt to extract that data from HMRC records was blocked by the NHS panel that deals with privacy issues.

Other key Brexit concerns shared by a number of NHS boards include:

Cancer - availability of nuclear material (radioisotopes) for diagnosis and treatment of cancer

Blood - availability of blood products, and organs for transplant

Medicines - access to specialist medicines and technology if agreements are not in place

Supplies - effect of any trade rule changes on ease and cost of buying goods internationally

Assistance - arranging treatment for UK citizens in EU countries and vice versa, as well as cross-border cooperation

Economy - potential for budget cuts if Brexit causes a downturn.

NHS Tayside is also worried about continued access to European expertise for rare and complex diseases.

If the NHS is no longer able to participate in these networks, it said that "will delay in some patients access to the best possible clinical knowledge and expertise for their condition".

NHS Lanarkshire - Scotland's third largest health care provider, serving more than 500,000 people and employing about 12,000 staff - has set out its position in its register of corporate risk.

It made clear "there is a risk NHS Lanarkshire will not be in full operational readiness for EU withdrawal".

It said this was especially true in areas where there was "limited detail" about what changes will occur.

It added that Brexit had the "potential to adversely disrupt continuity of delivery of healthcare services".

The board raised the level of this risk from "high" to "very high" over the summer as speculation about a possible no-deal Brexit grew stronger.

It referred to a "planned Scottish government development session for all chief executives" as one of nine measures to mitigate adverse effects.

Different boards seem to have different understandings of where the responsibility for Brexit preparedness lies.

NHS Forth Valley said work for the health service was being "coordinated nationally by the Scottish government".

NHS Borders said that while a letter from the government offered support, "the general thrust is clearly that NHS boards are expected to lead on the preparations".

Detailed work

While some boards have carried out detailed work on Brexit, others appear to have done far less.

NHS Lothian provided a 10-page report summarising the key issues, while NHS Greater Glasgow and Clyde released two sentences confirming an assessment was "in progress".

In mid-August, NHS Western Isles was "now starting" assessment work.

By that stage, NHS National Services Scotland (NSS) - which which provides advice and services to the rest of NHS Scotland - was already committed to "continuous planning".

A paper for the NSS board raised a particular concern that Brexit could end UK membership of the European Blood Alliance (EBA).

This could result in "loss of early visibility on emerging infectious diseases", it said.

The Scottish National Blood Transfusion Service may also have to give up hosting an EBA conference next spring and its seat on the EBA's executive board.

NHS Ayrshire and Arran's resilience department had "not made any assessment on the EU leaving the European Union" or any contingency plans.

The uncertainty surrounding Brexit is an overarching concern across NHS Scotland.

NHS National Services said the lack of clarity "makes contingency planning for a post EU environment challenging.

"Planning and potential mitigation" it said "could be a significant drain on energy and resources".

Both NHS Lothian and NHS Borders said there had been "very little guidance" from the Scottish government on Brexit.

The government has sent all boards an operational readiness questionnaire which was due to be completed by 14 September.

What are governments saying?

Scottish ministers have frequently criticised the UK government for not providing enough detailed information.

The UK and the EU are continuing to negotiate the terms of Brexit and the outline of a future relationship.

A withdrawal agreement is expected to include a transition period until the end of 2020, which would allow more time for preparation.

But if no deal is reached, Brexit is likely to be far more disruptive.

It is the job of a responsible government to prepare for all scenarios, including the unlikely event that an agreement with the EU cannot be reached." UK government spokesman

A spokesman for the UK government said it was working closely with the devolved administrations in developing "contingency plans, including on "key aspects of healthcare provision".

A statement to the BBC said: "We firmly believe it is in the interests of both the EU and the UK to strike a deal and we are confident that this will be achieved.

"But it is the job of a responsible government to prepare for all scenarios, including the unlikely event that an agreement with the EU cannot be reached."

We will continue to push the UK government for answers to legitimate questions and concerns about the very real risks Brexit poses." Jeane Freeman

Scotland's Health Secretary Jeane Freeman said with only six months to go to Brexit, the Scottish government was doing all it could to "plan and mitigate against as many of the significant uncertainties that exist for our health service".

She warned: "But there are limitations on what we or even the UK government can mitigate against, given issues like mutual recognition of qualifications and lifespan limits of certain medicines.

"That is why we maintain that Scotland's future is best served by remaining in the EU or at least by staying in the single market and customs union.

"We will continue to push the UK government for answers to legitimate questions and concerns about the very real risks Brexit poses to research, clinical trials and access to medicines and staff."

On 21 August, Scotland's chief medical officer Dr Catherine Calderwood told the BBC the NHS had "detailed plans" to ensure there would be enough medicines in Scotland in the event of no deal.

On 23 August, the UK government published advice to help the health and social care sector prepare for a no deal Brexit.

NHS Grampian and the Scottish Ambulance Service have yet to respond to the BBC's freedom of information request. Health board fears over Brexit disruption

NHS Scotland Brexit preparations

Ayrshire & Arran - working with government and NHS partners

Borders - potential loss of EU staff is a "major area of concern"

Dumfries & Galloway - "undertaking a self-assessment"

Fife - Brexit working group ensures "full understanding" of board's readiness

Forth Valley - assessment and preparation work "coordinated nationally"

Grampian - apologised for delayed response

Greater Glasgow & Clyde - assessment in progress

Highland - assessment in progress

Lanarkshire - "very high" risk board will not be operationally ready for Brexit

Lothian - key risks include loss of employees and difficulties in recruiting

National Services - "continuous planning process"

Orkney - large proportion of EU doctors

Scottish Ambulance Service - yet to respond

Shetland - developing contingency plan

Tayside - has Brexit co-ordinating group

Western Isles - "work now starting"