Updated

An Iowa couple who welcomed their first baby in July had been preparing to say goodbye to him since about halfway through their pregnancy after doctors diagnosed the unborn child with a terminal brain malformation. However, hours after Drew and Ariann Corpstein’s son was born, they learned that he had been misdiagnosed, and that his condition could be managed.

The Corpsteins, who suffered a miscarriage in 2016 before learning that they were pregnant with their son Matthew James, were told at 23 weeks gestation that their son had malformed brain tissue, the Des Moines Register reported. The couple, who are Christian, were told that the baby’s brain had not fully formed and that they could either abort the pregnancy, or induce early labor to terminate.

“During our 20-week ultrasound, which led to several others and a MRI quickly following, the doctors discovered our baby was missing most of his/her brain,” the Corpstein’s wrote on their GoFundMe page. “And instead of a brain, it was replaced with cerebral spinal fluid. The fluid was going to continue to expand the head of our baby. The head size was measuring about 3 weeks ahead of normal. We were told our baby wouldn’t live past several days, if not hours, or die before birth.”

GIRL, 2, LEFT PARTIALLY PARALYZED AFTER FREAK ACCIDENT WITH DRINKING GLASS

The Corpsteins said that after the diagnosis, they began preparing to bury their child.

“We knew that our baby was probably not going to be born alive,” Ariann Corpstein told the news outlet. “Whatever happens, it’s in God’s hands.”

The couple spent the latter half of their pregnancy celebrating milestones with their baby, including motorcycle rides and a trip to Costa Rica. Ariann Corpstein was induced at 37 weeks gestation and spent three days in labor before delivering their son on July 29.

“After he was born, he was able to latch and nurse right away. He responded to lights, voices and touch,” the GoFundMe page post said. “These were things that he supposedly wouldn’t do.”

The couple decided to risk what could have been limited time with their son in order for doctors to conduct another MRI, which is when they discovered that their son, who they call their miracle, had been misdiagnosed.

The couple was then told their son was born with hydrocephalus, which causes extra fluid on the brain, but that his brain tissue had developed. They were then told he needed emergency surgery to insert a shunt in his brain in order to drain the excess fluid.

“When you’re using imaging technology, like an MRI, on a baby that’s inside the mom’s uterus, you’re looking at something that’s very small and very far away,” Dr. Jona Conklin, a perinatologist who worked with the Corpsteins, told the Des Moines Register. “If you’re trying to look for a heart defect, for example, you’re looking for something that’s about the size of a quarter or half-dollar through all the tissue that’s part of the mom’s body and fetus’ body.”

The Corpstein’s were told that their son’s condition could be addressed with a shunt, and that he “had every chance at a normal life.”

“The baby still has a long road ahead,” Conklin told the news outlet. “There is a whole gamut of possible neurological impacts, including autism, learning disabilities and other pretty severe neurological disorders.”

The Corpstein’s were sent home Aug. 4 with their son, who they call "Matthew the Great," but were readmitted on Aug. 19 after he developed meningitis. Drew told the news outlet that Matthew is improving but will need a new shunt before they are sent home.

They also shared on Facebook that they learned Ariann has an inability to absorb B12 and folate properly, as well as a gene mutation that may lead to malformations such as tongue tie, cleft lip and other issues, including those that can lead to hydrocephalus.