Dashboard

MS-DRG Search

Search Medicare Severity Diagnosis Related Group codes.

Endpoint

GET /v1/msdrg/search

Quick Start

Node.js
import { Fhirfly } from "@fhirfly-io/terminology";

const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });

// Search for cardiac-related MS-DRGs
const results = await client.msdrg.search({
  q: "cardiac"
});

console.log(`Found ${results.total} DRGs`);
for (const item of results.items) {
  console.log(`DRG ${item.drg_code}: ${item.title} (${item.type})`);
}

Parameters

ParameterDescriptionExample
qGeneral text search across DRG titles and descriptionsq=cardiac

Filters

ParameterTypeDescriptionExample
mdcstringMajor Diagnostic Category (01-25, PRE)05, PRE
typestringSurgical or medical classificationSURG, MED

Pagination & Response

ParameterDefaultMaxDescription
limit20100Results per page
page1100Page number
shapecompact---compact, standard, full
sortrelevance---relevance, code, title

Example Response

{
  "facets": {
    "mdc": {
      "05": 92,
      "01": 45,
      "08": 38,
      "04": 32
    },
    "type": {
      "MED": 345,
      "SURG": 401
    }
  },
  "has_more": true,
  "items": [
    {
      "drg_code": "280",
      "title": "ACUTE MYOCARDIAL INFARCTION, DISCHARGED ALIVE WITH MCC",
      "mdc": "05",
      "type": "MED"
    },
    {
      "drg_code": "231",
      "title": "CORONARY BYPASS WITHOUT CARDIAC CATH WITH MCC",
      "mdc": "05",
      "type": "SURG"
    }
  ],
  "limit": 2,
  "meta": {
    "legal": {
      "attribution_required": false,
      "citation": "CMS MS-DRG Definitions Manual. CMS.gov. Accessed 2026-03-15 via FHIRfly.",
      "license": "public_domain",
      "source_name": "CMS MS-DRG"
    }
  },
  "page": 1,
  "total": 127,
  "total_capped": false
}

Use Cases

Filter by Major Diagnostic Category

Node.js
// Find all DRGs in MDC 05 (Diseases of the Circulatory System)
const results = await client.msdrg.search({
  mdc: "05"
});

Search Surgical DRGs Only

Node.js
// Find surgical DRGs for joint procedures
const results = await client.msdrg.search({
  q: "joint",
  type: "SURG"
});

Search Medical DRGs

Node.js
// Find medical DRGs for respiratory conditions
const results = await client.msdrg.search({
  q: "pneumonia",
  type: "MED"
});

Pre-MDC DRGs

Pre-MDC DRGs are assigned before the MDC classification step (e.g., transplants, tracheostomies):

Node.js
const results = await client.msdrg.search({
  mdc: "PRE"
});

Facets

MS-DRG search returns these facets:

FacetDescription
mdcDistribution by Major Diagnostic Category
typeDistribution by surgical/medical classification

Major Diagnostic Categories

MDCDescription
PREPre-MDC (Transplants, Tracheostomies, ECMO)
01Diseases and Disorders of the Nervous System
02Diseases and Disorders of the Eye
03Diseases and Disorders of the Ear, Nose, Mouth and Throat
04Diseases and Disorders of the Respiratory System
05Diseases and Disorders of the Circulatory System
06Diseases and Disorders of the Digestive System
07Diseases and Disorders of the Hepatobiliary System and Pancreas
08Diseases and Disorders of the Musculoskeletal System and Connective Tissue
09Diseases and Disorders of the Skin, Subcutaneous Tissue and Breast
10Endocrine, Nutritional and Metabolic Diseases and Disorders
11Diseases and Disorders of the Kidney and Urinary Tract
12Diseases and Disorders of the Male Reproductive System
13Diseases and Disorders of the Female Reproductive System
14Pregnancy, Childbirth and the Puerperium
15Newborns and Other Neonates with Conditions Originating in the Perinatal Period
16Diseases and Disorders of Blood, Blood Forming Organs and Immunological Disorders
17Myeloproliferative Diseases and Disorders, Poorly Differentiated Neoplasms
18Infectious and Parasitic Diseases, Systemic or Unspecified Sites
19Mental Diseases and Disorders
20Alcohol/Drug Use and Alcohol/Drug Induced Organic Mental Disorders
21Injuries, Poisonings and Toxic Effects of Drugs
22Burns
23Factors Influencing Health Status and Other Contacts with Health Services
24Multiple Significant Trauma
25Human Immunodeficiency Virus Infections

Required Scope

msdrg.search

See Also