Amy Allen died at the world famous children's hospital in London, aged 14, following spinal surgery last September.
The Scottish teenager, whose memory is honoured with a first aid award in her name, was born with the genetic disorder Noonan's Syndrome which severely affected both her heart and lungs.
The inquest in London heard that Amy, from Dalry, lived with a catalogue of health problems but, despite being told several times her illnesses would lead to her death sooner rather than later, she kept defying the prognosis..
Doctors at the Royal Hospital in Edinburgh nicknamed her "the constant source of embarrassment" because she defied their predictions over and over again, the hearing at St Pancras Coroner's Court was told.
She was born with holes in her heart and needed surgery to close them when she was nine weeks old.
Amy was then diagnosed with a cardiac condition called Hypertrophic Cardiomyopathy - an unhealthy thickening of her heart muscle.
At four she was diagnosed with Pulmonary Hypertension - high blood pressure in her lungs.
Along with these health problems she was suffering with curvature of the spine, which was getting worse.
Doctors decided to operate on her back to relieve her pain, but referred her to Great Ormand Street Hospital (GOSH) because of her other problems.
While the operation went well, she sadly died the following day after being taken off a ventilator.
Amy's mum Leigh, 40, and dad Ricky, 47, sat in court along with other members of the family.
In a statement read to the court, mum Leigh said: "At birth she was diagnosed with Noonan's Syndrome.
"She lived a normal day-to-day life, attending a mainstream school.
"She loved to sing and laugh. She was a St Andrew's first aider and loved learning all the skills and wanted to have a career at a children's hospital.
"The organisation now hands out the Amy Allan Young Volunteer of the Year award each year."
Mrs Allan conitnued: "As a family we have been devastated.
"Amy was a well and happy teenager who we believed was destined for great things and we struggle with her loss."
Edward Ramsay, counsel for the family, argued her death may have been caused or made more likely by taking her off ventilation, called extubation, or not making emergency resuscitation treatment available.
He said: "The issue at it's heart is, should she have been extubated when she was?
"What was the effect of extubation at 11.20pm? Did that cause of materially contribute to her dying on the day that she did?"
Expert witness called by the family, Dr Steven Playfor (CORRECT), an intensive care doctor since 2001, told the inqiest that it was "the wrong decision" to take Amy off ventilation when GOSH doctors did so.
Dr Playfor said: "She suffered very severe and prompt deterioration in her status. I can say that with a high degree of certainty.
"It certainly materially contributed [to her death.] "It's not an error which I would count as neglectful. It's more in the realm of miscalculation, more of a dangerous error."
He added that the there was possibly too much time between her condition deteriorating and her being given a possibly lifesaving treatment, where blood is oxygenated outside the body, called ECMO.
Mr Ramsay asked: "Was there a delay in getting ECMO established? And, if so, did that cause or materially contribute to her dying that day?"
Dr Playfor answered: "All I would say is that the interval is quite long."
He added: "I would just highlight that its a significant period."
The inquest continues.