Skip to content
healthcare.dev

Build a provider credentialing check with one call per NPI

Credentialing teams, staffing platforms and payer networks check the same things for every new provider. One joined answer covers them, says which files list the NPI, and never turns a missing record into a clean bill of health.
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

  1. Fetch the joined answer for the NPI (compact is enough for a screen).
  2. Stop on a deactivated NPI, an OIG exclusion recorded with it, or an opt-out in effect.
  3. Treat unavailable parts (null flags) as unknown and listed in missing, not as a pass.
  4. 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.

TypeScript
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.

Prompt
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_version with each screen as the audit trail of what was checked.
  • Subscribe a webhook to dataset.released for 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