For the first fifty-five years of Medicare, a methadone clinic could not bill the program a single dollar—the medication most proven to keep people with opioid use disorder alive was, for the older adults and disabled people Medicare covers, simply not a covered benefit. That changed on January 1, 2020, when a Part B benefit created by the SUPPORT Act took effect and Medicare began paying opioid treatment programs for the first time. CMS keeps the enrollment record of the clinics that signed up: roughly 1,300 Medicare-enrolled opioid treatment programs, one row per program, each keyed to a CMS Certification Number—the administrative map of a treatment door that, for this population, only opened a few years ago.
This article covers what the opioid treatment program (OTP) enrollment data is and how it differs from the patient and outcome data people associate with addiction treatment; the SUPPORT for Patients and Communities Act of 2018 and the Part B bundled benefit it created, effective January 2020, that made this file possible at all; the dense regulatory frame that governs OTPs—the 42 CFR Part 8 certification regime, the role of the Substance Abuse and Mental Health Services Administration, the independent accreditation requirement, and the DEA registration that controls the methadone itself; the three medications for opioid use disorder the data sits behind; the schema and the CMS Certification Number that anchors it; how the file joins to ownership and provider-enrollment data and, conceptually, to the DEA distribution record on the supply side; a Python workflow that pulls the enrollments, tallies OTPs by state, and maps treatment capacity against population and need; and the caveats—enrollment is not capacity, Medicare is one payer of many, and an enrolled program is not necessarily an open one—that every analyst must internalize before drawing conclusions.
What the dataset is
CMS enrolls providers before it pays them. Every entity that bills Medicare—a hospital, a physician group, a clinic—must first complete the Provider Enrollment, Chain, and Ownership System (PECOS) process, supplying its legal identity, its location, its ownership, and its provider type, and receiving in return the identifiers that let it submit claims. The opioid treatment program enrollment file is the public extract of that record for one specific provider type: not who was treated, not how anyone fared, but the administrative fact of which OTPs are enrolled to bill Medicare, where they sit, and under what enrollment status. An opioid treatment program is the clinic—historically and colloquially the “methadone clinic”—that is certified to dispense methadone and other medications for opioid use disorder under federal supervision.
That makes this a supply-side dataset. It answers the question “where can a Medicare beneficiary get medication treatment for opioid use disorder?” rather than “how many people are in treatment?” or “is the treatment working?” In our database it is stored as the table cms_opioid_treatment, with the grain of one row per enrolled program and roughly 1,300 rows. Because enrollment is the front door to Medicare billing, the file is the cleanest available census of the OTPs participating in Medicare specifically: a program that is not in it is, by definition, not billing Medicare under the OTP benefit, whatever else it may do for Medicaid, private, or cash-pay patients. The columns capture the program's identity, its location, and its enrollment status:
ccn -- CMS Certification Number (the stable program key)
enrollment_id -- PECOS enrollment identifier for the program
npi -- National Provider Identifier for the OTP
provider_type -- opioid treatment program designation
organization_name -- the program's legal / doing-business-as name
address, city -- physical street location of the program
state -- two-letter state / territory code
zip_code -- ZIP of the program location
enrollment_state -- enrollment status (e.g. approved / active)
incorporation_date -- date the organization was incorporated
proprietary_nonprofit -- ownership character flag where reported
effective_date -- Medicare enrollment effective dateThe ccn is the load-bearing column. The CMS Certification Number—historically the Medicare Provider Number—is the persistent identifier CMS assigns to a certified institutional provider, and for an OTP it is the key that ties the enrollment record to the rest of the CMS ecosystem. The enrollment_id is the PECOS-side identifier that joins the program to the provider-enrollment and ownership files, where the same entity's owners and managing parties are disclosed, and the npi is the National Provider Identifier under which it bills. The enrollment status distinguishes a program that can currently bill from one whose enrollment has been deactivated or revoked—the difference between counting paper enrollments and counting the operating treatment network. The location columns (state, zip_code, address) are what make the file a map; joined to population, geography, and overdose data, they convert an administrative list into a picture of where Medicare-accessible addiction treatment exists and where it does not.
The SUPPORT Act and the benefit that created this file
The single fact that explains why this dataset exists—and why it is recent—is that Medicare did not cover opioid treatment program services at all until a few years ago. Methadone for the treatment of opioid use disorder can, by law, only be dispensed through a certified OTP, and for decades Medicare had no payment pathway to those programs. A Medicare beneficiary with opioid use disorder—an older adult, or one of the many people who qualify for Medicare through disability— could be prescribed buprenorphine in an office setting, but the comprehensive, daily-dispensing methadone model that OTPs provide was outside the program's benefit structure entirely. As the overdose crisis deepened, that gap became indefensible.
The Substance Use-Disorder Prevention that Promotes Opioid Recovery and Treatment (SUPPORT) for Patients and Communities Act, enacted in 2018 as a sweeping bipartisan response to the epidemic, closed it. Among its many provisions, the SUPPORT Act directed CMS to create a new Medicare Part B benefit for opioid use disorder treatment services furnished by opioid treatment programs, structured as a bundled payment: rather than itemizing each component, Medicare pays an OTP a bundled rate covering the medication, the dispensing and administration, and the substance-use counseling and toxicology testing that wrap around it. The benefit took effect on January 1, 2020. That effective date is why this enrollment file maps a specifically post-2020 phenomenon: it is the record of the OTPs that enrolled to participate once Medicare opened the door, and its growth over time traces the expansion of Medicare access to medication treatment for opioid use disorder among older adults and people with disabilities—a population that the overdose crisis reached later in the public conversation but that the data shows was reached all the same.
The bundled structure is worth dwelling on because it shapes what an enrollment in this file represents. An enrolled OTP is committing to furnish, and bill Medicare for, the full episode of medication treatment—not a one-off prescription but the ongoing, structured program of dispensing plus counseling that the OTP model is built around. The benefit also arrived alongside a broader policy push toward medication for opioid use disorder (MOUD) as the standard of care, displacing an older, more abstinence-only orientation, and toward reducing the access barriers—including the daily in-person dispensing requirement that the COVID-19 public health emergency forced programs to relax through expanded take-home doses and telehealth counseling. The enrollment file does not capture those clinical and regulatory shifts directly, but it is the administrative substrate on which they played out: every program in it is a site where the post-2020 Medicare-OTP relationship is actually being conducted.
The 42 CFR Part 8 regulatory frame
Opioid treatment programs are among the most heavily regulated providers in American healthcare, and understanding that regulatory frame is essential to reading the file, because every entry in it has already passed through several federal gates. The governing rule is 42 CFR Part 8, the federal regulation that sets the standards for the certification and operation of OTPs. Under Part 8, a program cannot lawfully dispense methadone or other approved medications for opioid use disorder unless it is certified by the federal government, independently accredited, and registered to handle the controlled substances—three separate authorities that must all be in place at once.
The first gate is SAMHSA certification. The Substance Abuse and Mental Health Services Administration (SAMHSA), through its Center for Substance Abuse Treatment, is the federal agency that certifies OTPs under Part 8. SAMHSA certification is the determination that a program meets the federal standards for treating opioid use disorder with the approved medications, and it is the predicate without which none of the rest follows. The second gate is accreditation: Part 8 requires that an OTP be accredited by a SAMHSA-approved independent accrediting body—organizations such as the Commission on Accreditation of Rehabilitation Facilities or The Joint Commission—which conducts on-site surveys against detailed treatment and operational standards. Accreditation is the quality-assurance layer; certification rests on it. The third gate is the DEA registration: because methadone is a Schedule II controlled substance, the program must be registered with the Drug Enforcement Administration to order, store, and dispense it, and is subject to the DEA's controlled-substance security and recordkeeping requirements. A Medicare-enrolled OTP, then, is an entity that has cleared SAMHSA certification, an accreditation survey, DEA registration, and the relevant state authority—and then, on top of all of that, the CMS Medicare enrollment that this file records. The enrollment is the last gate, not the first, which is part of why the file's roughly 1,300 entries are a meaningful, vetted population rather than a casual list.
The three medications behind the data
Behind the administrative record sits the clinical substance of what these programs do: dispense the medications that are the most effective treatment for opioid use disorder. There are three approved medications, and the differences among them explain both the OTP model's structure and why access to it matters so much.
Methadone is the medication that defines the OTP. A long-acting full opioid agonist, it suppresses withdrawal and craving without producing the cyclic highs and lows of illicit opioid use, and decades of evidence link methadone maintenance to large reductions in overdose death, illicit use, and the transmission of infectious disease. But because methadone is itself a potent opioid, federal law confines its dispensing for addiction treatment to certified OTPs operating under the daily-observed, structured regime that Part 8 specifies—which is precisely why the OTP as an institution exists and why this file maps something that cannot be obtained at an ordinary pharmacy. Buprenorphine, a partial agonist with a ceiling on its opioid effects and a correspondingly lower overdose risk, can be prescribed both within OTPs and, increasingly, in office-based settings, and federal policy has moved to expand the clinicians who may prescribe it. Naltrexone, an opioid antagonist that blocks the effect of opioids rather than substituting for them, is a third option, often used after detoxification. OTPs are the settings built around the most tightly controlled of these—methadone—which is what makes the geography of OTP access a distinct and consequential question: in a county with no OTP, methadone maintenance is simply not available to a Medicare beneficiary, however many pharmacies it has.
The schema and the CMS Certification Number
The fields above are best understood through the identifiers that make the file joinable. The CMS Certification Number (CCN) is the spine. For an institutional provider like an OTP, the CCN is a structured identifier whose embedded digits historically encode the state and the provider category, so the number itself carries information about the program's type and certification path. Because the CCN is the same identifier CMS uses across certification, survey, and provider records, it is the key that lets an analyst follow a program from this enrollment snapshot into the deeper CMS records, and it is the stable join key for tracking a program across successive releases of the file.
The enrollment ID is the second key, and it points the other direction—toward PECOS. It is the identifier under which the program's enrollment application and its disclosed ownership live, and it is the join key to the provider-enrollment and all-owners files. The NPI is the billing identifier that ties the program to the claims and clinician records that share the National Provider Identifier system. The enrollment status field records where the program stands in its lifecycle—approved and active, versus deactivated or revoked—which is the difference between a program that can currently bill Medicare and one that has dropped out, and therefore the difference between counting enrollments and counting the operating network. The organization name and address fields supply the human-readable identity and the geography, and the proprietary-versus-nonprofit character, where reported, hints at the ownership structure—a question that matters more in addiction treatment than in most fields, given the long-running scrutiny of for-profit operators in the space. Understanding which fields are stable keys (CCN, enrollment ID, NPI), which are descriptive (name, type, ownership character), and which are status snapshots (enrollment status) is the prerequisite for using the file correctly: the keys are for joining, the descriptors are for grouping, and the status is for filtering down to the network that is actually live.
Joining to ownership, enrollment, and the supply side
Like the rest of the CMS provider universe, the OTP enrollment file is most valuable not in isolation but as one node in a connected graph, and the CCN, enrollment ID, and NPI are what wire it in. Several joins matter.
The first is to the provider-enrollment and ownership records. The same enrollment ID that appears here keys the broader Medicare enrollment files and CMS's all-owners disclosures, which expose who owns and controls an enrolled provider. This is especially illuminating for OTPs because addiction treatment has drawn substantial private-equity and multi-state-operator investment, and the question of whether the methadone clinic on the map is an independent nonprofit, a county program, or one site in a national for-profit chain is answerable only through the ownership join. Tracking how the ownership composition of the OTP network shifts over time is a structural story about who is delivering Medicare-funded addiction care.
The second join is to geography and need. The program's state and ZIP, joined to census population and—crucially—to overdose-mortality data such as CDC WONDER, place each enrollment in its epidemiological context. This is the join that turns the file from a list into a treatment-access map: OTPs per capita, OTPs per overdose death, and the counties where the overdose burden is high but no enrolled program sits. It is the access-against-need analysis the file exists to support, and it speaks directly to the policy question of whether Medicare's new benefit reached the places the epidemic hit hardest.
The third, conceptual join is to the supply side of the opioid story. This treatment file is the natural complement to the DEA's ARCOS record of how prescription opioids were distributed in the first place—the same geographies that absorbed the heaviest distribution of prescription opioids are the geographies where opioid use disorder, and therefore the need for treatment, concentrated. Setting the ARCOS distribution map beside this OTP access map is the cross-dataset move that connects cause to response: it asks whether the federal treatment infrastructure followed the harm, or whether the places flooded with pills the first time around remain, years later, the places furthest from a methadone clinic.
Analytical uses
A national, geocoded census of the Medicare-enrolled OTP network supports a distinctive set of analyses that no patient-side or claims dataset can on its own.
Treatment access by state and county is the most immediate use. Because each enrollment carries a location, an analyst can count OTPs by state, normalize by population, and produce a per-capita map of Medicare-accessible medication treatment. Layering overdose-mortality data on top yields the more pointed access-against-need ratio—OTPs per overdose death—and surfaces the treatment deserts: the high-burden counties with no enrolled program within a feasible distance, which are exactly the places a treatment-expansion policy should target. Because methadone can only be obtained through an OTP, these gaps are not abstract; they are the difference between a beneficiary having access to the most-proven medication and not.
The post-2020 growth curve uses successive snapshots of the file to watch the network build out after the SUPPORT Act benefit took effect: how quickly OTPs enrolled, which states expanded fastest, and whether the rate of new enrollment tracked the geography of need or simply the geography of pre-existing programs. Because the benefit is recent, the file is unusually well-suited to documenting an access expansion in close to real time. The ownership picture exploits the ownership join to ask who is building that network—independent nonprofits, government programs, or consolidated for-profit operators—and how the answer varies between high-need and low-need areas.
Finally, the supply-to-treatment comparison brings the ARCOS join to bear, setting the distribution of prescription opioids over the crisis years against the present-day distribution of treatment capacity. This is the analysis that asks the hardest accountability question the two datasets together can pose: whether the federal response, measured in enrolled treatment programs, has reached the communities that bore the brunt of the distribution that helped create the need in the first place.
Python workflow: OTPs by state against population and need
The script below pulls the opioid treatment program enrollment file from CMS's data.cms.gov API, tallies the enrolled OTPs by state, and maps the count against population to produce a per-capita treatment-access metric. No API key is required for the CMS data. Because the CMS datastore re-versions its files and the column names drift between releases, the script discovers the working state and CCN column names at runtime rather than hard-coding them, and resolves the dataset identifier from the catalog. The population join uses the Census American Community Survey API; the comment flags where an analyst would substitute overdose-mortality data—from CDC WONDER—to compute the access-against-need ratio that the access map ultimately wants.
import requests, pandas as pd
# CMS Provider Data / enrollment files on data.cms.gov -- no API key
# required for public data. CMS publishes the Medicare enrollment record
# for opioid treatment programs (OTPs), the clinics certified to dispense
# medications for opioid use disorder. Replace the UUID below with the
# current "Opioid Treatment Program Providers" dataset id from the
# data.cms.gov catalog; CMS re-versions its files and the id changes.
BASE = "https://data.cms.gov/data-api/v1/dataset"
OTP_UUID = "REPLACE_WITH_CURRENT_OTP_PROVIDERS_UUID"
def fetch_all(uuid, page_size=5000):
# Page through the datastore endpoint until a short page ends it.
rows, offset = [], 0
while True:
params = {"size": page_size, "offset": offset}
r = requests.get(f"{BASE}/{uuid}/data", params=params, timeout=120)
r.raise_for_status()
page = r.json()
if not page:
break
rows.extend(page)
if len(page) < page_size:
break
offset += page_size
return pd.DataFrame(rows)
def _find(cols, *needles):
# First column whose name contains all needles (case-insensitive).
for c in cols:
u = c.upper()
if all(n.upper() in u for n in needles):
return c
return None
# --- Pull the OTP enrollment file --------------------------------------
otp = fetch_all(OTP_UUID)
otp.columns = [c.strip() for c in otp.columns]
state_col = _find(otp.columns, "STATE") or _find(otp.columns, "ST")
ccn_col = _find(otp.columns, "CCN") or _find(otp.columns, "CERT", "NUM")
# --- Metric 1: enrolled OTPs by state ----------------------------------
by_state = (otp.groupby(state_col)[ccn_col]
.nunique().sort_values(ascending=False))
print(f"Total Medicare-enrolled OTPs: {otp[ccn_col].nunique():,}")
print(by_state.head(15).to_string())
# --- Metric 2: treatment capacity vs population ------------------------
# Census ACS population estimates by state (key optional). Join the OTP
# counts to population to get programs per 100k residents, the headline
# treatment-access metric. Where overdose-mortality data is available
# (e.g. CDC WONDER), the same join yields OTPs per overdose death --
# the access-against-need ratio this file exists to support.
ACS = "https://api.census.gov/data/2022/acs/acs5"
resp = requests.get(ACS, params={"get": "NAME,B01003_001E", "for": "state:*"},
timeout=60).json()
pop = pd.DataFrame(resp[1:], columns=resp[0])
pop["pop"] = pop["B01003_001E"].astype(float)
pop["st"] = pop["NAME"]
access = (by_state.rename("otps").to_frame()
.merge(pop[["NAME", "pop"]], left_index=True,
right_on="NAME", how="left"))
access["otps_per_100k"] = access["otps"] / (access["pop"] / 100000)
access = access.sort_values("otps_per_100k", ascending=False)
for _, row in access.head(10).iterrows():
print(f"{row['NAME']:<22} {int(row['otps']):>4} OTPs "
f"{row['otps_per_100k']:.2f} per 100k")
Two practical notes apply. First, the per-capita metric in the script is a transparent first pass: programs per 100,000 residents is easy to reason about, but the question the OTP network actually poses—programs relative to the burden of opioid use disorder— requires an overdose or treatment-need denominator rather than raw population, because a state can be populous overall and still have its overdose burden concentrated in under-served rural and post-industrial counties. The script leaves the swap to a CDC-WONDER-style overdose denominator as the obvious next step, and a serious access analysis should descend below the state level to the county and drive-time scale at which a treatment desert is actually experienced. Second, the file should be filtered on active enrollment status before any count is taken; including deactivated or revoked enrollments inflates the apparent network and misstates the treatment capacity that is genuinely available to a Medicare beneficiary today.
Limitations and analytical caveats
The enrollment file is the cleanest public census of the Medicare-participating OTP network, but it carries structural limitations that an analyst must internalize before drawing conclusions from it.
Enrollment is not capacity, and it is not utilization.The file records that a program is enrolled to bill Medicare as an OTP—nothing about how many patients it can serve, how many it actually treats, whether it has a waitlist, or whether it is accepting new Medicare patients at all. A county with one enrolled OTP and a county with one OTP running at three times the patient load look identical in this file. A high count of enrolled programs says the treatment door exists; it says nothing about whether there is room behind it. The capacity and utilization questions live in other CMS datasets—the claims and utilization files—to which this file is the join key, not the answer.
It is Medicare enrollment, not the whole treatment system.The file is the record of OTPs enrolled to bill Medicare under the OTP benefit. The opioid treatment system is far larger: most OTP patients are covered by Medicaid, by private insurance, by state grant funding, or pay cash, and a program serving an overwhelmingly Medicaid and uninsured population—doing exactly the frontline work the field depends on—may have a modest Medicare footprint and a correspondingly low profile in this file. SAMHSA maintains the comprehensive directory of certified OTPs regardless of payer; this CMS file is the Medicare-billing slice of that universe. It is authoritative for the Medicare question specifically, and it must not be read as the complete map of methadone access in the country.
An enrolled program is not necessarily an open one.Enrollment records have lifecycle lag. A program that has closed may still appear as enrolled until its enrollment is formally deactivated, and a newly opened program may not appear until its enrollment is approved. Counting raw enrollments without filtering on active status will overcount the operating network at the trailing edge and undercount it at the leading edge. Because the Medicare-OTP benefit itself is recent, the file is still relatively early in its life, and its growth reflects both genuine network expansion and the catch-up of programs enrolling for a benefit that did not exist before 2020—a dynamic that complicates any naive year-over-year trend.
Geography in the file is the program's location, not the patient's. A program's address marks where treatment is dispensed, but the daily-dispensing model means access is acutely sensitive to distance: a beneficiary an hour from the nearest OTP, expected to attend most days, faces a barrier that a per-county program count does not capture. The most honest access analyses therefore work at the drive-time scale and acknowledge that an enrolled program on a state map can sit a long, treatment- defeating distance from the people who need it.
Held with these caveats in mind, the cms_opioid_treatment table is a uniquely valuable resource: a program-resolved, geocoded census of the opioid treatment programs that Medicare, after fifty-five years, finally began to pay—the administrative map of a treatment door that opened in 2020, set against an overdose crisis that had been building for two decades, and the treatment-side answer to the same supply-side question the distribution record only asks.
Related writing
380 million transactions: indexing the DEA's ARCOS opioid distribution data — This OTP file is the treatment-side complement to ARCOS: the same geographies that absorbed the heaviest distribution of prescription opioids are where the need for medication treatment concentrated, and setting the two maps side by side asks whether the federal response followed the harm.
CMS FQHCs and Rural Health Clinics: The Federal Record of the Medicare Safety Net — The safety-net clinics that anchor primary care in underserved places are the same communities where opioid treatment is often hardest to reach, and both files map the supply of care through the shared CMS Certification Number and enrollment plumbing.
CMS Doctors and Clinicians: The Federal Database Behind Every Medicare Physician — The clinician file shares the same NPI and enrollment plumbing as these program records and is what lets an analyst see who actually furnishes the medication treatment, including the buprenorphine prescribers whose office-based work sits alongside the OTP model.