A friend of Elaine O'Hara's said she told the childcare worker she was playing a dangerous game with an architect she met on the internet who liked to cut her.
Married father Graham Dwyer of Kerrymount Close, Foxrock denies murdering the 36 year old at Killakee Mountain in Dublin in August 2012.
The jury has heard Elaine O'Hara was admitted to St Edmondsbury Hospital from time to time suffering from depression and anxiety disorder.
She became friends with another inpatient Edna Lillis who said she last met the childcare worker in late 2011
The court heard Elaine showed her cuts on her stomach which she said a man she'd met on the internet had given her as part of their relationship.
Ms Lillis said she told the childcare worker she was playing a dangerous game but Elaine just wanted to be loved.
A retired nurse at the hospital also gave evidence of speaking to the 36 year old on the evening of the 20th August 2012 - two days before her discharge and alleged murder.
Rosetta Callan said Elaine O'Hara complained about a man into bondage like herself who constantly came to her apartment but whom she refused to report to gardai on the basis that he had children.
Elaine O'Hara's GP has said he was aware of her depression but believed the childcare worker was doing 'reasonably well' when she last visited in the month before her alleged murder.
Dr Matthew Corcoran has been giving evidence at the trial of Graham Dwyer of Kerrymount Close, Foxrock who denies murdering the 36-year-old at Killakee Mountain in Dublin on August 22nd 2012.
The jury has heard Elaine O'Hara attended Dr Matthew Corcoran's GP practice in Foxrock for years, primarily for her asthma.
He has given evidence he did not treat her for her depression but he was aware of it and believed when he last saw her on the 10th July 2012 she was doing better than in previous times.
Under cross examination Dr Corcoran agreed he was surprised when he learned she had spent the six weeks before her disappearance in August 2012 at St Edmondsbury's Hospital for psychiatric reasons and that she had contacted the Samaritans.
The prosecution alleges that Graham Dwyer was in a BDSM relationship with the 36-year-old and that he stabbed her to death for his own sexual gratification
Her remains were found in September 2013, more than a year after her disappearance and the jury has heard no cause of death was established.