Philadelphia's drug treatment data reveals a disturbing discrepancy in taxpayer-funded resources: As heroin overdoses soared to shocking rates in recent years, the city's capacity to treat opioid addicts was cut in half because so many people were being treated for marijuana.

From 2011 to 2015, more than 20 percent of admissions to city drug treatment programs were for marijuana, according to data compiled by the city's Department of Behavioral Health and Intellectual disAbility.  Some years, more people were treated for weed than for heroin.

The report, which surveyed the city's treatment for uninsured and under-insured residents, was prepared for the National Drug Early Warning System of the National Institute on Drug Abuse (NIDA).

In 2014, Philadelphia spent $28 million dollars for 8,363 treatment admissions, under the Single County Authority funding system. Four substances made up the majority: Alcohol (2,476), Marijuana (1,844), Heroin (1,764) and Cocaine (1,081).

Prescription opiates only accounted for only 311 admissions that year, and methamphetamine just 15. The same ratios continued in 2015.

National data from the Substance Abuse and Mental Health Services Administration (SAMHSA) shows that 6 in 10 people in treatment for marijuana were forced to be there, mainly by probation and parole. These admissions were not generated from weed arrests per se, but offenders from all arrests who then failed urine tests for THC.

In Pennsylvania, the Department of Drug and Alcohol Programs' annual report for 2015 showed that "criminal justice" accounted for 30.6 percent of all drug treatment admissions statewide -- it's the largest referral source to both publicly-funded and private facilities.

This problem is not isolated to Philadelphia. The NIDA reports found the same trend exists in Atlanta, Chicago, New York, Los Angeles, and 10 other sites.

Even full legalization of cannabis has not fixed this burden on treatment resources. Denver saw more variety in the drug users being treated (about 2,000 annually were treated for meth), but cannabis still took up 18 to 20 percent of admissions during those years.

Medical marijuana has been legal in Colorado for 17 years, and in 2015 Gov. John Hickenlooper signed a law giving registered medical cannabis patients a pass on THC tests if they end up on probation. Recreational marijuana consumers in Colorado have no similar protection and face court-mandated drug treatment if they fail a urine test.

Metabolites called THC-COOH remain in the human body for 30 to 45 days after smoking or eating marijuana, long after the hours of intoxicating effects wear off. These leftover molecules are what trigger positive urine tests for cannabis.

It's not just parole and probation violations generating these marijuana treatment referrals.  In the course of cutting a plea deal, prosecutors often require defendants to enter into treatment in order to avoid more serious criminal charges. In some cases, defense attorneys can even bond clients out of jail on the condition that they are going directly into treatment. Family courts and juvenile divisions also refer thousands to treatment.

The steady stream of Americans forced into drug treatment over failed THC tests has been happening for decades. The courts have been a reliable, annual boon to the industry of treatment centers, hospital networks, addiction counselors, and health insurance providers.

When residents do have health insurance or Medicare, they are forced to use it for mandated treatment, often incurring the expense of deductibles and co-pay fees. Thus, even beyond publicly-funded treatment resources, taxpayers are being invoiced for potentially hundreds of thousands of cannabis admissions every year.

Politicians get a piece of the pie too. Mary Pat Angelini, a Republican and close ally of Gov. Chris Christie, used her position in the New Jersey Legislature to steer millions to a nonprofit corporation called Prevention First. The company facilitates treatment resources and ran on nearly $2 million a year in federal, state, and county grants. In other words, all taxpayer money.

Angelini collected an annual salary of $91,526 from Prevention First, almost double her salary as an elected member of the NJ Assembly. A complaint was filed in 2013 to the Legislature's Joint Committee for Ethical Standards about Angelini's side business, but she was not found at fault because, well, New Jersey.

These reports from the National Drug Early Warning System should receive much greater scrutiny from elected officials.

A solution should be found to immediately stop or divert these marijuana court referrals from taking up our deeply needed treatment resources. It's an easy fix that could double our capacity for heroin and opiates, almost overnight, without spending one additional tax dollar.