Surgeons at Morgan Stanley Children's hospital in New York were able to save the life of a 2-week-old baby thanks to 3D printing.

The child required surgery for its heart, which was full of holes and had a complicated structure, according to The Independent. The surgeons chose a more detailed strategy, which involved using MRI scan data to print a copy of the organ.

Dr. Emile Bacha, who performed the surgery, said that while some babies with CHD have holes in their hearts, the procedure with this child was more complicated because the heart chambers were formed abnormally, "like a maze."

The baby's heart usually has to be stopped in cases such as this one, and doctors would have to open the child's chest up and look inside it to figure out the best way to fix the organ, The International Business Times U.K. reported. The child can't go long without oxygen coming from constant blood flow, so doctors would sometimes have to perform multiple operations and restart the heart after examining it.

3D printing technology made the procedure less complicated for the surgeons and prevented serious medical problems that the child would have experienced without proper treatment of its condition.

"In the past we had to stop the heart and look inside to decide what to do," she added. "With this technique, it was like we had a road map to guide us. We were able to repair the baby's heart with one operation."

The hospital received funding from Connecticut-based foundation Matthew's Hearts of Hope to perform the operation, The Independent reported.

"This is a game changer for CHD babies with complicated heart anatomy," said Marie Thatcher, founder of Matthew's Hearts of Hope. "Normally the first time the surgeon sees the heart is when the chest is open, now they have the ability to plan out the surgery ahead of time while looking at a 3D Heart of the baby or child's heart."

The foundation said it is currently working on another 3D printed heart, and that it will reveal more details about the project within the next month.