NHS patients have received a letter of apology after an IT coding error meant hundreds were wrongly told they had cancer and other serious conditions.

The health board has apologised to patients who were mistakenly told they had a serious illness in their discharge letters earlier this month.

A software update has been blamed for the letters which indicated that people had pre-existing conditions of cancer or endometriosis.

Patients in Forth Valley were issued with the discharge letters as usual after leaving hospital, it was handed to some as they walked out the door and was posted to others.

Copies of the letters, which detail all the care and treatment a patient has received whilst they were in hospital, were also sent to their GPs.

But it's been discovered that during those six days, a software update caused a fault on the letters, that wrongly-indicated patients had a pre-existing condition of cancer or endometriosis.

The IT glitch meant codes for cancer and endometriosis were ticked even though the person had never suffered from those illnesses.

In a statement released by the NHS, it confirmed that  it had written to the patients affected and apologised.

It has also reached out to local GPs and sent updated letters.

The NHS statement said: "Following a software update to our patient information system, we recently identified an issue with the accuracy of the information contained in a small section of the patient discharge letter which lists details of any pre-existing health conditions.

"The rest of the information in the discharge letter, including details of any diagnosis, treatment, test results or medication during the patient's stay in hospital was accurate.

"This issue only affected discharge letters sent to GPs and, in some cases, patients during a short period from August 1 to August 7.

"We have written to the patients who received a discharge letter during this period to highlight the issue and apologise for any concern this IT error may have caused.

"Local GPs were also informed and have been sent updated discharge letters to ensure the correct patient information is held on file for future reference."