You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
parmsam
changed the title
consider adding a function that creates a npi_results object and flatten automatically
consider adding a function that creates a npi_results object and flattens too
Apr 6, 2022
Thanks for the suggestion, @parmsam. Rather than add a new function, I would prefer to add a flatten argument to npi_search() itself:
npi_search(city = "New York City", flatten = TRUE)
If so, I think the default should be FALSE. I would still want to keep npi_flatten() of course. What do you think?
Just so you're aware, I'm going to be focused on responding to the rOpenSci peer review over the next couple of weeks. There are likely to be a lot of changes coming to the package, especially the documentation and error handling for npi_search().
Maybe something like this that performs both actions together:
npi_flat_search <- function( number = NULL,
enumeration_type = NULL,
taxonomy_description = NULL,
first_name = NULL,
last_name = NULL,
use_first_name_alias = NULL,
organization_name = NULL,
address_purpose = NULL,
city = NULL,
state = NULL,
postal_code = NULL,
country_code = NULL,
limit = 10L){
npi_results_obj <- npi::npi_search(number=number, enumeration_type=enumeration_type, taxonomy_description=taxonomy_description,
first_name=first_name, last_name=last_name, use_first_name_alias=use_first_name_alias,
organization_name=organization_name, address_purpose=address_purpose, city=city,
state=state, postal_code=postal_code, country_code=country_code, limit=limit)
npi::npi_flatten(npi_results_obj)
}
The text was updated successfully, but these errors were encountered: