Skip to content

andrewallenbruce/provider

Repository files navigation

provider provider website

Tidy Healthcare Provider API Interface

Ask DeepWiki zread Codecov test coverage CodeFactor code size

You can install provider from GitHub with:

# install.packages("pak")
pak::pak("andrewallenbruce/provider")

The provider package is a high-level interface designed to streamline access to publicly available healthcare provider data from the Centers for Medicare and Medicaid Services (CMS) and other federal sources. It provides a unified, tidy framework for querying complex datasets that are essential for medical coding, billing, and healthcare revenue cycle management.

🚀 Basic Usage Patterns

Most functions in provider follow a similar pattern: they accept identifiers (like an npi) or search criteria (like an org_name) and return a tibble.

library(provider)

🏢 Facility Affiliations

affiliations(last = "Bruce")
✔ affiliations returned 327 resultsRetrieving 1 page
# A tibble: 327 × 7
   first    last         npi pac        fac_type fac_ccn parent_ccn
   <chr>    <chr>      <int> <chr>      <chr>    <chr>   <chr>     
 1 SIDNEY   BRUCE 1003044520 2466795406 Hospital 150173  <NA>      
 2 SIDNEY   BRUCE 1003044520 2466795406 Hospital 151312  <NA>      
 3 SIDNEY   BRUCE 1003044520 2466795406 Hospital 151316  <NA>      
 4 MARGARET BRUCE 1003444332 0840619235 Hospital 500016  <NA>      
 5 LAUREN   BRUCE 1003863192 4385530377 Hospital 390331  <NA>      
 6 TIMOTHY  BRUCE 1013228907 7315239902 Hospital 520008  <NA>      
 7 SARAH    BRUCE 1023571882 8224498597 Hospital 390111  <NA>      
 8 SARAH    BRUCE 1023571882 8224498597 Hospital 450018  <NA>      
 9 DAVID    BRUCE 1043213069 6406929694 Hospital 190036  <NA>      
10 DAVID    BRUCE 1043634017 0840422127 Hospital 110107  <NA>      
# ℹ 317 more rows

🤝 Reassignment of Benefits

reassignments(
  org_enid = starts("I"), 
  members = greater(50, equal = TRUE))
✔ reassignments returned 52 resultsRetrieving 1 page
# A tibble: 52 × 13
   first   last  state specialty memberships    npi pac   enid  org_name members
   <chr>   <chr> <chr> <chr>           <int>  <int> <chr> <chr> <chr>      <int>
 1 Hilario AlvaTX    Family P2 1.83e9 6103I201<NA>          52
 2 James   BaggTX    Emergenc2 1.92e9 9638I200<NA>          52
 3 Todd    Baker TX    Family P2 1.37e9 5799I200<NA>          52
 4 Ami     BeshTX    Family P2 1.84e9 5193I200<NA>          52
 5 Dennis  BishTX    Emergenc7 1.86e9 2567I201<NA>          52
 6 CristiBlejTX    Family P2 1.32e9 3452I201<NA>          52
 7 James   Bugg  TX    Family P2 1.84e9 3274I201<NA>          52
 8 Richard CampTX    Emergenc2 1.89e9 5092I200<NA>          52
 9 John    Cantu TX    Family P2 1.01e9 8820I200<NA>          52
10 David   CartTX    Family P5 1.82e9 7416I201<NA>          52
# ℹ 42 more rows
# ℹ 3 more variables: org_pac <chr>, org_enid <chr>, org_state <chr>

👎 Revoked Medicare Providers

revocations(
  state = "GA", 
  org_name = not_blank())
