Skip to content
healthcare.dev

Build a medical coding assistant with search by meaning

Documentation tools and agents need to go from "type 2 diabetes with kidney disease" to E11.22 without guessing. Search by meaning finds it; the code record proves it.
Data
ICD-10
Endpoints
/v1/search
/v1/codes/{system}/{code}/hierarchy
MCP tools
search_by_meaning, explain_code_hierarchy, lookup_code
Plan
Needs the Builder plan or up

How it works

  1. Search by meaning with the clinician's wording (never patient details).
  2. Keep the billable candidates and show why each matched.
  3. Show the chosen code's hierarchy so the user can move up or down a level.

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 suggestCodes(text: string) {
  const { data } = await hdev.search.meaning({ q: text, system: "icd10cm", limit: 5 });
  const best = data[0];
  if (!best) return { candidates: [] };
  const { data: tree } = await hdev.codes.hierarchy("icd10cm", best.code);
  return {
    candidates: data.map((h) => ({ code: h.code, display: h.display, why: h.reason })),
    hierarchy: tree,
  };
}

await suggestCodes("type 2 diabetes with diabetic kidney disease");

Or ask your agent

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

Prompt
What's the ICD-10-CM code for type 2 diabetes with diabetic chronic kidney disease? Show the hierarchy and whether it's billable.

Take it further

  • Search drugs by meaning too (system: "rxnorm").
  • Connect the MCP server to your agent so it calls these tools itself.
  • Log the data_version with each suggestion for audit.

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

More examples