Closed andrewallenbruce closed 3 months ago
Testing out an implementation of the {pins} package, could wrap this approach into a function:
library(pins)
library(provider)
github_raw <- function(x) paste0("https://raw.githubusercontent.com/", x)
board <- board_url(github_raw("andrewallenbruce/provider/main/pkgdown/assets/pins-board/"))
board
#> Pin board <pins_board_url>
#> Cache size: 85.2K
board |> pin_list()
#> [1] "taxonomy_codes"
board |> pin_versions("taxonomy_codes")
#> # A tibble: 1 × 3
#> version created hash
#> <chr> <dttm> <chr>
#> 1 20231015T181028Z-2e167 2023-10-15 14:10:28 2e167
board |> pin_read("taxonomy_codes")
#> # A tibble: 874 × 9
#> taxonomy_code taxonomy_category taxonomy_grouping taxonomy_classificat…¹
#> <chr> <chr> <chr> <chr>
#> 1 193200000X Individual Group Multi-Specialty
#> 2 193400000X Individual Group Single Specialty
#> 3 207K00000X Individual Allopathic & Osteopat… Allergy & Immunology
#> 4 207KA0200X Individual Allopathic & Osteopat… Allergy & Immunology
#> 5 207KI0005X Individual Allopathic & Osteopat… Allergy & Immunology
#> 6 207L00000X Individual Allopathic & Osteopat… Anesthesiology
#> 7 207LA0401X Individual Allopathic & Osteopat… Anesthesiology
#> 8 207LC0200X Individual Allopathic & Osteopat… Anesthesiology
#> 9 207LH0002X Individual Allopathic & Osteopat… Anesthesiology
#> 10 207LP2900X Individual Allopathic & Osteopat… Anesthesiology
#> # ℹ 864 more rows
#> # ℹ abbreviated name: ¹taxonomy_classification
#> # ℹ 5 more variables: taxonomy_specialization <chr>,
#> # taxonomy_display_name <chr>, taxonomy_definition <chr>, version <dbl>,
#> # release_date <date>
Created on 2023-10-16 with reprex v2.0.2
library(provider)
taxonomy_codes(shape = 'wide')
#> # A tibble: 874 × 9
#> taxonomy_code taxonomy_category taxonomy_grouping taxonomy_classificat…¹
#> <chr> <chr> <chr> <chr>
#> 1 193200000X Individual Group Multi-Specialty
#> 2 193400000X Individual Group Single Specialty
#> 3 207K00000X Individual Allopathic & Osteopat… Allergy & Immunology
#> 4 207KA0200X Individual Allopathic & Osteopat… Allergy & Immunology
#> 5 207KI0005X Individual Allopathic & Osteopat… Allergy & Immunology
#> 6 207L00000X Individual Allopathic & Osteopat… Anesthesiology
#> 7 207LA0401X Individual Allopathic & Osteopat… Anesthesiology
#> 8 207LC0200X Individual Allopathic & Osteopat… Anesthesiology
#> 9 207LH0002X Individual Allopathic & Osteopat… Anesthesiology
#> 10 207LP2900X Individual Allopathic & Osteopat… Anesthesiology
#> # ℹ 864 more rows
#> # ℹ abbreviated name: ¹taxonomy_classification
#> # ℹ 5 more variables: taxonomy_specialization <chr>,
#> # taxonomy_display_name <chr>, taxonomy_definition <chr>, version <dbl>,
#> # release_date <date>
taxonomy_codes(shape = 'long')
#> # A tibble: 3,255 × 3
#> Code Level Description
#> <chr> <ord> <chr>
#> 1 193200000X I. Category Individual
#> 2 193200000X II. Grouping Group
#> 3 193200000X III. Classification Multi-Specialty
#> 4 193400000X I. Category Individual
#> 5 193400000X II. Grouping Group
#> 6 193400000X III. Classification Single Specialty
#> 7 207K00000X I. Category Individual
#> 8 207K00000X II. Grouping Allopathic & Osteopathic Physicians
#> 9 207K00000X III. Classification Allergy & Immunology
#> 10 207KA0200X I. Category Individual
#> # ℹ 3,245 more rows
Created on 2023-11-19 with reprex v2.0.2
Exploring the possibility of an implementation of retrieval and storage of the most current set of the NUCC Taxonomy Codeset.
Step 1: Get the provider's NPIs from their Medicare Enrollment
Step 2: Get the provider's Taxonomy Codes from NPPES
Step 3: Crosswalk the Taxonomies to Medicare Specialties
Step 4: Join Specialty data with the Taxonomy dataset
Created on 2023-10-15 with reprex v2.0.2