For children, the fear and pain of medical treatments can be traumatic. So a number of tech companies have come up with ways to help.
Vaccinations save lives, but many children fear the needle.
So one project in Brazil has turned to virtual reality (VR) as a way of helping kids cope.
The VR Vaccine project involves them wearing a VR headset and watching a 3D animated adventure story involving heroes in coats of armour defending their land against a villain.
The nurse can see the story on a separate screen and the action is synchronised with action of cleansing the skin and applying the injection.
The project was launched by pharmacy chain Hermes Pardini to help with their vaccination campaigns, with local design studios VZLAB and Lobo creating the content.
"What we learned from doing this project is that children mostly fear the needle, more than the pain itself," says Luiz Evandro, director at VZLAB and Lobo.
"So, in theory, if one could take 'the approaching needle away', the fear itself would also disappear. That ended up happening perfectly."
The immersive storytelling alleviated their fears and helped by relaxing the child's muscles, he says, making it much easier for the nurse to administer the shot.
The results of the VR Vaccine project have been so positive that Hermes Pardini has installed the headsets in all 80 of its pharmacies.
Mr Evandro believes VR has the potential to help with a range of other medical scenarios to relieve patients' stress, although initially, its application will be limited by the need to synchronise the story with the medical intervention.
"This solution has a lot to grow in terms of development, not only by incorporating interactivity into it, but also by having the possibility of being customisable to specific users," says Mr Evandro.
"We feel that we've only scratched the surface of what's doable here."
Tech is also helping kids diagnosed with chronic illnesses to express their feelings and cope with their treatments.
For example, US-based Sproutel has developed a robo-duck that lets children undergoing cancer treatment tap a "feeling card" representing a certain emotion against the duck's chest. The duck then expresses that feeling.
"This enables children to communicate their feelings to doctors and caregivers using the duck, which can often be difficult for children as young as three years old," explains Aaron Horowitz, Sproutel co-founder and chief executive.
The duck also has a catheter accessory, enabling children to administer chemotherapy to their ducks. Mr Horowitz says this type of medical play can give children a comforting feeling of control over their medical treatments.
"Preliminary studies have shown that children feel the duck helps reduce their stress level at the hospital," says Mr Horowitz.
"The average length of cancer treatment for a child is 1,000 days - this is incredibly scary. Supporting children and families through this difficult time is critical."
So far, Sproutel has had orders for 600 of the $200 ducks from 37 hospitals in US, it says. Insurance company Aflac is covering the cost of a duck for every child cancer patient who requests one.
Robots are also making their way into children's hospital wards.
Canada's RXRobots, for example, has spent years developing its MEDi humanoid robot, designed to establish a relationship with a child and teach cognitive-behavioural coping strategies through games and conversations.
Say a child is anxious about undergoing a treatment, MEDi will say he is familiar with the medical procedure and play a game involving deep breathing exercises. Through play, the child relaxes and stops focusing on the procedure.
MEDi is also used for therapeutic play, whereby children can perform procedures on him. While doing so, MEDi makes comments such as "you're taking good care of me". This teaches the child that healthcare professionals are also trying to help, even when performing sometimes painful medical procedures.
RXRobots founder Dr Tanya Beran claims the robot can help reduce children's pain during medical procedures by 50%, based on reports from children, their parents and nurses.
Jackie Pearson, child life specialist for the MEDi project at Alberta Children's Hospital says: "With MEDi's guidance I have seen children calmly comply with medical procedures that can be quite distressing.
"I have noticed that it helps to relax both children and the adults who care for them."
Dr Beran believes interaction with MEDi could not only help children undergoing treatments, but shape their attitudes towards healthcare throughout the rest of their lives.
"MEDi is transforming healthcare by helping children develop an alternate experience in hospitals and dental offices," she says.
But the robot is not perfect yet.
Ms Pearson says the internet connection can sometimes drop, making the robot unresponsive, and occasionally there are delays before it answers.
And at $15,000, it isn't cheap. Alberta Children's Hospital has four of them.
"But some of the interactions have been absolutely incredible," she says. "I have seen hundreds of the best smiles ever!"