We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
order_refer
opt_out
library(provider) library(tidyverse) x <- opt_out(city = "Valdosta", state = "GA") #> # A tibble: 3 × 12 #> npi first last specialty order_refer optout_start_date optout_end_date #> <chr> <chr> <chr> <chr> <lgl> <date> <date> #> 1 1992848659 Jeff… Wood Maxillof… TRUE 2016-01-11 2024-01-11 #> 2 1073632659 Fern… Alva… Oral Sur… TRUE 2017-07-01 2025-07-01 #> 3 1811005655 Sonya Merr… Plastic … TRUE 2022-01-01 2024-01-01 y <- x |> dplyr::filter(order_refer == TRUE) |> dplyr::pull(npi) |> purrr::map(\(x) order_refer(npi = x)) |> purrr::list_rbind() |> dplyr::select(npi, service) |> dplyr::nest_by(npi, .key = 'eligibility') #> # A tibble: 3 × 2 #> # Rowwise: npi #> npi eligibility #> <chr> <list<tibble[,1]>> #> 1 1073632659 [3 × 1] #> 2 1811005655 [4 × 1] #> 3 1992848659 [4 × 1] z <- dplyr::left_join(x, y, by = dplyr::join_by(npi)) |> dplyr::relocate(eligibility, .after = order_refer) #> # A tibble: 3 × 13 #> npi first last specialty order_refer eligibility optout_start_date #> <chr> <chr> <chr> <chr> <lgl> <list<tibb> <date> #> 1 1992848659 Jeffery Wood Maxillof… TRUE [4 × 1] 2016-01-11 #> 2 1073632659 Fernando Alvar… Oral Sur… TRUE [3 × 1] 2017-07-01 #> 3 1811005655 Sonya Merri… Plastic … TRUE [4 × 1] 2022-01-01 tidyr::unnest(z, eligibility) #> # A tibble: 11 × 13 #> npi first last specialty order_refer service optout_start_date #> <chr> <chr> <chr> <chr> <lgl> <chr> <date> #> 1 1992848659 Jeffery Wood Maxillofa… TRUE Medica… 2016-01-11 #> 2 1992848659 Jeffery Wood Maxillofa… TRUE Home H… 2016-01-11 #> 3 1992848659 Jeffery Wood Maxillofa… TRUE Durabl… 2016-01-11 #> 4 1992848659 Jeffery Wood Maxillofa… TRUE Power … 2016-01-11 #> 5 1073632659 Fernando Alvarado Oral Surg… TRUE Medica… 2017-07-01 #> 6 1073632659 Fernando Alvarado Oral Surg… TRUE Home H… 2017-07-01 #> 7 1073632659 Fernando Alvarado Oral Surg… TRUE Durabl… 2017-07-01 #> 8 1811005655 Sonya Merriman Plastic A… TRUE Medica… 2022-01-01 #> 9 1811005655 Sonya Merriman Plastic A… TRUE Home H… 2022-01-01 #> 10 1811005655 Sonya Merriman Plastic A… TRUE Durabl… 2022-01-01 #> 11 1811005655 Sonya Merriman Plastic A… TRUE Power … 2022-01-01
Created on 2023-10-24 with reprex v2.0.2
The text was updated successfully, but these errors were encountered:
andrewallenbruce
No branches or pull requests
Created on 2023-10-24 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: