CoolFace
Datasetpublic

mkieffer/Medicaid-Provider-Spending

Medicaid Provider Spending This dataset packages: the raw Medicaid Provider Spending dataset (as published on HHS Open Data), and the derived identifier-resolution artifacts produced by this repository when extracting and resolving the unique NPIs and HCPCS/CPT codes found in the raw spending data. Source Data Medicaid Provider Spending (public dataset published by HHS/Open Data): opendata.hhs.gov/datasets/medicaid-provider-spending CMS NPPES bulk dissemination… See the full description on the dataset page: https://huggingface.co/datasets/mkieffer/Medicaid-Provider-Spending.

sourceHugging Faceotherupdated 7mo agoView on Hugging Face
0likes49downloads
Dataset Card

Medicaid Provider Spending

This dataset packages:

  • —the raw Medicaid Provider Spending dataset (as published on HHS Open Data), and
  • —the derived identifier-resolution artifacts produced by this repository when extracting and resolving the unique NPIs and HCPCS/CPT codes found in the raw spending data.

Source Data

  • —Medicaid Provider Spending (public dataset published by HHS/Open Data): opendata.hhs.gov/datasets/medicaid-provider-spending
  • —CMS NPPES bulk dissemination files + CMS NPI Registry API (for NPI/provider metadata)
  • —NLM Clinical Tables HCPCS API (for HCPCS/CPT code metadata)

Source Repository

Project code, build scripts, and pipeline logic live at: ToadResearch/Medicaid_Provider_Spending.

Data Splits

These are exposed on Hugging Face as three dataset configurations (spending, npi, hcpcs) because each has a different schema (the Hub viewer and datasets expect a consistent schema within a single config).

splitcontents
spendingRaw Medicaid Provider Spending parquet (as downloaded; unmodified) from HHS Open Data.
npiDerived NPI resolution artifacts: one row per unique NPI in the spending dataset (deduped). Populated primarily from bulk NPPES dissemination files; the CMS NPI Registry API is used only as fallback for bulk misses. Includes provenance (URL/params), error message, and a raw-or-synthetic JSON payload matching the NPI Registry API response shape.
hcpcsDerived HCPCS/CPT resolution artifacts: one row per unique code in the spending dataset (deduped). Populated from the resolved mapping cache (Clinical Tables API and/or local CPT/HCPCS fallback). Includes provenance (URL/params), error message, and a raw-or-synthetic JSON payload matching the Clinical Tables response shape.

Usage

python
from datasets import load_dataset

spending = load_dataset("mkieffer/Medicaid-Provider-Spending", "spending")["spending"]
npi = load_dataset("mkieffer/Medicaid-Provider-Spending", "npi")["npi"]
hcpcs = load_dataset("mkieffer/Medicaid-Provider-Spending", "hcpcs")["hcpcs"]

Split Schemas

spending

columntypedescription
BILLING_PROVIDER_NPI_NUMstringBilling provider NPI
SERVICING_PROVIDER_NPI_NUMstringServicing provider NPI
HCPCS_CODEstringHCPCS/CPT code
CLAIM_FROM_MONTHstringClaim month (YYYY-MM-01)
TOTAL_UNIQUE_BENEFICIARIESint64Unique beneficiaries
TOTAL_CLAIMSint64Total claims
TOTAL_PAIDfloat64Total paid (USD)

npi

All columns in this split are string (some are JSON-encoded strings).

columntypedescription
npistringNPI
basicstring (JSON)results[0].basic
addressesstring (JSON)results[0].addresses
practice_locationsstring (JSON)results[0].practiceLocations
taxonomiesstring (JSON)results[0].taxonomies
identifiersstring (JSON)results[0].identifiers
other_namesstring (JSON)results[0].other_names
endpointsstring (JSON)results[0].endpoints
urlstringRequest URL when an API call happened; otherwise a bulk sentinel like nppes_bulk:*
error_messagestring (nullable)Error message if lookup failed
api_run_idstringLocal pipeline run id
requested_at_utcstringRequest timestamp (UTC) or bulk-export generation timestamp
request_paramsstring (JSON)Request params / provenance captured by the pipeline
resultsstring (JSON)Full results array
response_jsonstring (JSON)Full raw API JSON payload when an API call happened; otherwise a synthetic payload in the same shape

hcpcs

All columns in this split are string (some are JSON-encoded strings).

columntypedescription
hcpcs_codestringHCPCS/CPT code
ef_short_descstring (JSON)extra_fields.short_desc (list)
ef_long_descstring (JSON)extra_fields.long_desc (list)
ef_add_dtstring (JSON)extra_fields.add_dt (list)
ef_act_eff_dtstring (JSON)extra_fields.act_eff_dt (list)
ef_term_dtstring (JSON)extra_fields.term_dt (list)
ef_obsoletestring (JSON)extra_fields.obsolete (list)
ef_is_nocstring (JSON)extra_fields.is_noc (list)
response_codesstring (JSON)Codes array returned by the API
response_displaystring (JSON)Display array returned by the API
response_extra_fieldsstring (JSON)Extra fields object returned by the API
urlstringRequest URL when an API call happened; otherwise a cache/fallback sentinel like hcpcs_cache:*
error_messagestring (nullable)Error message if lookup failed
api_run_idstringLocal pipeline run id
requested_at_utcstringRequest timestamp (UTC) or cache-export generation timestamp
request_paramsstring (JSON)Request params / provenance captured by the pipeline
response_jsonstring (JSON)Full raw API JSON payload when an API call happened; otherwise a synthetic payload in the same shape

