After Holly Platts overdosed on heroin in July and was revived at the hospital with the reversal drug naloxone, she went to a rehabilitation program and stayed for 78 days. Today, the 28-year-old Philadelphia woman says she is drug-free and grateful.

"I don't think if I hadn't had that 21/2 [months] - I don't think I would have stuck around," Platts said.

She could afford that lifesaving therapy because of Medicaid, the insurance program for the poor run jointly by the states and the federal government. And she was one of the lucky ones, as many Medicaid recipients have trouble finding therapy beds.

Even as the opioid epidemic rages, that shortage could become worse next year, unless advocates can beat back a plan to limit federal matching funds for Medicaid drug rehab to 15 days a month. The limit would apply to all facilities with more than 16 beds.

The situation is particularly worrisome in Pennsylvania because of how the state has been financing rehab under Medicaid. The program is run jointly by the states and the federal government, and varies somewhat among states. For instance, the regulation change will not affect New Jersey because it has never received federal Medicaid matching dollars for residential rehabs larger than 16 beds, a spokeswoman for the state's department of health services said.

The Pennsylvania House and the Philadelphia and Pittsburgh City Councils all have recently passed resolutions urging President Obama and the Centers for Medicare and Medicaid Services (CMS) to stop the proposed limit on inpatient addiction treatment. U.S. senators, including Pennsylvania Democrat Bob Casey, wrote CMS in August stating that the policy "appears to be discriminatory" to those with substance-abuse disorders.

"This is a national call to action here to stop this from going through," said Rep. Gene DiGirolamo (R., Bucks).

"How are we going to replace these federal dollars?" asked Deb Beck, president of the Drug and Alcohol Service Providers Organization of Pennsylvania. "What are we going to do? We're in the middle of a drug epidemic."

"This is insane," said Gary Tennis, secretary of the state Department of Drug and Alcohol Programs. "I don't think it was intentionally designed to kill, but it might."

Sarah Galbally, Gov. Wolf's secretary of policy and planning, said the state was negotiating with CMS to solve the problem. "No one will be kicked out of treatment," she said, vowing that the state would pick up the tab if necessary after Jan. 1 - though how big that tab might be wasn't immediately clear.

More than 47,000 Americans died in 2014 from drug overdoses, compared with nearly 17,000 in 1999, statistics from the Centers for Disease Control and Prevention show. The increase was driven almost entirely by opioids: prescription painkillers and heroin. It's an epidemic that has cut across racial and income lines; approximately 12 percent of Medicaid beneficiaries age 18 to 64 have a substance-abuse disorder, according to CMS.

The root of the current controversy is an obscure part of the 1965 law that created Medicaid. Known as the Institutions for Mental Diseases (IMD) exclusion, it was originally intended to cut down on the number of people committed long term to mental hospitals. The change taking effect next year would close a loophole in that exclusion that Pennsylvania had been using to fund rehab beds beyond 15 days a month in facilities larger than 16 beds.

The change would affect rehab partly because substance abuse is included in Medicaid's definition of "mental diseases."

Limiting treatment to 15 days is a huge problem because "the brain chemistry gets altered so severely with opioids," said Michael Donahue, director of the human services division of Luzerne County. "It takes at least a 30-day period just to stabilize someone physically and to begin to stabilize them mentally and emotionally."

Furthermore, because it's so expensive to run addiction treatment centers, the 16-bed cutoff would make it impossible for many facilities to stay in business, Donahue said.

Carol Rostucher's son is a recovering heroin addict. She founded Angels in Motion, handing out "Blessing Bags" full of toiletries and food to drug users in Kensington.

She says her son might have died had he left treatment after only 15 days, rather than the 50 he spent in an inpatient facility. She worries that changing the rules will increase overdoses. "Isn't there enough already?" Rostucher asked.

Tennis says it's time drug abuse is treated just like any other serious illness.

"We don't say if you have a heart disease patient, after 15 days you've got to put them in a wheelchair and roll them out into the street," Tennis said.

He and other state authorities note that the new rules go against the 2008 Mental Health Parity and Addiction Equity Act, which requires insurers to treat mental illness and addiction like other diseases.

CMS did not make anyone available for an interview, but an agency spokeswoman referred to its website, which describes how states can apply for waivers, essentially exceptions to the rules, in order to get payment for drug treatment.

Beck and Donahue said that process is so cumbersome it wouldn't be practical.

But Gabrielle de la Gueronniere, policy director for the Legal Action Center in New York, a nonprofit that focuses in part on national addiction policies, said her group welcomes the new rules as "steps that will improve access to care around the country" by allowing states to seek waivers to fund demonstration projects, for instance.

Tennis isn't buying it.

"Since when do we apply for waivers to do open heart surgery?" Tennis asked. "Why are we setting up all these obstacles to an accepted standard of care? The bureaucrats should get out of the way and let the clinicians do their work."