Crown prosecutor Grant Burston said naming the victims would cause "undue hardship" to them.
He said the Crown didn't oppose the woman's name staying secret and being able to reintegrate her into the community safely was the most important public-interest consideration.
Last week, forensic psychiatrist Dr Justin Barry-Walsh told the court about the negative effect naming the woman would have on her rehabilitation and treatment.
The woman, who has a long history of mental illness, is a special patient in hospital, with the court ruling she should remain there "until such time as it's determined that that restriction is no longer required".
On the day of the alleged offending, the woman saw her doctor for help. She assaulted him, believing he was evil and trying to poison her.
She was then referred to hospital where she was seen by a crisis team, who she was deeply suspicious of.
They tried to get her to take medication, which she'd been off for months.