TORONTO -- Two Toronto hospitals are studying the medical applications of using virtual reality to relieve stress for children.

The Scarborough Health Network is testing a VR headset game designed to reduce anxiety for kids between six and 12 who are undergoing surgery for the first time.

Researchers at Holland Bloorview Kids Rehabilitation Hospital have also conducted a study on the potential of using VR technology to support children with autism spectrum disorder.

Production company Shaftesbury has partnered with the institutions to develop games and other immersive media for the clinical trials.

The company says the VR systems use machine learning to adjust the content based on each child's emotional response.

It says the goal of the technology is to reduce children's anxiety and make it easier to perform medical procedures.