It's known by doctors as the "Babyboy, Babygirl" problem.

For the millions of babies born in the United States to parents who are still agonizing over the names or who are so fragile need there's no time to for the paperwork of names before they are rushed to neonatal intensive care, hospitals assign them a placeholder name according to a standard convention.

By tradition, the babies are known by the word "Baby" followed by their gender and the mother's last name. A girl born to a Wendy Jackson, for instance, would be known as BabygirlJackson. A girl to Brenda Johnson, BabygirlJohnson.

The problem, which has been documented for years, is that the names often look so similar to hurried caregivers that medications, blankets, clothes, even pumped breast milk can get mixed up.

"The potential medical error that can occur when physicians or other health care professionals confuse one patient for another can be quite serious, even deadly," said Clay Jones, a pediatrician at Newton-Wellesley Hospital in Massachusetts told Health Day News. "Imagine giving a medication meant for one patient to another patient with a life-threatening allergy to it."

Sometimes babies are even given to the wrong parents but most mistakes are corrected in the hospital.

“You only hear about errors when they’re devastating, near misses,” Jason Adelman, patient safety officer at Montefiore Health System in New York, told Time.

"Use of Temporary Names for Newborns and Associated Risks," Pediatrics, July 2015

Hospital systems have spent millions trying to figure out ways to minimize the confusion using high-tech ID bracelets, staff training and software that can warn users of potential mixups with patients. But Adelman and his colleagues wondered if there was a more simple solution -- by tweaking the way temporary names are given.

They proposed substituting the mothers' first name for the word Baby in the placeholder name so BabygirlJackson would become Wendygirl Jackson.

The hospital system tested the new names for one year on more than 1,000 babies who were treated in its neonatal intensive care unit and reported in the journal Pediatrics on Monday that the wrong-patient errors were reduced by almost 40 percent. "Our findings suggest that the use of nondistinct, temporary first names for newborns is hazardous and that replacing a nondistinct, temporary naming convention with one that is more distinct may significantly reduce wrong-patient errors in the NICU," they wrote.

Read more:

Should you take painkillers? FDA bolsters safety labels for NSAIDs, warns of heart attack and stroke risk

CDC researchers find link between Prozac, Paxil use and birth defects

Study of 1,000 38-year-olds shows ‘biological age’ ranges from 30 to 60

Harvard researchers tested 23 online symptom checkers. Most got failing grades. Here’s how they stack up