(CNN) -- A teenage boy with a failing heart had been denied a chance at a heart transplant. But that decision was reversed this week, turning his family's frustration to joy.
Anthony Stokes has been at Children's Healthcare of Atlanta at Egleston since July 14, according to CNN affiliate WSB-TV. The hospital told his family the 15-year-old was ineligible for a spot on the heart transplant waiting list because of "noncompliance," family friend Mark Bell told CNN.
An August 7 letter from the hospital, which Bell provided to CNN, said that "Anthony is currently not a transplant candidate due to having a history of noncompliance, which is one of our center's contraindications to listing for heart transplant."
Noncompliance generally means that doctors doubt that a patient will take his medicine or go to follow-up appointments.
In a statement Tuesday, Children's Healthcare of Atlanta said, "While there has been misinformation circulating, Children's cannot discuss the specifics of this case or any other case due to privacy rules."
The hospital earlier had said it was working "closely with the family" to find solutions.
Children's Healthcare of Atlanta at Egleston is in good standing, according to the United Network for Organ Sharing, the nonprofit organization in charge of transplant coordination in the United States.
Assessing compliance for potential transplant recipients is important because if a patient doesn't strictly take all required medicines as directed, he or she could die within weeks of leaving the hospital, said Dr. Ryan Davies, a cardiothoracic surgeon at the Alfred I. duPont Hospital for Children in Wilmington, Delaware, who is not involved with this case.
But Bell said a doctor told the family that Anthony's low grades and time spent in juvenile detention factored into that assessment.
"The doctor made the decision that he wasn't a good candidate because of that," Bell said. "I guess he didn't think Anthony was going to be a productive citizen."
Anthony's mother, Melencia Hamilton, told CNN affiliate WGCL-TV that doctors said Anthony would live only three to six months if he didn't get the heart transplant.
In the meantime, the story became public in local media. The Southern Christian Leadership Conference's Georgia chapter got involved because Anthony's family called, and the organization has "a longtime relationship with the child," said the Rev. Samuel Mosteller, the chapter's president,
Mosteller said Anthony was judged based on "tattoos and an ankle bracelet" from a "juvenile agency." Bell said the detention was because Anthony got into "an altercation to protect his younger brother."
On Tuesday, Bell said, a doctor delivered the groundbreaking news to the family: "He said that Anthony has been approved to receive a heart. He put him on the transplant list."
Bell said doctors told Anthony he'll likely receive a new heart in about three to four months, but that this timetable could change.
Anthony had no health problems before this summer, Bell said; the heart problem is not congenital. But he started to have trouble sleeping and then complained about his chest hurting. His mother took him to the hospital because of the chest pains.
Bell said Anthony is excited and his mother overjoyed after the hospital's reversal. The teen is now considered top priority for a heart transplant; he just has to wait for one to become available.
The complexity of transplants
Federal records show that 3,400 people were on waiting lists for heart transplants in 2012, but only 2,000 of these procedures were performed. While waiting for a heart transplant, 331 people died.
Dr. David Weill, medical director of Stanford University's Lung and Heart-Lung Transplant Program, said it's not unusual for patients to be rejected from organ transplant lists because of noncompliance -- in other words, if they are seen as people who won't follow instructions about taking medications and seeing doctors.
At Stanford, Weill's group evaluates about 300 patients per year for lung transplants and turns down about 1% to 2% because of noncompliance. It's about the same for heart transplants as well, he said.
As part of the evaluation process, organ transplant patients undergo a complete psychosocial evaluation so doctors can get a sense of whether they and their families will follow through with a complicated medical regimen, Weill said.
"A few times a year, we run into people who can't," he said.
A patient would not be turned down solely for having served prison time or having bad grades, Weill said, but "we would want to look at the entire picture."
Some patients have been denied because they don't have anyone in their lives who can take care of them and accompany them to appointments. After a heart transplant, patients are too sick to do these things alone, Weill said.
"When we fear that someone's not going to do well, it's because the patient couldn't comply with the regimen or they don't have any support in their life," he said.
Psychosocial factors don't change a person's priority on the waiting list, but they could lead a person to be denied a spot on that list, he said.
The trouble with teens
Arthur Caplan, head of the division of medical ethics at NYU Langone Medical Center, noted that patients have to adhere to a lifelong regimen after receiving an organ transplant -- showing up at medical appointments, taking medications, monitoring changes in health -- and teenagers in general don't have a good track record of following orders.
Teenagers aren't automatically ruled out for heart transplants, but "the consequence that 'you are going to die if you don't take these medicines' is far from the mind of a 17-year-old," said Davies, the cardiothoracic surgeon.
Instead of denying Anthony a spot on the transplant list, Caplan suggested that the boy should be counseled and worked with intensively so he understands what's expected post-transplant -- that is, if the teenager can get a heart.
Bell said the family didn't press the doctor on what led to overturning the decision regarding the transplant list.
Personally, Bell attributes it to "the handiwork of God and the media pressure."
In a video released by a family friend to CNN affiliate WSB before the reversal, Anthony plays chess and looks longingly outside his hospital window.
The hospital did not comment on what led to doctors' change of heart.
CNN's Jacque Wilson and John Bonifield contributed to this report.