Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Five-year-old Cooper Tidmarsh lost his foot in a lawnmower accident two weeks ago and has been in the hospital ever since — an ordeal that has been made less traumatic with a little TLC from an unlikely source.

A robot.

MEDi is two feet tall and weighs 11 pounds — and looks he belongs on a shelf at a high-end toy store. He's all fun and games, but for a very serious purpose.

To see MEDi in action, watch NBC Nightly News at 6:30 p.m. ET Saturday.

At six hospitals in Canada and one in the United States, MEDi is helping to lower stress for children getting uncomfortable procedures, tests or shots.

"He asks if MEDi is coming every morning," Cooper's father, Tavis Tidmarsh, said as his son played with the robot at Alberta Children's Hospital.

"Yeah, he thinks it's so cool," added his mom, Kristy.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

In fact, it's practically magical. Research in the journal Vaccine showed MEDi's use reduced children's pain in medical procedures by 50 percent.

Dr. Tanya Beran, a professor of community health science at the University of Calgary, got the idea for MEDi after working in hospitals where kids scream at the thought of getting a needle.

"I thought that maybe they would respond to a child-friendly robot to help them face medical procedures," she said.

The robot itself was built and developed by Aldebaran, which calls it NAO and sells it for $8,000 and up. Beran added software to make it work in a hospital setting with children.

MEDi is programmed to interact with kids for a wide range of procedures. It started with flu vaccines and blood draws and has since expanded to include IV and catheter removal and brain-activity tests. Beran is working on adding cast-cutting to the menu.

It can even be programmed with a child's favorite story.

Cooper Tidmarsh with his parents, Tavis and Kristy, and MEDi. Rich McHugh

Beran said the effects can be felt beyond a single office visit. MEDi seems to relax nurses, which could help reduce burnout, and studies show that children who have more pleasant hospital visits are more likely to seek out routine health care as adults.

But the real benefit can be seen with just one glance.

“There is nothing like watching a child’s face light up, when they get to be with MEDi," she said. "They follow what MEDi says and does, they are transfixed. It’s almost hypnotic. They follow instructions, they are smiling.”

That was the case with 10-year-old Aidan Sousa, who gets regular injections to treat severe asthma at Alberta Children's.

"He comes and does something like tai chi to distract me," Aidan said.

Does it work?

"Yeah, it does," Aidan said with a laugh. "It was a lot more painful than it is now."