✔ revocations returned 108 resultsRetrieving 1 page
# A tibble: 108 × 11
   org_name    first last  enid      npi multi state prov_desc reason start_date
   <chr>       <chr> <chr> <chr>   <int> <int> <chr> <chr>     <chr>  <date>    
 1 EMMANUEL O<NA>  <NA>  O2001.34e9     0 GA    PART B S424.52022-09-20
 2 COMPREHENS<NA>  <NA>  O2001.13e9     0 GA    PART B S424.52018-06-07
 3 RIVERSIDE<NA>  <NA>  O2001.31e9     0 GA    PART B S424.52017-03-08
 4 PAIN MANAG<NA>  <NA>  O2001.54e9     0 GA    PART B S424.52024-03-01
 5 DEEP SOUTH<NA>  <NA>  O2001.07e9     0 GA    PART B S424.52025-01-05
 6 SIGHT SAVE<NA>  <NA>  O200NA          0 GA    PART B S424.52019-06-12
 7 SENIOR PSY<NA>  <NA>  O2001.23e9     0 GA    PART B S424.52023-03-04
 8 WALLACE ST<NA>  <NA>  O2001.98e9     0 GA    PART B S424.52022-06-30
 9 FULGHUM DR<NA>  <NA>  O2001.41e9     1 GA    PART B S424.52019-07-31
10 AGAPE PRES<NA>  <NA>  O2001.47e9     0 GA    PART B S424.52019-10-29
# ℹ 98 more rows
# ℹ 1 more variable: end_date <date>

🪪 Clinician Demographics

clinicians(
  state = "GA", 
  school = not("OTHER"), 
  org_name = not_blank(),
  year = 2025)
✔ clinicians returned 163 resultsRetrieving 1 page
# A tibble: 163 × 17
   first    last    gender cred  school   grad_year specialty    npi pac   enid 
   <chr>    <chr>   <chr>  <chr> <chr>        <int> <chr>      <int> <chr> <chr>
 1 SUWARO   GASSAMA M      CNA   BAYLOR2025 CERTIFIE1.97e9 3274I2022 BRITTANY STENTO  F      <NA>  MERCER2025 PHYSICIA1.04e9 7214I2023 BRITTANY STENTO  F      <NA>  MERCER2025 PHYSICIA1.04e9 7214I2024 FOREST   HARDMAN M      <NA>  EDWARD2025 ANESTHES1.27e9 4880I2025 WESLEY   LONG    M      CNA   UNIVERS2025 CERTIFIE1.82e9 9638I2026 COLE     STUART  M      DC    LIFE CH2025 CHIROPRA1.54e9 6709I2027 NICHOLAS HADLEY  M      <NA>  UNIVERS2025 PHYSICAL1.19e9 3971I2028 JORDON   WALES   M      PT    MERCER2025 PHYSICAL1.85e9 8729I2029 REX      WALLACE M      NP    UNIVERS2025 FAMILY P1.63e9 9133I20210 TYLER    FISHER  M      OD    SOUTHER2025 OPTOMETRY 1.42e9 1254I202# ℹ 153 more rows
# ℹ 7 more variables: org_name <chr>, org_pac <chr>, members <int>,
#   address <chr>, city <chr>, state <chr>, zip <chr>
📤 Opt-Out Affidavits
opt_out(city = "Atlanta", state = "GA")
✔ opt_out returned 352 resultsRetrieving 1 pageorder_refer returned 150 resultsRetrieving 1 pageorder_refer returned 58 resultsRetrieving 1 page
# A tibble: 352 × 12
        npi first last  specialty start_date end_date   updated    address city 
 *    <int> <chr> <chr> <chr>     <date>     <date>     <date>     <chr>   <chr>
 1   1.88e9 Ana   AdelClinical2012-07-01 2026-07-01 2024-08-15 675 SEATLA2   1.68e9 SherBornClinical2012-04-01 2028-04-01 2026-04-16 990 HAATLA3   1.70e9 NichHume  Clinical2018-07-01 2026-07-01 2024-08-15 693 MOATLA4   1.31e9 KeriAnasNurse Pr2012-07-01 2026-07-01 2024-08-15 5780 PATLA5   1.60e9 Carol KranPsychiat2012-01-01 2028-01-01 2026-01-15 3133 MATLA6   1.12e9 LawrGiusPsychiat2012-07-01 2026-07-01 2024-08-15 1945 CATLA7   1.39e9 Ceana NezhObstetri2012-10-01 2026-10-01 2024-11-15 5555 PATLA8   1.07e9 Frank MataIntegrat2018-04-11 2028-04-11 2026-05-15 2296 HATLA9   1.07e9 ViktBouqGeneral2012-10-01 2026-10-01 2024-11-15 4646 NATLA10   1.79e9 WillOven  Clinical2017-01-23 2027-01-23 2025-02-15 2801 BATLA# ℹ 342 more rows
