Skip to content
healthcare.dev

Keep your code tables current with the change feed

ICD-10-CM changes every October 1, HCPCS every quarter, NDC listings daily. Apps that keep a local copy use the change feed to apply each release as a small diff.
Endpoints
/v1/changes
/v1/codes/{system}/{code}
MCP tools
lookup_code
Plan
Needs the Builder plan or up

How it works

  1. Store the last data_version you applied for each dataset.
  2. Ask the change feed for everything since then; it pages with a cursor.
  3. Fetch added and changed records; mark retired ones in your table.

The code

TypeScript with @healthcare.dev/sdk. Set HDEV_API_KEY to a free key and run it. Every response carries its source, release and license in meta.

TypeScript
import { HealthcareDev } from "@healthcare.dev/sdk";

const hdev = new HealthcareDev();

export async function applyChanges(dataset: "icd10cm" | "hcpcs", since: string) {
  let latest = since;
  for await (const c of hdev.changes.iterate({ dataset, since })) {
    if (c.kind === "retired") await markRetired(c.key);
    else await upsert((await hdev.codes.get(dataset, c.key)).data);
    latest = c.data_version;
  }
  return latest; // save for the next run
}

declare function markRetired(code: string): Promise<void>;
declare function upsert(record: unknown): Promise<void>;

Or ask your agent

Connect the MCP server and ask in plain language. It calls lookup_code and cites what it found.

Prompt
What ICD-10-CM codes were added or retired in the latest release?

Take it further

  • Run it after each dataset release (see /v1/datasets for versions).
  • Show users a "codes changed" notice when a code they use is retired.
  • Use /v1/coverage/changes (Pro) to watch Medicare coverage documents the same way.

Reference data only, not medical advice or a coverage determination. Send codes, NDCs and NPIs, never patient information.

More examples