Skip to content

Custom DRG Tables API

Create and manage custom DRG tables by cloning and modifying standard CMS data.

Overview

The Custom DRG Tables API allows you to create your own versions of DRG tables. You start by cloning a standard CMS table (based on a specific year and payment system) and then modify individual entries (weights, LOS, etc.) to suit your modeling needs.

Base Path: /api/v1/custom-drg-tables

Authentication: Required for all endpoints (Bearer token)

Table Management

List Custom Tables

Get a summary of all custom DRG tables you have created. Multi-year tables with the same drg_id are returned as separate entries.

Endpoint: GET /custom-drg-tables/

Response:

{
  "data": [
    {
      "drg_id": "custom-table-001",
      "source_year": 2024,
      "payment_system": "IPPS",
      "record_count": 760,
      "created_at": "2024-01-01T12:00:00Z",
      "updated_at": "2024-01-02T12:00:00Z"
    },
    {
      "drg_id": "custom-table-001",
      "source_year": 2025,
      "payment_system": "IPPS",
      "record_count": 765,
      "created_at": "2025-01-01T12:00:00Z",
      "updated_at": "2025-01-02T12:00:00Z"
    }
  ],
  "count": 2
}

Create Custom Table

Create a new custom DRG table by cloning data from a standard CMS year. You can also use this endpoint to add a new fiscal year to an existing drg_id.

Endpoint: POST /custom-drg-tables/

Request Body:

{
  "drg_id": "my-custom-model",
  "source_year": 2025,
  "payment_system": "IPPS"
}

Response:

{
  "message": "Custom IPPS DRG table 'my-custom-model' created successfully",
  "drg_id": "my-custom-model",
  "source_year": 2025,
  "payment_system": "IPPS",
  "record_count": 765
}

Delete Custom Table

Delete an entire custom DRG table and all its entries.

Endpoint: DELETE /custom-drg-tables/{drg_id}

Path Parameters:

Parameter Type Required Description
drg_id string Yes Unique identifier for the custom table

Query Parameters:

Parameter Type Required Description
source_year integer No Optional year to delete. If not provided, deletes all years for the ID.

Response:

{
  "message": "Custom DRG table 'my-custom-model' deleted successfully."
}

Export to CSV

Export all entries in a custom DRG table to a CSV file.

Endpoint: GET /custom-drg-tables/{drg_id}/export

Path Parameters:

Parameter Type Required Description
drg_id string Yes Unique identifier for the custom table

Query Parameters:

Parameter Type Required Description
source_year integer No Year to export. Defaults to most recent if not specified.
drg_code string No Filter export by DRG code
effective_date string No Filter export by effective date
payment_system string No Filter export by payment system

Response:

Returns a downloadable CSV file.


Entry Management

List Entries

Retrieve entries from a specific custom table.

Endpoint: GET /custom-drg-tables/{drg_id}

Path Parameters:

Parameter Type Required Description
drg_id string Yes Unique identifier for the custom table

Query Parameters:

Parameter Type Required Description
source_year integer No filter by source year
drg_code string No Filter by DRG code
effective_date string No Filter by effective date
payment_system string No Filter by payment system
skip integer No Number of records to skip
limit integer No Maximum records to return

Response:

Returns a list of custom DRG entries.


Get Entry by Key

Get a specific entry using its composite business key.

Endpoint: GET /custom-drg-tables/{drg_id}/entries/{drg_code}

Path Parameters:

Parameter Type Required Description
drg_id string Yes Custom table ID
drg_code string Yes DRG code (e.g., "001")

Query Parameters:

Parameter Type Required Description
effective_date string Yes Effective date of the entry
payment_system string No Payment system filter

Response:

Returns the single custom DRG entry.


Update Entry by Key

Update a specific entry using its composite business key.

Endpoint: PATCH /custom-drg-tables/{drg_id}/entries/{drg_code}

Path Parameters:

Parameter Type Required Description
drg_id string Yes Custom table ID
drg_code string Yes DRG code

Query Parameters:

Parameter Type Required Description
effective_date string Yes Effective date of the entry
payment_system string No Payment system filter

Request Body:

Fields to update (e.g., weight, geometric_mean_length_of_stay).

Response:

Returns the updated entry.


Get Entry by ID

Get a specific entry by its unique UUID.

Endpoint: GET /custom-drg-tables/entry/{id}

Path Parameters:

Parameter Type Required Description
id UUID Yes Unique record ID

Response:

Returns the single custom DRG entry.


Update Entry by ID

Update a specific entry by its unique UUID.

Endpoint: PUT /custom-drg-tables/entry/{id}

Path Parameters:

Parameter Type Required Description
id UUID Yes Unique record ID

Request Body:

Fields to update.

Response:

Returns the updated entry.


Delete Entry

Delete a specific entry by its unique UUID.

Endpoint: DELETE /custom-drg-tables/entry/{id}

Path Parameters:

Parameter Type Required Description
id UUID Yes Unique record ID

Response:

200 OK with success message.


Metadata Endpoints

Get Cloneable Years

Get a list of years available in the standard system that can be used as a source for cloning.

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

Query Parameters:

Parameter Type Required Description
payment_system string No Filter by payment system (IPPS, IPF, LTCH)

Response:

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