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

enumeration_type filter doesn't work in all cases #81

Open
wndowd opened this issue Nov 25, 2024 · 1 comment
Open

enumeration_type filter doesn't work in all cases #81

wndowd opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wndowd
Copy link

wndowd commented Nov 25, 2024

I've used npi quite a bit recently, and it works very well most of the time. However, in some cases the enumeration_type() filter seems not to work. See example below.

>library(npi)
> tmp = npi_search(state="NY", postal_code = "10461", address_purpose="location", limit=1200)
1200 records requested
Requesting records 0-200...
Requesting records 200-400...
Requesting records 400-600...
Requesting records 600-800...
Requesting records 800-1000...
Requesting records 1000-1200...

>#note: there are organizational NPIs in the search
> table(tmp$enumeration_type)

  Individual Organization 
        1056          144 

>#Now try with enumeration_type filter
> tmp = npi_search(state="NY", postal_code = "10461", address_purpose="location", limit=1200, enumeration_type = "org")
1200 records requested
Requesting records 0-200...
Requesting records 200-400...
Requesting records 400-600...
Requesting records 600-800...

>#Returns empty table
> table(tmp$enumeration_type)
< table of extent 0 >

The analogous API call does return output:

https://npiregistry.cms.hhs.gov/api/?enumeration_type=NPI-2&state=NY&postal_code=10461&limit=200&version=2.1

@frankfarach frankfarach self-assigned this Nov 27, 2024
@frankfarach frankfarach added the bug Something isn't working label Nov 27, 2024
@frankfarach
Copy link
Collaborator

Thank you for reporting this, @wndowd. I’ll investigate and see what might need to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants