Look up Medicare equipment activity by supplier in Python
Find reported CPAP activity for three suppliers, with rental status, beneficiary counts, claims and historical payment measures.
Find CPAP activity for a supplier roster
You have supplier NPIs and want to see their reported equipment activity. This example looks up E0601, the CPAP device code in this 2024 source, for three North Carolina suppliers. It returns rental status, reported beneficiaries, claims, billing units and average Medicare payments.
The optional input.csv contains three genuine supplier selections. Those same NPIs appear in the roster list in the Python code below. No suppliers, patients or utilization observations are invented.
Download supplier_services.csv into your working folder. This is a genuine subset of the paid file: all E0601 records for those three NPIs, retaining all 35 product fields. It is selected for this CPAP lookup; it does not contain the suppliers’ other equipment codes.
The full $29 reference contains 440,670 supplier/code/rental records, 55,598 suppliers and 1,251 HCPCS Level II codes from 2024 Original Medicare activity. Review the complete product and coverage.
Code example
This standard-library example runs in a notebook cell, IPython or a script in the folder containing the CSV. It reads the file one row at a time and keeps only the chosen suppliers and code.
Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.
import csv
from decimal import Decimal
from pathlib import Path
# Three genuine supplier selections, also supplied in optional input.csv.
roster = [{'npi': '1033480488'}, {'npi': '1073592580'}, {'npi': '1083719538'}]
selected = {item['npi'] for item in roster}
hcpcs = 'E0601' # CPAP device in this 2024 source.
activity = {npi: [] for npi in selected}
with Path('supplier_services.csv').open(encoding='utf-8', newline='') as f:
for row in csv.DictReader(f):
if row['npi'] in selected and row['hcpcs_code'] == hcpcs:
activity[row['npi']].append(row)
results = []
for item in roster:
npi = item['npi']
if not activity[npi]:
print(f'{npi}: no published {hcpcs} record in this edition; no zero activity inferred.')
for row in activity[npi]:
result = {key: row[key] for key in ['npi', 'last_or_organization_name', 'city',
'hcpcs_code', 'rental_indicator', 'beneficiaries', 'beneficiaries_status',
'claims', 'service_units', 'average_medicare_payment']}
results.append(result)
rental = 'rental' if row['rental_indicator'] == 'Y' else 'non-rental'
beneficiaries = row['beneficiaries'] if row['beneficiaries_status'] == 'reported' else 'suppressed'
print(f"{row['last_or_organization_name']} | NPI {npi} | {row['city']}, {row['state']}")
print(f" {hcpcs} | {rental} | beneficiaries: {beneficiaries} | {row['claims']} claims | {Decimal(row['service_units']):,} billing units")
print(f" Average Medicare paid: ${Decimal(row['average_medicare_payment']):.2f} per reported service")
Replace roster with your own NPI strings or a CSV’s npi column. Change hcpcs for a different lookup when using the complete purchased file.
Analysis of the output
Palmetto Oxygen, Llc | NPI 1033480488 | Cary, NC
E0601 | rental | beneficiaries: 36 | 191 claims | 191 billing units
Average Medicare paid: $30.04 per reported service
Feeling Great, Inc. | NPI 1073592580 | Durham, NC
E0601 | rental | beneficiaries: 376 | 2337 claims | 2,337 billing units
Average Medicare paid: $32.24 per reported service
Family Medical Supply Llc | NPI 1083719538 | Cary, NC
E0601 | rental | beneficiaries: 808 | 4720 claims | 4,720 billing units
Average Medicare paid: $30.82 per reported service
The three suppliers have 36, 376 and 808 reported E0601 beneficiaries respectively. Each result is a rental record. Their 191, 2,337 and 4,720 reported service units reflect billing activity, which can recur for the same beneficiary; they are not counts of unique devices or patients. Claims and units happen to agree in these records, but they are separate source fields.
Average Medicare payments are $30.04, $32.24 and $30.82 per reported service. The CSV retains the source precision beyond the two decimals shown. These are historical Medicare-paid averages, not current equipment prices or total spending. The file also includes submitted charges, allowed amounts and geographically standardized payments, each with its own definition.
You can use the result to identify published supplier/code relationships and inspect reported activity. It does not verify current supplier availability or rank quality or efficiency. Modifiers, geography and payment rules can affect amounts. Supplier addresses describe the supplying organization, not where beneficiaries live or the full area it serves.
Other lookups may return both rental and non-rental groups; the code prints each separately. A blank beneficiary count is printed as suppressed, never zero. CMS’s field-specific dictionary says counts below 11 are suppressed and groups below 11 claims are omitted. The prepared file retains 179,729 blank beneficiary counts alongside reported claims. No published record is not the same as no activity, and beneficiary counts must not be added across groups as unique people.
Using the full dataset
Extract the purchased ZIP and replace the sample supplier_services.csv with the full file. The code runs unchanged. The main key is year + npi + hcpcs_code + rental_indicator. Keep identifiers as text. The separate supplier table joins on year and NPI; the code table joins on year and HCPCS code.
The six CSV tables include the activity file, supplier and code references, complete source-record accounting, source-column mappings and the source edition. Dictionaries, quality reports, independent acceptance results, checksums and the verified example accompany them. All 32 original source fields are retained in the 35-field activity table.
The provider and supplier selection page separates equipment activity from Part D prescriptions and Part B administered drugs. The separately priced HCPCS reference covers 2026 code definitions and changes; this activity covers 2024, so matching code text alone does not establish an unchanged definition. A supplier NPI does not reveal the referring clinician.
Sources and versions
Source: CMS Medicare DMEPOS by Supplier and Service, calendar 2024, modified July 23, 2026 and captured by ACD October 27, 2026 UTC. It covers Original Medicare fee-for-service Part B non-institutional equipment and supply claims, excluding Medicare Advantage and other insurers.
The current linked CMS dictionary and methodology are dated June 2025. A general-methodology paragraph describes a different omission threshold from the field-specific dictionary and the file’s observed behavior. The download records that discrepancy and preserves the original cells. Its four observed RBCS groups, including Unknown, also remain unchanged.
The source and preparation record documents the dates, coverage and ACD processing revision. The government source is free; ACD sells preparation, documentation, validation and delivery. Processing improvements for these retained inputs are included; new source editions may be sold separately. No automatic refresh is promised.
Example checked October 27, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.