# ℹ 3 more variables: state <chr>, zip <chr>, order_refer <chr>
🧾 Order & Referral Eligibility
order_refer(
  first = "Jennifer", 
  last = "Smith",
  ptb = FALSE)
✔ order_refer returned 3 resultsRetrieving 1 page
# A tibble: 3 × 8
  first    last         npi ptb_ind dme_ind hha_ind pmd_ind hsp_ind
  <chr>    <chr>      <int>   <int>   <int>   <int>   <int>   <int>
1 JENNIFER SMITH 1265417687       0       1       0       1       0
2 JENNIFER SMITH 1538521992       0       1       0       0       0
3 JENNIFER SMITH 1306024922       0       1       0       0       0
🧑‍⚕️ Medicare Provider Enrollments
providers(
  state = "GA", 
  org_name = contains("West"))
✔ providers returned 144 resultsRetrieving 1 page
# A tibble: 144 × 10
   org_name       first last  state prov_type prov_desc    npi multi pac   enid 
   <chr>          <chr> <chr> <chr> <chr>     <chr>      <int> <int> <chr> <chr>
 1 WEST GEORGIA<NA>  <NA>  GA    12-70     PART B S1.01e9     0 2961O2002 WEST GEORGIA<NA>  <NA>  GA    30-48     DME SUPP1.01e9     0 2961O2013 WESTSIDE SURG<NA>  <NA>  GA    12-49     PART B S1.01e9     0 8224O2004 WEST GEORGIA<NA>  <NA>  GA    12-49     PART B S1.02e9     0 8224O2025 RADIOLOGY ASS<NA>  <NA>  GA    12-70     PART B S1.03e9     0 0941O2016 CANTON WEST C<NA>  <NA>  GA    12-70     PART B S1.04e9     0 1850O2027 HEALTHQWEST F<NA>  <NA>  GA    12-D5     PART B S1.04e9     1 7416O2028 NORTHWEST GEO<NA>  <NA>  GA    12-70     PART B S1.05e9     0 7315O2009 ATLANTA WEST<NA>  <NA>  GA    12-70     PART B S1.05e9     0 5597O20110 GEORGIA WEST<NA>  <NA>  GA    12-70     PART B S1.08e9     0 3577O200# ℹ 134 more rows
📆 Pending Enrollments
pending(
  first = starts("E"), 
  last = ends("A"))
✔ pending returned 40 resultsRetrieving 2 pages
# A tibble: 40 × 4
   prov_type first         last                  npi
   <chr>     <chr>         <chr>               <int>
 1 Physician EDGAR         PASTORA        1477255677
 2 Physician EDWIN MICHAEL SIA            1114949575
 3 Physician EIJIRO        YAMASHITA      1932893799
 4 Physician EILEEN        SANTA          1952440083
 5 Physician EKIN          SIMWATACHELA   1053057851
 6 Physician ELIAS         SALAMA         1508660655
 7 Physician ELIZABETH     PERAZZA        1942230891
 8 Physician ELYSSA        MOLINA         1508624891
 9 Physician EMANUEL       SALCEDO DAVILA 1104521640
10 Physician EMILY         ZONA           1194667014
# ℹ 30 more rows
🏥 Medicare Hospitals
hospitals(
  city = "Valdosta", 
  state = "GA")
