Skip to content
healthcare.dev

Build a claim code checker with ICD-10 and HCPCS data

Billing tools and practice software reject fewer claims when codes are checked as they're entered. A header code like E11 isn't billable; a code retired last October 1 isn't valid for this year's dates of service.
Endpoints
/v1/codes/{system}/batch
/v1/codes/{system}/{code}/children
MCP tools
lookup_code, explain_code_hierarchy
Plan
Runs on the Free plan

How it works

  1. Collect the diagnosis codes from the claim form (codes only, no patient details).
  2. Send them in one batch request; results keep your input order.
  3. Flag codes that weren't found, aren't billable or are retired.
  4. For a header code, list its billable children so the user can pick the specific one.

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(); // reads HDEV_API_KEY

export async function checkDiagnoses(codes: string[]) {
  const { data, meta } = await hdev.codes.batch("icd10cm", codes);
  const problems = [];
  for (const r of data) {
    if (!r.found) problems.push({ code: r.code, issue: "not an ICD-10-CM code" });
    else if (r.record?.status === "retired") problems.push({ code: r.code, issue: "retired" });
    else if (!r.record?.billable) {
      const kids = await hdev.codes.children("icd10cm", r.code);
      problems.push({
        code: r.code,
        issue: "not billable: use a more specific code",
        options: kids.data.filter((k) => k.billable).map((k) => `${k.code} ${k.display}`),
      });
    }
  }
  return { problems, checkedAgainst: meta.data_version };
}

await checkDiagnoses(["E11.9", "E11", "I10", "Z00.00"]);

Or ask your agent

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

Prompt
Check these ICD-10-CM codes for a claim: E11.9, E11, I10. Tell me which aren't billable and what the billable options are.

Take it further

  • Check HCPCS Level II codes the same way with the hcpcs system.
  • Pass as_of to check codes against the release in effect on the date of service.
  • Subscribe to the change feed (Builder) to re-check saved claims when codes retire.

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

More examples