Professor Mark Strachan, who is a consultant in diabetes and endocrinology at the Western General Hospital, said: "If we identify that somebody has a genetic type of diabetes, it can have a transformative effect on their life.

"Also, if we can establish that an individual has another form of diabetes, such as type 2 diabetes, again there may be alternative treatments to insulin that we can offer them. So I think it is a very important and potentially transformative test."

One patient, Sophie Fleming, was diagnosed with type 1 diabetes as a child and used an insulin pump to control her blood glucose levels. It was only when she fell pregnant and doctors carried out a routine blood test that she discovered she had rare form of diabetes.

She told the BBC that this transformed her treatment plan. Doctors stopped her insulin doses and prescribed her tablets instead, which now successfully control her blood sugar levels.

Sophie said: "It was just elation, and disbelief. I didn't quite believe that this would turn out the way they were expecting it to. I actually didn't take my pump off for a couple of days after cutting down on insulin - and even then I kept it beside my bed for a good six weeks, programmed ready to plug back in and ready to go again. Because after 27 years, I just didn't think I'd be on anything but insulin."