# DME market

> Rank Medicare durable medical equipment, prosthetics, orthotics and supplies (DMEPOS) referring clinicians and billing suppliers by HCPCS code and state.

Source: https://openpipe.health/docs/api/dme/

This endpoint ranks clinicians who order durable medical equipment, prosthetics, orthotics and supplies (DMEPOS) for Medicare patients (`role=referrers`) and suppliers who bill Medicare for fulfilling them (`role=suppliers`). For one clinician's full productivity profile including their DME referral summary, see [Productivity and officials](https://openpipe.health/docs/api/productivity.md).

Costs 1 credit per call, charged only when the query succeeds. A `400` is free.

## Search DME referrers or suppliers

```http
GET /api/market/dme
```

The endpoint operates in two modes:

- **By HCPCS code** (`hcpcs` provided, with optional `state`, `specialty` and `rental`): ranks referrers (`dme_referrer_services`) or suppliers (`dme_supplier_services`) for that specific device or supply code (for example `E0601` for CPAP devices, `E1390` for oxygen concentrators, `A4239` for CGM supplies, `K0823` for power wheelchairs, `L1833` for knee braces).
- **By state** (`state` provided without `hcpcs`): ranks referrers (`dme_referrers`) or suppliers (`dme_suppliers`) across all Medicare DMEPOS items in that state.

### Parameters

At least one of `hcpcs` or `state` is required. Without either, the call returns `400`. Unknown query parameters also return `400`.

| Name | Type | Description |
|---|---|---|
| `role` | string | `referrers` (default, clinicians who order DME) or `suppliers` (organizations and individuals who bill Medicare for DME). |
| `hcpcs` | string | Five-character HCPCS Level II code, case-insensitive, for example `E0601` or `E1390`. |
| `state` | string | Two-letter USPS state code, case-insensitive. |
| `specialty` | string | Substring of the referring clinician's Medicare specialty or the supplier type, case-insensitive. |
| `rental` | string | `true` or `false`. Only accepted when `hcpcs` is set: `true` keeps rentals only, `false` keeps purchases only. When omitted, rental and purchase rows for the same NPI and code are combined. |
| `sort` | string | `claims` (default), `payment`, `services`, or `patients`. |
| `limit` | number | 1 to 200. Default 25. |
| `offset` | number | Rows to skip, 0 to 100,000. Default 0. |

### Example: top CPAP referrers in Texas

```sh
curl "$OPH_API/api/market/dme?role=referrers&hcpcs=E0601&state=TX&limit=2" \
  -H "Authorization: Bearer $OPH_KEY"
```

```json
{
  "role": "referrers",
  "rows": [
    {
      "npi": "1234567890",
      "year": 2024,
      "name": "Jane Example",
      "credentials": "M.D.",
      "city": "Dallas",
      "state": "TX",
      "specialty": "Sleep Medicine",
      "hcpcs_code": "E0601",
      "hcpcs_description": "Continuous positive airway pressure (cpap) device",
      "category": "Durable Medical Equipment",
      "subcategory": "DME-Other DME",
      "has_rental": true,
      "tot_suppliers": 46,
      "tot_benes": 547,
      "tot_claims": 3192,
      "tot_srvcs": "3204.0",
      "est_allowed": "134089",
      "est_payment": "96898"
    }
  ],
  "sql": "SELECT s.npi, s.year, ... FROM dme_referrer_services s JOIN dme_referrers r ON r.npi = s.npi AND r.year = s.year WHERE s.hcpcs_code = $1 AND s.state = $2 GROUP BY ... ORDER BY tot_claims DESC NULLS LAST, s.npi LIMIT 2 OFFSET 0",
  "params": ["E0601", "TX"],
  "sources": ["dme_referrer_services", "dme_referrers"],
  "ms": 8,
  "population": "Medicare fee-for-service Part B DMEPOS (2024). Commercial, Medicare Advantage and Medicaid orders are not counted. Cells under 11 patients are suppressed by CMS.",
  "note": "When rental is omitted, rental and purchase rows for the same NPI and HCPCS code are combined; pass rental=true or rental=false to split them. est_payment = sum(avg_payment * tot_srvcs).",
  "usage": { "credits": 1, "creditsUsed": 15, "creditsLimit": 5000, "txid": "11405" }
}
```

### Example: top oxygen concentrator rental suppliers in Georgia

```sh
curl "$OPH_API/api/market/dme?role=suppliers&hcpcs=E1390&state=GA&rental=true&limit=2" \
  -H "Authorization: Bearer $OPH_KEY"
```

### Columns

In **HCPCS mode** (`hcpcs` provided), each row includes:

| Field | Meaning |
|---|---|
| `npi`, `name`, `city`, `state`, `specialty` | Referring clinician or billing supplier identity. Referrer rows include `credentials`; supplier rows include `entity_type`. |
| `hcpcs_code`, `hcpcs_description`, `category`, `subcategory` | HCPCS Level II code, CMS description, and RBCS category/subcategory. |
| `has_rental` | `true` if any of the summed rows for this NPI and code were rentals. |
| `tot_suppliers` | Referrer mode only: distinct suppliers that filled the clinician's orders (max across rental/purchase rows when combined). |
| `tot_benes`, `tot_claims`, `tot_srvcs` | Beneficiary count (`null` when CMS suppressed counts under 11), supplier claims, and service units. When rental and purchase rows are combined they are summed, so a patient who both rented and bought the item counts twice in `tot_benes`. |
| `est_allowed`, `est_payment` | Estimated Medicare allowed amount and Medicare payment (`sum(avg_allowed * tot_srvcs)` and `sum(avg_payment * tot_srvcs)`), rounded to whole dollars. |

In **state mode** (`hcpcs` omitted), each row comes directly from `dme_referrers` or `dme_suppliers` and includes `tot_hcpcs_codes`, `tot_benes`, `tot_claims`, `tot_srvcs`, `tot_allowed`, `tot_payment`, plus the CMS sub-totals `dme_claims`/`dme_payment`, `pos_claims`/`pos_payment` (prosthetics and orthotics) and `drug_claims`/`drug_payment`.

`sql` is the statement the server ran, as a read-only [receipt](https://openpipe.health/docs/receipts.md).

## Caveats

- **Medicare fee-for-service only (2024).** Medicare Advantage, Medicaid and commercial DMEPOS orders are not included.
- **Referrer payments are supplier revenue.** On `role=referrers`, `tot_payment` and `est_payment` are what Medicare paid the suppliers that filled the clinician's orders — not payments to the clinician.
- **CMS suppression.** Rows with fewer than 11 Medicare beneficiaries are omitted from the service tables, and `tot_benes` is blanked on a large share of published rows. `NULL` means suppressed, not zero.
- **Suppliers bill per NPI.** National DME chains and pharmacy chains hold many location NPIs; sum across NPIs by name when sizing a company.
