Skip to content

DRG Tables API

Complete API reference for querying Medicare Diagnosis Related Group (DRG) weights and parameters.

Overview

The DRG Tables API provides access to the MS-DRG (Medicare Severities Diagnosis Related Groups) definitions, weights, and length of stay (LOS) parameters. This data is critical for inpatient prospective payment calculations.

Base Path: /api/v1/drg-tables

Authentication: Required for all endpoints (Bearer token or API Key)

Endpoints

Search DRG Tables

Retrieve a list of DRG table entries with optional filtering.

Endpoint: GET /drg-tables/

Query Parameters:

Parameter Type Required Description
drg_code string No Filter by DRG code (e.g., "001")
year integer No Filter by calendar year
fiscal_year integer No Filter by fiscal year (e.g., 2025)
effective_date string No Filter by effective date (YYYY-MM-DD)
payment_system string No Filter by payment system: IPPS (default), IPF, LTCH
skip integer No Number of records to skip (default: 0)
limit integer No Maximum records to return (default: 100)

Response:

{
  "data": [
    {
      "id": "uuid-string",
      "diagnostic_related_group": "001",
      "description": "HEART TRANSPLANT OR IMPLANT OF HEART ASSIST SYSTEM W MCC",
      "effective_date": "2024-10-01",
      "weight": 25.1234,
      "geometric_mean_length_of_stay": 35.5,
      "arithmetic_mean_length_of_stay": 42.1,
      "low_volume_drg": false,
      "post_acute_care": true,
      "special_payment_post_acute_care": false
    }
  ],
  "count": 1
}

Example Requests:

# Search for DRG 001
curl -H "Authorization: sk_live_abc123..." \
  "https://api.example.com/api/v1/drg-tables/?drg_code=001"

# Get all DRGs for FY 2025
curl -H "Authorization: sk_live_abc123..." \
  "https://api.example.com/api/v1/drg-tables/?year=2025"

Lookup DRG by Code

Quickly look up a specific DRG code, optionally for a specific date.

Endpoint: GET /drg-tables/lookup/{drg_code}

Path Parameters:

Parameter Type Required Description
drg_code string Yes The 3-digit DRG code

Query Parameters:

Parameter Type Required Description
effective_date string No Specific date to look up (YYYY-MM-DD)
payment_system string No Filter by payment system: IPPS (default), IPF, LTCH

Response:

Returns a list of matching DRG entries.

[
  {
    "id": "uuid-string",
    "diagnostic_related_group": "470",
    "description": "MAJOR JOINT REPLACEMENT OR REATTACHMENT OF LOWER EXTREMITY W/O MCC",
    "weight": 1.8921,
    // ...
  }
]

Example Request:

curl -H "Authorization: sk_live_abc123..." \
  "https://api.example.com/api/v1/drg-tables/lookup/470?effective_date=2025-01-01"

Get Record by ID

Retrieve a single DRG table entry by its unique ID.

Endpoint: GET /drg-tables/{id}

Path Parameters:

Parameter Type Required Description
id UUID Yes Unique record identifier

Example Request:

curl -H "Authorization: sk_live_abc123..." \
  "https://api.example.com/api/v1/drg-tables/123e4567-e89b-12d3-a456-426614174000"

Metadata Endpoints

Helper endpoints to discover available data ranges.

Get Available Years

Returns a list of fiscal years present in the database.

Endpoint: GET /drg-tables/available-years/list

Response:

{
  "available_years": [2023, 2024, 2025],
  "count": 3
}

Get Available Fiscal Years

Returns a list of fiscal years present in the database.

Endpoint: GET /drg-tables/available-fiscal-years/list

Response:

{
  "available_fiscal_years": [2023, 2024, 2025],
  "count": 3
}

Get Available Dates

Returns a list of distinct effective dates present in the database.

Endpoint: GET /drg-tables/available-dates/list

Response:

{
  "available_dates": ["2023-10-01", "2024-10-01"],
  "count": 2
}

Management Endpoints (Admin Only)

These endpoints require superuser privileges and are used for data maintenance.

Method Endpoint Description
POST /drg-tables/ Create a new DRG entry manually
PUT /drg-tables/{id} Update an existing DRG entry
DELETE /drg-tables/{id} Delete a DRG entry
POST /drg-tables/reload Reload IPPS DRG data from source CSVs
POST /drg-tables/reload-ipf Reload IPF DRG data from source CSVs
POST /drg-tables/reload-ltch Reload LTCH DRG data from source CSVs
POST /drg-tables/reload-icd10-dx Reload ICD-10-CM diagnosis codes
POST /drg-tables/reload-icd10-pcs Reload ICD-10-PCS procedure codes

Data Dictionary

Field Type Description
diagnostic_related_group String The 3-digit MS-DRG code.
description String Official description of the DRG.
weight Float The relative weight used to calculate payment.
geometric_mean_length_of_stay Float GMLOS - Used for transfer payment adjustments.
arithmetic_mean_length_of_stay Float AMLOS - Used for outlier threshold calculations.
low_volume_drg Boolean Indicates if this is a low volume DRG.
post_acute_care Boolean Indicates if this DRG is subject to the Post Acute Care Transfer policy.
special_payment_post_acute_care Boolean Indicates if this DRG is subject to the Special Payment Post Acute Care policy.