Role reversal: Dr Richard Dobson, a clinical research fellow, discovered he had a tumour in his own heart / TOM FINNIE

When Richard Dobson, a young doctor of 28, took part in heart-scan research, it was just to make up the numbers. But a shock discovery led to him undergoing life-changing surgery. Interview by David Crookes

It took a while for the words to sink in. I was standing, staring at the people opposite me, having just had my body scanned for a routine medical project I was working on with my colleagues. They had something to tell me and I was a mixture of curiosity and anxiety.

People go to see a doctor because they suspect something is wrong with them. They usually display symptoms. I had nothing that would lead me to believe there was anything wrong. There were no signs that the day would start with me being a doctor and end with me also being a patient.

The doctor's tone was gentle. It had come from years of experience of reassuring patients. "We have some bad news," he said, with compassion. "You have an atrial myxoma: a tumour in your heart." Being told you have a life-threatening illness is quite surreal. It's even more so when you have just spent 30 minutes innocently taking part in medical research as part of your job, only to discover that a normal day had turned into one that had the potential to change my entire life.

It was 17 February, 2011, and I had been helping my colleagues perform cardiac magnetic resonance imaging – or CMRI – scans of the heart, blissfully unaware that I was to learn something that would alter my world. Healthy volunteers were being scanned in the machine but there was a sudden cancellation, which left a spare slot. Not wanting to disrupt the day and to keep the research flowing, I was asked if would mind spending some time inside the scanner. Of course, I agreed. If nothing else it would give me extra experience of the process, so I went inside.

MRI scans work by using extremely powerful magnets and radio waves to create images of the body. The machines can be quite claustrophobic and when you are having the scan you have to hold your breath in various ways, following the instructions from the radiographers very carefully.

They can provide amazing detail regarding the structure and function of organs throughout the body such as the heart and brain, and have revolutionised the assessment and management of so many medical conditions.

After half an hour, I came out of the machine and almost immediately two of my colleagues said they needed to speak to me. They asked me to walk with them across the corridor into a room opposite. Curiosity was getting the better of me and I could also feel my palms becoming a little clammy.

Then the bombshell was dropped. My mind was racing. Initially my reaction was one of disbelief, then shock. Somebody as healthy as myself had a heart problem? And a serious one at that? I was scared. Would I die? I was diagnosed with myxoma. We'd barely touched on the condition at medical school because it is so rare it affects around one in 100,000 people. And I knew what was to come: open heart surgery.

How could it have happened? Three days earlier I had enjoyed a lovely Valentine's night with my wife, Donna, who I met while working at a hospital in Dumfries in Scotland. I was still buoyant about the day and we were looking forward to a planned weekend break away to the Isle of Arran, just off the coast of Ayrshire. My career as a clinical research fellow at the Golden Jubilee National Hospital in Clydebank near Glasgow had been going extremely well.

All my life I had been dedicated to keeping fit and healthy. Studying was tough, but I always made sure I had time to train and I really enjoyed throwing myself into whichever 10k or marathon was coming up next.

I couldn't quite believe that at the age of only 28 I would have to undergo a major operation where the surgeons would have to stop the heart beating completely for almost half an hour in order to proceed.

Myxomas are not malignant. They do not invade other tissues and spread to other parts of the body as lung or breast cancer does. However, they can cause a number of complications, some of which can be devastating.

The greatest risk is when the myxoma fragments and enters the bloodstream. These fragments could occlude an artery supplying one or more organs of the body with blood. From the left side this may mean it occludes one of the arteries supplying the brain, causing a stroke. It could also affect the limbs, leading to ischaemia (tissue damage caused by a restriction in blood supply), and a possible need for amputation, and the gut, causing ischaemic bowel.

From the right side it can cause a pulmonary embolus, which can lead to sudden death. The myxoma could also obstruct a heart valve, which generally leads to breathlessness and reduced exercise capacity among other features of heart failure. Alternatively the myxoma can lead to various systemic symptoms such as persistent fever, weight loss and lethargy.

So surgery is the only option. It was hard to absorb the diagnosis. I tried to rationalise it and realise that there are some things that you just have to leave to fate. But when I was being told my thoughts turned immediately to my wife. "Go and call your wife," the doctor said and I rushed downstairs and picked up the phone. She was at work and she couldn't believe what was she was hearing. Her bosses told her to take as much time off as she wanted. I was worried that she wouldn't concentrate properly driving home. With conditions such as this, it is important to act fast. But I had a decision to make: whether to have the operation in Clydebank or go to the one closest to my parents. I grew up in Portsmouth and my mother and father live in Southampton now. I decided to have my operation in Southampton General Hospital and it was booked in just 10 days after the diagnosis.

Although I trust my colleagues in Clydebank, I felt having my operation there would have put them under too much pressure. Had it not been a heart operation, I would have felt comfortable but it would have been too difficult being a patient in the hospital in which I worked. And while I waited for the operation to take place, Donna and I did everything we could to make the time as normal as possible.

We went to the cinema, had meals out and I made the most of my time off. I knew recovery would be long, and I was to spend seven days in hospital including the day before the operation.

The surgery was done under general anaesthetic. I awoke on the intensive care unit. I had a plethora of drains and lines attached to my body and I was immobile and sore. Five days later I was back at my parents' home but the agony didn't stop there.

A few days later, I developed an abnormal heart rhythm (an "arrhythmia") and I had to go back into hospital for treatment. This involved getting an electric shock across the heart from a defibrillator under general anaesthetic. The tablets I had been taking to prevent this from occurring weren't quite powerful enough. A couple of weeks later, I was back in with the same condition.

The next few months were marked by attending cardiac rehab to build up my fitness. I was back in Glasgow by this time, and attended the local hospital to where I lived. It wasn't without its moments of excitement, though.

A lot of the other patients who attend the class tend to be older, and are referred because they have recently had a heart attack. On one occasion one such gentleman experienced a cardiac arrest just after the warm up and collapsed in the middle of the exercise hall.

Obviously, all the staff are trained in intermediate or advanced life support, but I think they were grateful when I was able to help out and assist with using a defibrillator to bring back his normal rhythm, and establish IV access. He made a complete recovery after just a minute of CPR, and the hospital arrest team were quite surprised to find him looking so well by the time they arrived.

But one thing I really wanted to do was run again. I signed up for the Helensburgh half marathon and a few 10ks. I went to run in the Cologne marathon. This was very tough but I crossed the line in around four hours. That was slower than my personal best of three hours and 24 minutes but, more importantly, I raised around £1,000 for Médecins Sans Frontières.

My experience has certainly helped me relate better to my patients, many of whom will need cardiac surgery, and it has made me much more aware of how frustrating it can be to be stuck in hospital, even though the care I received from everyonewas excellent.

Today I feel much better and have a lot to look forward to. Last November, our baby Lucy arrived, and that is the best present I could ever wish for.Interview by David Crookes