There are concerns about the mental health of a young man accused of stabbing a mother and her six-year-old son on Friday in what police have called a random attack.

John Garang Luka Yag, 20, is charged with two counts of attempted murder. His matter was dealt with in court Tuesday morning but Yag remains in hospital and was not able to appear in person or by closed-circuit TV.

Prosecutor Achilles Grobler requested that Yag see a forensic psychiatrist at his court date next week. The doctor will assess his mental fitness and tell the judge if he needs further assessment or has no concerns. 

The mother and son were walking near a green space in the 100 block of Bearberry Crescent N.W. when they were attacked from behind.

People in the area heard their cries for help, saw what was happening and called 911.

The suspect fled the scene as one witness approached. Yag was arrested shortly after.

Police said at the time that Yag was not known to the two victims but was in the area visiting a nearby home.

A publication ban was imposed on the identities of the two victims at Tuesday's court appearance.

The woman and her son were originally in serious condition but upgraded to stable on the weekend. They were both expected to spend several days in hospital.

Defence lawyer Nyall Dabreo appeared for Yag and expects to represent him going forward.