Media playback is unsupported on your device Media caption Dr Cieran McKiernan is an emergency consultant with Scotstar

In the past two years Dr Cieran McKiernan has had both legs amputated but is now back to work - as emergency medic on an air ambulance.

The senior doctor has had type 1 diabetes since the age of 13 as well as years of serious problems with the anatomy of his feet and ankles.

Despite being prone to broken bones, pain and infections, the 45-year-old became an accident and emergency consultant working for the past decade with Scotstar - a division of the Scottish Ambulance Service.

From their base in Glasgow, Scotstar transfer critically-ill patients in remote and rural areas to hospital by road and air.

Image caption Cieran has had both legs amputated below the knee

Two years ago Cieran returned from a trip to London with a blister on the sole of his right foot which would not heal.

"I underwent MRIs and saw a foot and ankle surgeon whose first comment was, 'How have you managed to function with those feet all these years?'," he says.

"I considered, several times, complex operations to try to fix them but they don't heal - they just go into a bit of remission."

Image caption Scotstar operates air ambulances from its base in Glasgow

He asked himself how long the foot would stay healed and would it just suddenly break down, leaving him back in the same position?

"It makes you think of other options," he says.

Cieran had already decided to have his left leg removed below the knee when he developed sepsis along with an acute kidney injury and spent days unconscious in an high-dependency unit.

The amputation of his leg was brought forward.

Image caption Cieran says his new prosthetic legs are better than his own

Cieran, who lives in Beith in Ayrshire but is originally from Belfast, says his mobility improved after the amputation but a bout of infections on his right foot led to a decision to remove it just over a year later.

"I don't think you can ever prepare yourself when you look down and you can't see anything where there should be a foot and your toes," he says.

"I had heard of this phenomenon of limb awareness after amputation - I was going 'god is this what it's going to be like?'.

"All of a sudden you get a feeling that you want to squeeze your toes and a bit of cramp comes in them."

Back to work

Cieran was fitted with two prosthetic legs which attach to the stumps below his knees. He says they are better than his original legs and allow him to do more.

He says: "The first question they ask you is, what do you want to be able to do? I said I wanted to get back to work.

"Over the last year I underwent assessments to show and to prove that I am still able to function."

BBC If you had seen me walking up a hill before all this happened you wouldn't have described me as in any way able-bodied

Part of this involved working with the Scottish Fire and Rescue service who have a big simulation area which recreates an emergency after a train has overturned in a tunnel.

The Scottish Ambulance Service carefully assessed Cieran's ability to do his job including whether or not his mobility posed any potential risk to patients or his colleagues.

Following his second amputation, Cieran was back to work within eight weeks.

"I feel relief, joy and a bit of excitement," he says. "The nerves have settled a little bit. The support I have had from all the guys here on the team has been superb. Throughout this whole process and today, it's almost like I have never been away."

Positive outlook

ScotStar's base near Glasgow airport houses specialist aircraft and vehicles designed to reach people who fall ill in remote and rural locations.

"We are essentially a mini-intensive care unit so we carry all the kit and monitoring that we would need to look after someone who is critically injured or critically unwell," Cieran says.

"The most challenging type of call would be if someone had fallen down three miles up a hill but if you had seen me walking up a hill before all this happened you wouldn't have described me as in any way able-bodied.

"Like all of these things, the pilot will hopefully land us as close as possible and we just get to the patient and do what we need to do."

Cieran's outlook is positive but he concedes he could not have done it without honest conversations around his pre-existing conditions and support from the family who pulled him through.

He says: "At the rehabilitation centre, the majority of people say 'I wish I had done this sooner.' It's an end point that you can then go on and get on with the rest of your life.

"Amputations have been viewed as operations of failure - the 'only option' that the patient has. I went into it with the thought process that this is going to benefit me.

"My advice would be to have an honest conversation with clinicians who are looking after you and family who are going to be affected and need to support you."