A provincial court judge made the decision Thursday.
On the request of defence lawyer Joan Dawson, Layman will be remanded to the Waterford Hospital so that he can remain fit for trial, rather than be sent to jail.
Layman has been undergoing a psychiatric assessment since he was arrested soon after a stabbing Sept. 25 during a skills-training exercise at a field in the Topsail neighbourhood of Conception Bay South.
He will return to court on Jan. 8.
The boy who was stabbed has recovered from his injuries, and was released from hospital about two weeks after the incident that made national headlines. He cannot be named because of a publication ban.
In an interview with CBC News earlier this month, Layman's parents spoke candidly about his history with mental illness, and said that he had refused to take the medication he had been prescribed.
"It was utter shock," stepmother Doreen Layman said in an interview.
"Total disbelief and utter shock that he would hurt somebody. That's not our child."