A fatal accident inquiry into the death of a 13-year-old Scottish private school girl who killed herself after looking at "suicide guides" online will focus on the whether the care she received from the NHS before the tragedy was good enough.
Sophie Parkinson first sought help from mental health services when she was seven.
The teenager, a second year pupil at the High School of Dundee, is reported to have been chatting to adults online and looking at content relating to self-harm and suicide before her death five years ago.
Her mother, Ruth Moss, 47, has blamed NHS Tayside for the death, claiming Sophie would be alive had she received better care.
Today a preliminary court hearing before a fatal accident inquiry expected to start in January next year was told the "actual circumstances" of Sophie's tragic death would be the subject of an agreement between lawyers, allowing the probe to focus on what might have been done to prevent it.
Steven Quither, procurator fiscal depute to the inquiry, told the court: "It will be about the run-up, if I can put it like that, and what steps were taken to safeguard the life of the deceased."
Mr Quither said the Crown had commissioned reports from a psychiatrist and a psychologist who had reviewed what had been done.
The court heard lawyers were also reviewing a list of documents and possible witnesses compiled by Sophie's family.
In addition, Gavin Anderson, counsel for the £13,000-a-year high school, said the school was trying to recover documents taken by Dundee City Council after Sophie's death as part of the local authority's own investigation.
Mr Anderson said Sophie's pupil progress report and the independent school's child protection file had not yet been returned by the council.
Sheriff Tom Hughes ordered that a further preliminary hearing should be held on 25 November to ensure all was ready for the evidential stage of the inquiry, which is expected to last five days.
Sheriff Hughes said: "This is a very tragic situation and a complex one."
Outside court, Mrs Moss said she was pleased the investigation had finally reached court.
She said: "I have a real mix of emotions today, but it's a relief that the inquiry is finally starting."
Mrs Moss had previously said earlier attempts Sophie had made to take her own life had been dismissed by the health board as "childish cries for help" and that NHS Tayside's Child and Adolescent Health Services had not provided enough support to Sophie following these suicide attempts.
She said she believed NHS Tayside's risk assessments were "hugely inadequate".
The probe, at Dundee Sheriff Court, is taking place after the Lord Advocate, Scotland's most senior law officer, ruled it should be held as Sophie's death gives rise to "serious public concern".
Sophie died in March 2014 at her family's home in Liff on the outskirts of Dundee.