Polices said on Wednesday night that investigators had attended Royal North Shore Hospital and had charged a 23-year-old man with attempted murder, armed with intent to commit serious indictable offence and affray.

He was refused bail and will front Hornsby Local Court on June 22.

The terrifying scenes last week occurred after a confrontation with the armed man led to police firing a number of shots, injuring numerous people including the alleged assailant.

An 82-year-old woman and two other women in their 60s who were wounded remain in a stable condition in hospital. Another man suffered a graze to his leg.

Following the shooting, it was reported that the armed man had gone missing from a psychiatric centre.