Perrone got the idea from Andrew Herring, an emergency medicine doctor at Highland Hospital in Oakland, Calif. He’s been doing it for a year, and is now training seven more California hospitals.

“I encourage everyone to ask, ‘What’s your best experience with sober living?’” Perrone said. “Most people have strong opinions: I did O.K. on methadone for a month. Some people say I’ve bought Subs on the street and I’d be willing to do that.”

So far, her hospital’s emergency room has treated very few patients. “Most people say they’re just not ready,” said Perrone. “We see overdoses. Those are the patients least ready — an hour ago they were going to try to get as high as they could get. And 10 percent will be dead in a year.

“Other patients come in because they’re sick — a heart valve infection or abscess. They need withdrawal treatment or they’re going to leave in the middle of their hospitalizations.” Fear of withdrawal is also a major reason that drug users don’t want to go to a hospital to begin with.

“The third group is: ‘I’m fed up. Somebody stole my shoes. I can’t do it any more. I’m so sick and so tired. I need treatment right now.’ I always felt so terrible handing them that piece of paper.”

Gail D’Onofrio, a pioneer of the practice who leads the department of emergency medicine at Yale, published a study in 2015 showing that starting patients on Suboxone in the emergency room works: 78 percent were still in treatment a month later, twice as many as those who got only referrals to treatment. She said hospitals in fewer than 10 cities offer Suboxone in the emergency room. (In Philadelphia, only a few do). “But way more are in process,” she said, adding that she gets calls from new places every week.

A follow-up study showed that the gains were holding at two months, but not at six months or a year. Nevertheless, Jeffrey Hom, a policy adviser to Philadelphia’s public health department, said the program was still valuable. “For many people this is a chronic disease,” he said. “Relapses happen. You may have tried Suboxone and had some success and it may not be sustained, but you may come back to it at a later date.