Skip to content

Commit

Permalink
searching NPPES article
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewallenbruce committed Sep 1, 2022
1 parent 7b9145d commit 1056c16
Show file tree
Hide file tree
Showing 16 changed files with 482 additions and 32 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^pkgdown$
^\.github$
^CODE_OF_CONDUCT\.md$
^vignettes/articles$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.httr-oauth
.DS_Store
docs
inst/doc
11 changes: 10 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Description: The goal of {provider} is to provide performant and reliable
open-source tools to facilitate easy access to publicly available
healthcare provider data.
License: MIT + file LICENSE
URL: https://andrewallenbruce.github.io/provider/
URL: https://andrewallenbruce.github.io/provider/,
https://github.com/andrewallenbruce/provider
BugReports: https://github.com/andrewallenbruce/provider/issues
Depends:
R (>= 2.10)
Imports:
Expand All @@ -21,8 +23,15 @@ Imports:
tibble,
tidyr
Suggests:
gt,
gtExtras,
kableExtra,
knitr,
lobstr,
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Expand Down
13 changes: 13 additions & 0 deletions R/nppes_api_input.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#' Reference Table for NPPES API Search Parameters
#'
#' Reference table of search parameters and constraints
#' for the NPPES NPI Public Registry, per the API documentation.
#'
#' @format A data frame with 16 rows and 3 variables:
#' \describe{
#' \item{field}{NPPES search field}
#' \item{description}{Description of the search field}
#' \item{notes}{Notes detailing search parameters including constraints}
#' }
#' @source \url{https://npiregistry.cms.hhs.gov/registry/help-api}
"nppes_api_input"
14 changes: 14 additions & 0 deletions R/nppes_api_output.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#' Reference Table for NPPES API Output Parameters
#'
#' Reference table of output parameters
#' for the NPPES NPI Public Registry,
#' per the API documentation.
#'
#' @format A data frame with 90 rows and 3 variables:
#' \describe{
#' \item{group}{NPPES output group}
#' \item{field}{NPPES output field}
#' \item{description}{Description of the output field}
#' }
#' @source \url{https://npiregistry.cms.hhs.gov/registry/Json-Conversion-Field-Map}
"nppes_api_output"
1 change: 1 addition & 0 deletions R/nppes_location_reference.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#' per the NPPES API documentation. In addition, features region
#' and division observations for US states.
#'
#'
#' @format A data frame with 295 rows and 6 variables:
#' \describe{
#' \item{country_abb}{NPPES-approved valid abbreviation value for country}
Expand Down
6 changes: 4 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ knitr::opts_chunk$set(
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
[![code size](https://img.shields.io/github/languages/code-size/andrewallenbruce/provider.svg)](https://github.com/andrewallenbruce/provider)
[![last commit](https://img.shields.io/github/last-commit/andrewallenbruce/provider.svg)](https://github.com/andrewallenbruce/provider/commits/main)
<!-- badges: end -->

The goal of {provider} is to provide performant and reliable open-source tools to facilitate easy access to [healthcare provider](https://en.wikipedia.org/wiki/Health_care_provider) data through publicly available APIs & sources.
Expand All @@ -38,7 +40,7 @@ devtools::install_github("andrewallenbruce/provider")

## Search the NPPES by A Provider's NPI

Input the 10-digit NPI you wish to search for into `prov_npi_nppes()`:
Enter the 10-digit NPI you wish to search for into `prov_npi_nppes()`:

```{r warning=FALSE}
# Load library
Expand Down Expand Up @@ -86,7 +88,7 @@ And the final tidied results:
<br>

```{r echo=FALSE}
nppes_npi_unpacked |>
nppes_npi_unpacked[1:10, ] |>
dplyr::select(!c(
id,
middle_name,
Expand Down
42 changes: 18 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ has not yet been a stable, usable release suitable for the
public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![License:
MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
[![code
size](https://img.shields.io/github/languages/code-size/andrewallenbruce/provider.svg)](https://github.com/andrewallenbruce/provider)
[![last
commit](https://img.shields.io/github/last-commit/andrewallenbruce/provider.svg)](https://github.com/andrewallenbruce/provider/commits/main)
<!-- badges: end -->

The goal of {provider} is to provide performant and reliable open-source
Expand All @@ -35,7 +39,7 @@ devtools::install_github("andrewallenbruce/provider")

## Search the NPPES by A Provider’s NPI

Input the 10-digit NPI you wish to search for into `prov_npi_nppes()`:
Enter the 10-digit NPI you wish to search for into `prov_npi_nppes()`:

``` r
# Load library
Expand All @@ -57,7 +61,7 @@ went wrong) and a column called `data_lists`:
#> # A tibble: 1 × 4
#> search datetime outcome data_lists
#> <chr> <dttm> <chr> <list>
#> 1 1528060837 2022-08-31 15:18:57 results <df [1 × 11]>
#> 1 1528060837 2022-09-01 05:44:35 results <df [1 × 11]>

<br>

Expand Down Expand Up @@ -110,28 +114,18 @@ And the final tidied results:

<br>

| prov_type | npi | first_name | last_name | credential | gender | address_purpose | address_1 | city | state_abb | postal_code | telephone_number | address_2 | fax_number | taxon_code | taxon_desc | taxon_license | ident_desc | ident_issuer | identifier |
|:----------|:-----------|:-----------|:----------|:-----------|:-------|:----------------|:----------------------|:----------|:----------|:------------|:-----------------|:----------|:-------------|:-----------|:-------------------|:--------------|:-----------------------------|:-----------------------|:-----------|
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Aetna HMO | 0129008 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | DOL/OWCP | 146574500 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | United Healthcare | 230033 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | MDIPA/Alliance/MLH/OC | 38311 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Cigna | 4074069 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Aetna PPO | 4296824 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | MEDICARE ID-Type Unspecified | MCR Provider# | 575182E20 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | MCR Railroad retiremnt | 650003825 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | MEDICARE UPIN | NA | R23823 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | BC/BS Non Provider# | k366 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Aetna HMO | 0129008 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | DOL/OWCP | 146574500 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | United Healthcare | 230033 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | MDIPA/Alliance/MLH/OC | 38311 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Cigna | 4074069 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Aetna PPO | 4296824 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | MEDICARE ID-Type Unspecified | MCR Provider# | 575182E20 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | MCR Railroad retiremnt | 650003825 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | MEDICARE UPIN | NA | R23823 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | LOCATION | 6000 EXECUTIVE BLVD | ROCKVILLE | MD | 208523803 | 301-816-0020 | STE 201 | 301-816-0334 | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | BC/BS Non Provider# | k366 |
| prov_type | npi | first_name | last_name | credential | gender | address_purpose | address_1 | city | state_abb | postal_code | telephone_number | address_2 | fax_number | taxon_code | taxon_desc | taxon_license | ident_desc | ident_issuer | identifier |
|:----------|:-----------|:-----------|:----------|:-----------|:-------|:----------------|:----------------------|:---------|:----------|:------------|:-----------------|:----------|:-----------|:-----------|:-------------------|:--------------|:-----------------------------|:-----------------------|:-----------|
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Aetna HMO | 0129008 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | DOL/OWCP | 146574500 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | United Healthcare | 230033 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | MDIPA/Alliance/MLH/OC | 38311 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Cigna | 4074069 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | Aetna PPO | 4296824 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | MEDICARE ID-Type Unspecified | MCR Provider# | 575182E20 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | MCR Railroad retiremnt | 650003825 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | MEDICARE UPIN | NA | R23823 |
| NPI-1 | 1528060837 | JOHN | SARGEANT | PT | M | MAILING | 1939 OLD ANNAPOLIS RD | WOODBINE | MD | 217978201 | 301-854-6748 | NA | NA | 225100000X | Physical Therapist | 14262 | Other (non-Medicare) | BC/BS Non Provider# | k366 |

<br>

Expand Down
6 changes: 1 addition & 5 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ url: https://andrewallenbruce.github.io/provider/

template:
bootstrap: 5
bootswatch: sandstone
bootswatch: lux
bslib:
fg: "#440d0d"
bg: "#ffffff"
base_font: {google: "Roboto"}
heading_font: {google: "Roboto"}
code_font: {google: "Fira Code"}
Expand All @@ -16,8 +14,6 @@ home:
structure: [links, license, community, citation, authors, dev]

navbar:
bg: dark
type: dark
structure:
left:
- intro
Expand Down
Binary file added data/nppes_api_input.rda
Binary file not shown.
Binary file added data/nppes_api_output.rda
Binary file not shown.
25 changes: 25 additions & 0 deletions man/nppes_api_input.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions man/nppes_api_output.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
Loading

0 comments on commit 1056c16

Please sign in to comment.