A teenager died from a heart infection after visiting the dentist but doctors failed to pick up the condition, an inquest has heard.
Daniel Elton, 18, died in November 2015 at home in Castle Gresley, Derbyshire.
Derby Coroner's Court heard he had been released from Queen's Hospital in Burton-upon-Trent the day before.
The inquest heard that it was now likely a tooth extraction had caused endocarditis.
The first day of the inquest heard Mr Elton had complained of feeling unwell after visiting the dentist to have a tooth removed in April 2015. In the months after he made several trips to see his GP and tests were carried out, but he was never diagnosed with the bacterial heart infection he eventually died from.
Mr Elton's GP, Dr Robin Thorne, said his symptoms did not lead him to think endocarditis was the problem, so he referred him to hospital.
He said Mr Elton had been diagnosed with anaemia a month before he died and the GP wrote to the hospital asking for an MRI scan but regrets the letter was not "written more firmly".
"With the benefit of hindsight, some of the symptoms were probably connected with endocarditis," he said. "Believe me, I have woken up many times at night asking whether we should have done something different."
Mr Elton had been called into Queen's Hospital for a blood transfusion two days before he died. The Trust which runs Queen's Hospital, Burton-upon-Trent, has issued an apology. The Burton NHS Foundation Trust said Mr Elton's care before his death was not to the standards patients and families expect.
"The trust would like to apologise to Daniel's family for the way in which Daniel was discharged the day before his death," it said.
It added that a number of changes had been made to the way patients were discharged.