Build a claim code checker with ICD-10 and HCPCS data
How it works
- Collect the diagnosis codes from the claim form (codes only, no patient details).
- Send them in one batch request; results keep your input order.
- Flag codes that weren't found, aren't billable or are retired.
- 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.
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.
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
hcpcssystem. - Pass
as_ofto 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
Recall and shortage alerts
Watch a list of NDCs for FDA recalls and drug shortages and alert when one appears. Class I recalls first, with the recalling firm, reason and lot codes.
NPI verification
Verify a provider's NPI at sign-up: check digit, whether CMS issued it, active or deactivated, and the name, specialty and license state on record.
Drug price lookup
Show what pharmacies pay for a drug: CMS's NADAC acquisition cost per unit, by NDC or name, with price history and the brand or generic classification.