Build a provider credentialing check with one call per NPI
- Data
- NPI
- Endpoints
- /v1/providers/{npi}/full/v1/exclusions
- MCP tools
- get_provider_full, check_provider_exclusion
- Plan
- Needs the Pro plan or up
How it works
- Fetch the joined answer for the NPI (compact is enough for a screen).
- Stop on a deactivated NPI, an OIG exclusion recorded with it, or an opt-out in effect.
- Treat unavailable parts (null flags) as unknown and listed in
missing, not as a pass. - Because most OIG records carry no NPI, also search exclusions by the provider's name.
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 screenProvider(npi: string) { const { data, meta } = await hdev.providers.full(npi, { view: "compact" }); const flags = []; if (data.status === "deactivated") flags.push("NPI is deactivated"); if (data.flags.exclusion_recorded) flags.push("OIG exclusion recorded with this NPI"); if (data.flags.opted_out) flags.push("opted out of Medicare"); // A possible match by name is derived, never a finding: route it to a person to confirm. if (data.flags.possible_exclusion_match) flags.push("possible OIG exclusion match by name: confirm with OIG's search"); // Most OIG records carry no NPI: search by name too, then confirm identity with OIG. const byName = await hdev.exclusions.search({ q: data.name, limit: 5 }); return { name: data.name, specialty: data.primary_taxonomy?.code, flags, possibleNameMatches: byName.data.map((x) => x.name.display), unknown: data.missing.filter((m) => m.status === "unavailable"), note: data.exclusion_note, asOf: meta.data_version, }; }
Or ask your agent
Connect the MCP server and ask in plain language. It calls get_provider_full, check_provider_exclusion and cites what it found.
Screen NPI 1003926940 for credentialing: is it active, what's the specialty, and is there a Medicare opt-out or an OIG exclusion on record?
Take it further
- Re-run the screen monthly: the OIG file and opt-out affidavits change every month.
- Store
meta.data_versionwith each screen as the audit trail of what was checked. - Subscribe a webhook to
dataset.releasedfor the exclusion and opt-out datasets, and re-screen when they publish.
Reference data only, not medical advice or a coverage determination. Send codes, NDCs and NPIs, never patient information.
More examples
Claim code checker
Catch non-billable, retired and mistyped ICD-10-CM and HCPCS codes before a claim goes out. One batch call checks up to 100 codes, with the release each answer came from.
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.