✔ hospitals returned 3 resultsRetrieving 1 page
# A tibble: 3 × 16
  org_name     org_dba enid     npi multi ccn   pac   inc_date   org_type status
* <chr>        <chr>   <chr>  <int> <int> <chr> <chr> <date>     <chr>    <chr> 
1 GREENLEAF CGREENLO2011.54e9     0 114074162012-07-13 LLC      For-P2 SOUTH GEORGSGMC HO2021.14e9     0 110110522021-11-09 CorporaNon-P3 SOUTH GEORG<NA>    O2021.60e9     0 11T110522021-11-09 CorporaNon-P# ℹ 6 more variables: address <chr>, city <chr>, state <chr>, zip <chr>,
#   loc_type <chr>, sub_group <chr>
🧪 CLIA Laboratories
clia(
  fac_name = starts("SGMC"), 
  state = "GA")
✔ clia returned 32 resultsRetrieving 1 page
# A tibble: 32 × 21
   fac_name   fac_ccn clia_ccn chows  labs sites address city  state zip   term 
 * <chr>      <chr>   <chr>    <int> <int> <int> <chr>   <chr> <chr> <chr> <chr>
 1 SGMC HEAL11D002110122       0     1     0 2501 NVALDGA    31602 Acti2 SGMC- SMI11D002110037       0     1     0 4280 NVALDGA    31602 Acti3 SGMC WOME11D026<NA>         0     0     0 3312 NVALDGA    31605 Acti4 SGMC VALD11D02625858920     2     0 3207 CVALDGA    31605 Acti5 SGMC- LAN11D026110097       0     3     2 116 WELAKEGA    31635 Acti6 SGMC-BERR11D02611-0112      0     8     0 1221 ENASHGA    31639 Acti7 SGMC PRIM11D06925686440     0     0 410 COVALDGA    31602 Acti8 SGMC HEAL11D091<NA>         0     0     0 138 WELAKEGA    31635 Acti9 SGMC PRIM11D093<NA>         0     1     0 4370 KVALDGA    31602 Acti10 SGMC FAMI11D094<NA>         0     0     0 1225 ENASHGA    31639 Acti# ℹ 22 more rows
# ℹ 10 more variables: cert_type <chr>, fac_type <chr>, owner <chr>,
#   action <chr>, cert_date <date>, eff_date <date>, term_date <date>,
#   eligible <int>, multi <chr>, acr_org <chr>
🔎 Hospital Transparency Enforcement
transparency(
  action = "cap", 
  state = "GA")
✔ transparency returned 56 resultsRetrieving 1 page
# A tibble: 56 × 7
    case fac_name                         address city  state action action_date
   <int> <chr>                            <chr>   <chr> <chr> <chr>  <date>     
 1  7056 Jeff Davis Hospital              163 SHazlGA    CAP R2026-05-22 
 2  6976 Coffee Regional Medical Center   1101 ODougGA    CAP R2026-05-14 
 3  6968 Childrens Healthcare Of Atlanta1001 JAtlaGA    CAP R2026-05-13 
 4  6776 Colquitt Regional Medical Center 3131 SMoulGA    CAP R2026-05-06 
 5  6790 Emory HealthCare & Houston Heal1601 WWarnGA    CAP R2026-04-20 
 6  6782 Blue Ridge Medical Center        2855 OBlueGA    CAP R2026-04-15 
 7  6794 Flint River Hospital             509 SuMontGA    CAP R2026-04-15 
 8  6776 Colquitt Regional Medical Center 3131 SMoulGA    CAP R2026-04-10 
 9  6997 Dorminy Medical Center           200 PeFitzGA    CAP R2026-04-01 
10  7157 Phoebe Putney Memorial Hospital2000 PAlbaGA    CAP R2026-03-05 
# ℹ 46 more rows

⚖️ Code of Conduct

Please note that the provider project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

🏛️ Governance

This project is primarily maintained by Andrew Bruce. Other authors may occasionally assist with some of these duties.

About

Public Healthcare Provider APIs 🩺

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages