Skip to content
New issue

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

consider adding a function that creates a npi_results object and flattens too #61

Open
parmsam opened this issue Apr 6, 2022 · 2 comments

Comments

@parmsam
Copy link
Contributor

parmsam commented Apr 6, 2022

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)
}

@parmsam 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
@frankfarach
Copy link
Collaborator

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().

@parmsam
Copy link
Contributor Author

parmsam commented Apr 10, 2022

That sounds like a great idea. Got it. The rOpenSci peer review is more important. I can take a stab at adding that argument in the next week or two.

On a side note, let me know if you need any help with the documentation for the review. Feel free to assign me to a few of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants