Oystehr
ICD-10-CM Code Search

ICD-10-CM Code Search

Search ICD-10-CM (International Classification of Diseases, 10th Revision, Clinical Modification) diagnosis codes by code or description. The search supports exact matches, prefix searches, and full-text search with BM25 ranking. By setting includeSynonyms, the search can also match clinical synonyms derived from SNOMED CT, so common lay terms find the right code. By setting specialty, the search biases codes commonly used by practices of that specialty type.

Only billable codes are returned. In ICD-10-CM, billable codes are the leaf nodes of the code hierarchy. Codes that require a seventh character are expanded into one billable code per valid seventh-character extension (for example, S82.821A, S82.821D, S82.821S).

Searching for ICD-10-CM Codes

You can search for ICD-10-CM codes using the SDK or API:

Search for ICD-10-CM codes with the SDK:

import Oystehr from '@oystehr/sdk';
 
const oystehr = new Oystehr({
  accessToken: '<your_access_token>',
});
 
const result = await oystehr.terminology.searchIcd10({
  query: 'J06.9',
});

Query Parameters

  • query (required): Search query string (code or description text)
  • searchType (optional): Type of search to perform
    • code - searches only code field
    • description - searches the description field
    • all - searches both code and description (default)
  • limit (optional): Number of results per page (1-100, default: 10)
  • cursor (optional): Cursor for pagination. Use the nextCursor from a previous response to get the next page
  • strictMatch (optional): When true, only returns exact matches without fuzzy search or prefix matching (default: false)
  • includeSynonyms (optional): When true, also matches clinical synonyms derived from SNOMED CT (for example, "shingles" finds B02.9). Applies to the description and all search types; has no effect on a code search (default: false)
  • specialty (optional): Bias ranking toward codes commonly diagnosed in the given specialties.

Response

{
  "codes": [
    {
      "code": "J06.9",
      "display": "Acute upper respiratory infection, unspecified"
    }
  ],
  "metadata": {
    "nextCursor": "MS4zOkowNi45" // Base64-encoded cursor, null if no more results
  }
}

Pagination

The API uses cursor-based pagination. To retrieve the next page of results, pass the nextCursor value from the previous response as the cursor parameter in your next request:

// First page
const page1 = await oystehr.terminology.searchIcd10({
  query: 'respiratory infection',
  limit: 10,
});
 
// Next page (if available)
if (page1.metadata.nextCursor) {
  const page2 = await oystehr.terminology.searchIcd10({
    query: 'respiratory infection',
    limit: 10,
    cursor: page1.metadata.nextCursor,
  });
}

Search Behavior

The search uses MiniSearch with BM25 scoring and searches across the code and description fields, and optionally the synonym field when includeSynonyms is set.

Prefix Search

For code-based searches, the system supports prefix matching (e.g., "J06" matches "J06.0", "J06.9", etc.).

Full-Text Search

For description-based searches, the system performs full-text search across code descriptions with relevance ranking.

Synonym Search

When includeSynonyms=true, the search also matches SNOMED CT-derived synonyms, so lay and clinical terms like "shingles" or "heart attack" find the corresponding ICD-10-CM codes. Synonyms apply to the description and all search types and have no effect on a code search. The response shape is unchanged; synonyms only influence which codes match and how they are ranked.

Specialty Bias

Passing one or more specialty values biases ranking toward the ICD-10-CM codes most commonly diagnosed in those specialties, so the codes a practice actually uses surface higher. Pass multiple values (by repeating the parameter) for a practice that covers more than one specialty — a code frequent in any of the listed specialties is boosted, and codes not in any list are unaffected. The bias is a ranking nudge layered on top of the text-match relevance; it never filters results or changes the response shape. Supported values: urgent-care.

Access Policy

Access Policy Action: Terminology:SearchCodes Access Policy Resource: Terminology:Code:*