Hineihana Mausii died of leukaemia despite two trips to the hospital in the days beforehand.
The death of a Dunedin toddler was a tragedy that ''could have potentially been avoided'', an expert says.
Hineihana Sosefina Mausii was taken to hospital twice in two days - and sent home on both occasions after Southern District Health Board doctors diagnosed her as having a viral illness.
On September 29, 2013 - just hours after her second discharge - the 2-year-old went into respiratory arrest and could not be resuscitated.
An autopsy a couple of weeks later found Hineihana died of acute myeloid leukaemia.
In the aftermath, a Health and Disciplinary Commissioner (HDC) review found a range of failings.
The consultant who sent the girl home without physically examining her breached the consumers' rights code, as did a registered nurse employed by Healthline who failed to provide appropriate advice during a three-minute phone call the next day.
Another emergency department doctor received an ''adverse comment'' for his role in discharging the patient and the quality of his documentation.
The SDHB's systems were not ''sufficiently robust'', the HDC said, and failed to foster a culture where staff felt comfortable questioning decisions.
All parties were told by the commissioner to provide a written apology to Hineihana's parents.
Yesterday, nearly six years later, the case came before coroner Brigitte Windley in the Dunedin District Court.
Starship Hospital paediatrician Prof Stuart Dalziel reviewed the evidence and said the ''major failure'' came when a junior doctor's opinion was not reviewed by his superior.
Instead, the consultant viewed Hineihana across the ward and opted to discharge her.
''It's a tragedy that she died and that could have potentially been avoided,'' Prof Dalziel said.
However, Dalziel could not confirm whether her life could have been saved with earlier intervention.
''There's still a possibility despite gold-standard treatment she could have died within a 24-hour period,'' he said.
Had he been in charge of her care, she would undoubtedly have remained in hospital and undergone X-rays, which it was likely would have shown up abnormalities, he said.
Blood tests would then have probably given a diagnosis of leukaemia, albeit perhaps inadvertently.
The court heard Hineihana's health woes began with a simple runny nose and a cough.
On September 26, she was still eating, drinking and playing.
But after midnight the following day, Hineihana woke up screaming and was taken to hospital.
She was discharged with a suspected viral infection and was given paracetamol and ibuprofen by her mother.
The following evening she was back at the emergency department and assessed by a nurse as having potentially life-threatening issues.
Hineihana's heart and breathing rates were both elevated, the court heard.
She was seen by a junior doctor, who spoke with his superior, but rather than examining the toddler it was put down to a viral illness and she was sent home - less than an hour after her arrival.
Both the nursing staff and the junior doctor had concerns about this course of action but these were not voiced at the time, the inquiry was told yesterday.
After a call to Healthline the following day, Hineihana's health declined further and an ambulance was called but she was pronounced dead at 2.30pm on September 29.
As well as the censures, the HDC made a series of recommendations which the health board has since implemented.
Windley stressed her role was not to apportion blame but to establish the facts and examine whether shortfalls in care contributed to Hineihana's death and potentially to make comments or recommendations to avoid future tragedies.
''Coroners seek to speak for the dead to protect the living,'' she said.
Stuart Dalziel's findings: 'Major failure' in treatment
• Hineihana Mausii should have remained in hospital after her second visit. • The consultant or a paediatrician should have examined her after a junior doctor. • It was likely Hineihana would have survived in the short term had she been treated immediately. • Inexperienced doctors need appropriate supervision in emergency departments. • Hineihana's parents should have been given written and verbal discharge advice. • It is unclear whether earlier intervention would have ultimately saved her life.