Parquet Null / Empty-List Audit

<!-- BEGIN PARQUETNULLAUDIT --> Auto-generated by `./builddatasets.sh (or cargo run --release --manifest-path builddatasets/Cargo.toml -- --null-check`).

  • —Generated at (unix seconds): 1771173117
  • —NPI parquet: data/output/npi.parquet
  • —HCPCS parquet: data/output/hcpcs.parquet

Notes:

  • —null_count counts actual Parquet nulls.
  • —empty_list_count counts the literal string value "[]" (JSON-encoded empty list).

NPI (data/output/npi.parquet)

columnrows_totalnull_countnull_pctempty_list_countempty_list_pct
error_message1802136179956999.86%00.00%
other_names180213641760.23%165748591.97%
endpoints180213641760.23%159172788.32%
practice_locations180213641760.23%148027782.14%
identifiers180213641760.23%120884867.08%
addresses180213641760.23%200971.12%
taxonomies180213641760.23%200971.12%
basic180213641760.23%00.00%
results180213640650.23%1110.01%
response_json180213625670.14%00.00%
apirunid180213600.00%00.00%
npi180213600.00%00.00%
request_params180213600.00%00.00%
requestedatutc180213600.00%00.00%
url180213600.00%00.00%

HCPCS (data/output/hcpcs.parquet)

columnrows_totalnull_countnull_pctempty_list_countempty_list_pct
error_message10881627157.63%00.00%
efacteff_dt1088100.00%461042.37%
efadddt1088100.00%461042.37%
efisnoc1088100.00%461042.37%
eflongdesc1088100.00%461042.37%
ef_obsolete1088100.00%461042.37%
efshortdesc1088100.00%461042.37%
eftermdt1088100.00%461042.37%
response_codes1088100.00%461042.37%
response_display1088100.00%461042.37%
apirunid1088100.00%00.00%
hcpcs_code1088100.00%00.00%
request_params1088100.00%00.00%
requestedatutc1088100.00%00.00%
responseextrafields1088100.00%00.00%
response_json1088100.00%00.00%
url1088100.00%00.00%

<!-- END PARQUETNULLAUDIT -->

Unmapped / Unresolved Identifier Counts

For the build that produced this dataset:

  • —NPI: 24,272 unique NPIs were not successfully mapped/resolved (15,012 request errors; 9,260 not_found).
  • —Many of these were invalid NPI identifiers (4,111 unique): 2,928 non-numeric, 971 wrong-length, 205 checksum-invalid (Luhn), and 7 placeholders.
  • —Some NPIs have been inactive/deactivated in NPPES/NPI Registry (status can change over time); when present, check the registry payload for an active/inactive status (and/or NPPES deactivation fields) before treating an NPI as current.
  • —Full format breakdown from triage:
inferred typecount%meaning
npi_luhn_valid20,16183.06%looks like a well-formed NPI (10 digits + valid check digit)
non_numeric2,92812.06%contains non-digits (often needs upstream cleaning)
numeric_wrong_len9714.00%all digits but not 10 digits long
npi_luhn_invalid2050.84%10 digits, but invalid Luhn check digit
placeholder_or_invalid70.03%placeholder-like values (e.g., all zeros)
  • —HCPCS/CPT: 4,610 unique codes were not successfully mapped/resolved (4,608 not_found; 2 request errors).
  • —Full resolved/unresolved pattern breakdown from triage:
pattern familycount%
CPT_or_HCPCS_L1_5digit (5-digit CPT/HCPCS)2,16947.05%
HCPCS_level_II (A0000 style)47410.28%
CDT (D####)4499.74%
CPT_category_II (####F)3587.77%
alphanum_5char_unknown3106.72%
revenue_code_4digit2725.90%
4digit_plus_letter_other1242.69%
CPT_PLA (####U)1102.39%
CPT_category_III (####T)962.08%
word_or_flag781.69%
unknown571.24%
HCPCS_L2_plus_modifier390.85%
CPT_5digit_plus_modifier240.52%
drg_like_3digit150.33%
icd10pcs_like_7char110.24%
modifier_2char70.15%
numeric_6to8_unknown70.15%
placeholder_or_invalid60.13%
CDT_plus_suffix40.09%
  • —458 unique codes were flagged by triage as "needs review" (e.g., flags/words, placeholders, or unknown alphanumeric patterns).
  • —The 2 request errors are included in unknown (for example H)015, NT/WKN).