Jeran Dunmire was jailed for two days in July for following doctor’s orders.

Not long before, his doctor had written him a prescription for medical marijuana. The physician thought the drug could help wean Dunmire from his long-running opioid addiction, a use approved by the state Department of Health.

But then Dunmire, 38, ran head-on into the edict of Jefferson County Judge John H. Foradora, the president judge there and, in fact, the only judge in the rural county 80 miles northeast of Pittsburgh.

Dunmire, who has battled opioid addiction for decades, had enrolled in the county’s drug court program. But Foradora, in seeming defiance of the state’s medical marijuana law and a recent state Supreme Court ruling, decreed that people such as Dunmire arrested on narcotics charges could not take part unless they turned in their medical marijuana cards. When Dunmire refused, he was locked up.

While it’s unclear how many defendants statewide have been similarly snagged, advocates of Pennsylvania’s medical marijuana program law say they have fielded a steady stream of complaints about the issue since the limited legalization took effect two years ago. Dunmire’s outright jailing appears rare, but the advocates say judges in several counties are requiring defendants to eschew medical marijuana or face prison.

Among those with this hard-line policy are the drug courts in Bucks and Delaware Counties, while in Chester and Montgomery Counties, judges decide on a defendant-by-defendant basis.

Philadelphia imposes no restrictions on medical marijuana patients who want to participate in diversionary programs such as drug court, according to a spokesperson for District Attorney Larry Krasner.

Jefferson County resident Dunmire hadn’t obtained his card until the state Supreme Court noted in a unanimous decision in June that the marijuana law said no one could face “prosecution or penalty in any manner, or denied any right or privilege … solely for lawful use of medical marijuana.”

The opinion, written by Chief Justice Thomas Saylor in a case involving rural Lebanon County, reported that as many as 60 men and women in that county were facing a possible choice between jail or giving up their cards.

» READ MORE: How can I get medical marijuana in Pennsylvania during the coronavirus pandemic?

Judge Foradora declined to comment for this article. John M. Ingros, the public defender for Jefferson County, and the county district attorney, Jeff Burkett, didn’t return multiple calls.

The county court did say that no one with a marijuana medical card could take part in its drug court program.

Chris Konzel serves as the county’s regional drug court coordinator. Konzel, a former public defender and district attorney, said she doesn’t believe that the Supreme Court opinion applied to defendants in diversionary programs. Konzel said drug court was “a privilege.”

“The whole purpose of drug court is to get you off of drugs,” Konzel said. “We’re not telling these people not to get marijuana cards, but you can’t use marijuana if you want to be in the drug court program. It’s self-defeating.

“In our drug court, we’ve said you can use marijuana if you want. But you’ll go back to the judge for sentencing and take your lumps.”

» READ MORE: In Philadelphia, you can use marijuana without risking jail — unless you’re on probation

The American Civil Liberties Union said it is talking with several defendants who the ACLU says were coerced into surrendering their state-issued marijuana cards. It has yet to decide whether to bring a lawsuit.

“Based on the statute and the Pennsylvania Supreme Court opinion, forcing patients to abstain from medical marijuana seems to violate the act on its face,” said Sara J. Rose, the lawyer in the ACLU’s Pittsburgh office who won the high court case. "The statute says you can’t make them choose.”

An expert on Pennsylvania constitutional law agreed.

Bruce Ledewitz, codirector of the Duquesne University School of Law’s Pennsylvania Constitution website, noted that the state high court had invoked its rarely used “King’s Bench” power to more quickly take command of the suit that led to its June ruling.

“That means they went out of their way to take it,” Ledewitz said in an interview. "And what they decided was you can’t have a blanket rule against the use of medical marijuana.

“So drug courts generally say ‘no drugs,’ but under the Supreme Court opinion they can’t. I think [the Supreme Court] tied the hands of drug courts. It’s just enforcing the legislature’s will."

‘Stick to antidepressants’

South of Scranton, in Lackawanna County, another holder of a marijuana card said a judge brushed him aside when he cited both the marijuana act and the Supreme Court ruling.

In a recent interview, Edward Cherundolo, 43, said he wanted to enroll in that county’s drug court to avoid prison after he was arrested following a car accident. He blamed the crash on Xanax he took to treat anxiety.

In June, his doctor recommended he try medical marijuana “as a healthier alternative” to Xanax. Marijuana is also approved by the Department of Health to treat anxiety.

But Cherundolo, too, was ordered by a judge to give up his state-issued marijuana card.

"Who gave you permission to use the card?” Cherundolo said the judge demanded.

When Cherundolo replied, “State law and the Supreme Court,” Cherundolo recounted, the judge threatened to resentence him and throw him back in jail. “I was using capsules," he added. "It’s not like I was smoking joints.”

The judge told him to stick to antidepressants.

“The thing that baffles me is that they’re caseworkers and judges. Not doctors," Cherundolo said. " I don’t want to take antidepressants, I’m not depressed.”

» READ MORE: Large majority favors New Jersey marijuana legalization, according to poll

Cherundolo, a construction worker who moonlights as a cook, surrendered his card.

“I get panic attacks now,” Cherundolo said. “I have to choose between jail and my health right now. I have no option but to comply.”

As for Dunmire, who lives in Punxsutawney, the most famous town in Jefferson County, he, too, gave up his card as he makes another run at shaking off his decades-long addiction to opioids.

His run-ins with the law have been as repetitive as the movie Groundhog Day. Time and again, Dunmire has been arrested on drug-related charges. He’s walked away from halfway houses. His urine has tested positive for illegal substances many times.

Dunmire is now trying to get straight without the aid of marijuana. He says he was determined to prevent a relapse so that he could keep custody of his 2-year-old daughter.

“I’m not back on opioids. When I’m not applying for work, I’m pretty much staying at home," he said. “I work out. I watch my kid. When I’m having a bad day, my brain says smoke some pot. But I resist. I’m afraid of going back to jail.”