Graham Dwyer's murder trial has heard Elaine O'Hara had an internal violent fantasy world from the age of 12 that involved restraint situations.
The 42-year-old architect from Kerrymount Close, Foxrock denies stabbing the childcare worker in an allegedly sexually motivated killing at Killakee mountain in Dublin in August 2012.
The main witness today was Dr Matt Murphy, a consultant psychiatrist at St Edmundsbury Hospital who treated Elaine O'Hara from 2008.
He went through earlier medical notes dating back to when she was a 16-year-old schoolgirl under the care of the late Dr Anthony Clare.
The jury heard as a teenager she talked about a "play in her head" that involved fantasies about being restrained and imprisoned.
Dr Murphy believed this faded out in later years but there were signs of masochistic behaviour, and in July 2012 self harm and suicide ideation prompted her admission to hospital for several weeks.
He said they didn't talk about her relations with men that summer but he noted she was calm and relaxed on August 22 – the date of her discharge and also the date of her alleged murder.