The scale of the "crisis" facing GP out-of-hours services has been revealed by BBC Wales research.

It shows Welsh health boards could not fill hundreds of shifts, equating to thousands of hours of GP-cover during the course of last winter.

One woman with bipolar disorder said the impact had been "enormous" and had caused her to self-harm.

The Welsh Government said it was working with health boards "to improve out-of-hours services further".

Our research, following freedom of information requests, showed many health boards missed - by a significant margin - key targets for meeting calls ranked as urgent in terms of home visits or appointments.

Several health boards failed to provide any GP out-of-hours cover at all in their areas at various points in the six months to March 2018.

In some instances, patients had to wait 24 hours or longer for a home visit or to get an appointment to see a GP at weekends or outside the hours when their usual surgery is open.

Gwen Goddard from Cwmbran told BBC Radio Wales her bipolar disorder meant she often needed to access services during the night or at weekends.

"I have actually been told to call back in the morning, I have been told to call the Samaritans before now," Ms Goddard said.

"The impact is enormous. If you are in a mental health crisis - if you are having a panic attack or if you are feeling suicidal and can't get hold of somebody or have to wait - it is such an extreme state of mental distress that it further impacts on the state that you are in.

"It has caused me all kinds of problems. I have quite bad, quite horrific scars on my legs from self-harming due to not being able to see a doctor, to get any medication or to get any help when I have been in distress."

There are 24 different primary care centres - mostly attached to hospitals - which provide out-of-hours cover when GP surgeries and clinics are closed. Calls are handled by the health board or NHS 111 service.

How does it look in your health board area?

Abertawe Bro Morgannwg

Could not fill about 3,000 hours of out-of-hours shifts.

A further 1,456 hours were lost due to the fact a GP out-of-hours treatment centre at Neath Port Talbot hospital was closed overnight for the entire winter. The health board said the decision was made in agreement with the local health watchdog and its future opening hours will depend on "engagement" with the community health council.

19% of all out-of-hours shifts were empty across the six months.

Unfilled shifts at various locations almost every day of the winter.

On four occasions, there was no GP out-of-hours cover across the entire health board for at least three hours. Although, the NHS 111 telephone service which was piloted in the area remained in operation during these period.

Ten concerns were raised by health professionals about out-of-hours over the period.

Aneurin Bevan

Could not fill about 2,300 hours of GP out-of-hours shifts

On 27 separate days, there was no out-of-hours cover across the entire health board for at least 30 minutes.

Between October 2017 and March 2018 there was no GP out-of-hours cover across the entire region for a total of 53 hours and 19 minutes.

In a five-day period in February, more than half of GP out-of-hours were unfilled.

Betsi Cadwaladr

It could not fill 2,082 hours of GP out-of-hours shifts - meaning 462 individual shifts were empty.

In January, 13.5% of GP out-of-hours shifts went unfilled

Cardiff and Vale

Could not fill 5,597 hours of out-of-hours shifts - equivalent to more than 233 days of cover.

On 12 occasions there was no GP cover for the entire health board for at least 30 minutes.

It had to suspend the GP out-of-hours service entirely on Christmas Eve and 30 December to new patients due to high demand. We know from covering winter pressures there were exceptional issues due to seasonal flu and more people turning up at A&E.

In December, 28% of GP out-of-hours shifts were unfilled.

The maximum wait for a GP visit in this period was 30 hours (1,754 minutes).

Cwm Taf Health Board

It did not provide details about GP out-of-hours rotas on grounds of cost - but did provide information on performance.

15% of very urgent cases - and 41% of urgent cases - faced waits of more than two hours at primary care centres to be seen after initial assessment.

The two out-of-hours centres at the Royal Glamorgan and Prince Charles hospitals were at peak demand in December, dealing with about 123 out-of-hours cases a day.

Hywel Dda

It could not fill about 1,500 hours of GP out-of-hours shifts.

Seven of the eight out-of-hours shifts at Prince Philip Hospital in Llanelli on 4 March were unfilled.

The maximum wait was 20 hours (1,191 minutes) for a call back from a health professional

The maximum wait for a home visit was 19 hours (1,149 minutes).

Maximum wait was 23.5 hours for an appointment at a GP out-of-hours centre

Powys

Did not provide details about GP out-of-hours services provided by other organisations, namely Shropshire Doctors and Abertawe Bro Morgannwg.

The research by BBC Wales also reveals how the problems are contributing to significant delays faced by patients with several health boards breaching - by significant margins - targets about the time it takes to see urgent cases calling the out-of-hours service.

The problems, not surprisingly, peaked during the winter months.

The upshot of that meant it was likely more people would have turned up to already-stretched hospital emergency departments.

Groups representing GPs have long warned that out-of-hours services in Wales are in "crisis".

In January, a BMA Wales survey found exhaustion was the main reason GPs did not sign up for out-of-hours shifts.

Dr David Bailey, chairman of the BMA's Welsh council, said the latest findings were "no surprise". He said out-of-hours working often produced acute cases which added to pressures.

But should GPs work on seven-day-a-week rotas? Terms and conditions were changed 20 years ago and doing out-of-hours was no longer compulsory for GPs.

Dr Bailey admitted it had left a tricky legacy but said it had been welcomed because workload demands and the number of consultations have both risen subsequently.

"Actually having the 24-hour responsibility as well, was just becoming an intolerable burden and an intolerable barrier to people coming into general practice," he said.

In May, a report by the community health councils found too much out-of-hours GP care was patchy and the service across Wales was fragile. It recommended new ways of delivering out of hours care.

Dr Anish Kotecha, a GP in Cwmbran, told BBC Radio Wales that many doctors go into general practice to have better working hours and are often reluctant to work nights or weekends.

Dr Mohan De Silva said there used to be more GPs who worked at out-of-hours centres exclusively but it was no longer seen as a career option

The findings also back up a recent Wales Audit Office report which warned that while out-of-hours services are appreciated by patients, national standards were not being met due to morale and staffing issues.

The chairwoman of the Royal College of GPs in Wales Dr Rebecca Payne said the data was very concerning and added to mounting evidence that out-of-hours services were unsustainable.

It has also launched an action plan outlining five steps to turn the services around, including increasing the number of trained call handlers.

"Welsh Government and local health boards need to take heed of our recommendations and take urgent action to improve the services," she said. "They owe it to the staff working in the services and the patients trying to access them."

A Welsh Government spokesperson said: "We expect health boards to provide care to meet the needs of patients out of hours, and make best use of all multi-disciplinary professionals.

"Whilst a recent Wales Audit Office patient survey revealed that 89% of respondents rated the service as excellent, or very good,' we are working with health boards to improve out of hours services further."