(CNN) Codeine prescriptions for children who have had their tonsils and adenoids removed have decreased since the Food and Drug Administration began requiring a black box warning on the products four years ago, according to a new report from the American Academy of Pediatrics. However, some children continue to be prescribed codeine, and other opioid prescriptions for children have continued to rise since then.

Between 2010 and 2015, doctors collected data on more than 350,000 privately insured children up to 18 years old who had undergone those surgical procedures. They monitored the children's prescriptions for codeine and alternative opioids.

Codeine, an opioid pain reliever, came under scrutiny due to its adverse effects on children. According to the FDA , it led to serious breathing troubles, including 24 deaths, in children from January 1969 to May 2015.

In August 2012, the FDA launched an investigation into the safety of codeine use in children. Afterward, in 2013, it announced a requirement for a black box warning to be added to packaging to call attention to these risks.

"A decreasing number of children were receiving codeine even before the FDA investigation, but once that investigation was over, there was a huge drop," said Dr. Kao-Ping Chua, the lead author of the new study. "That's kind of what we expect. An FDA black box warning should actually decrease inappropriate codeine prescribing."

However, toward the end of the study in December 2015, one in 20 children was still being prescribed codeine, the researchers found.

"Five percent may not sound like a huge number, but you have to remember that the tonsillectomy and adenoid removal is the second most common surgery in children," said Chua, assistant professor of pediatrics and communicable diseases at the University of Michigan and C.S. Mott Children's Hospital.

Why codeine is dangerous for kids

Codeine itself has no effect on pain, Chua explained. It is converted to morphine by a liver enzyme, and the speed of this conversion varies from person to person.

"Approximately 1-2% of people are 'ultra-metabolizers' who convert codeine to morphine extremely quickly, causing a rapid spike in blood morphine levels and a resulting risk of overdose," he added.

"Of course, no one can tell who is and who is not an ultra-metabolizer without doing expensive testing that may not come back fast enough to inform decisions about how to manage pain."

He says that prescribing codeine to children after these surgeries is a roll of the dice, because it's not known whether that a particular child is an ultra-metabolizer with a high risk of overdose.

"This is an unacceptable gamble given that there are better alternatives," he added.

Dr. Kris Jatana, a pediatric otolaryngologist at Nationwide Children's Hospital in Columbus, Ohio, believes that the study is underestimating the current codeine prescription rates for children.

"I think it's been nearly two years since the end point of the study that was captured, and I think the prescribing patterns may have even changed further in the last two years to show that there is further decrease in the use of Tylenol and codeine in this patient population," he said.

According to the study, hydrocodone and oxycodone prescriptions for children went up in the months after the FDA's black box warning requirement.

"There has been a shift away from the codeine prescriptions because of the black box warning. But the alternative and sometimes even more potent 'narcotic prescription' of oxycodone and some others are still actually being prescribed," said Dr. Wendy Sue Swanson, a pediatrician based in Seattle.

Chua agrees. "Some of the alternative strategies of managing pain are not perfect, because oxycodone and hydrocodone themselves have some safety concerns," he said.

"I think the sample was pretty large, and at the end of the day, we cannot say if these findings are also true for children covered by Medicaid or the CHIP program because we were studying the commercially insured population," he added.

Safer alternatives

Jatana said Nationwide Children's Hospital has done a lot of quality improvement work related to decreasing opioid prescriptions as well as decreasing the number of doses prescribed.

"Through our intervention at our own hospital, where we do about 4,000 of these procedures a year, we have been able to prescribe opioids to less than one-third of the patients, where primarily we were (previously) prescribing opioids to about 85% of the patients," he said.

"We primarily use Tylenol and ibuprofen as sort of first-line medications to alternate for pain control for mild to moderate pain. We reserve the use of an opioid for only those patients who have severe pain," he added.

Doctors at Nationwide Children's Hospital give prescriptions only for patients who require opioid pain medicine in the hospital, as opposed to everybody, he said. If the child doesn't require the medicine in the hospital, he or she is unlikely to need it at home.

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

"But if they ever have severe pain, we basically send a prescription 24 hours a day to their pharmacy if they need that prescription. We typically will prescribe hydrocodone. We do not prescribe Tylenol with codeine," he said.

The study's take-home message is that there are safer and more effective alternatives to codeine to control pain after tonsillectomy and adenoidectomy, Chua said.

"Tylenol or ibuprofen both over-the-counter agents that have been shown to be very effective in treating post-surgical pain, and they don't have the same sort of safety concerns as codeine," he said.

Parents should always ask, at any place after surgery or after any procedure, how to control their child's pain best with over-the-counter medicine, Swanson advised.

"They should review that and write down those doses with the clinician before they leave the hospital or before they leave the clinic every time so they really understand what dose and how often," she said.