R/utils.R
npi_is_valid.Rd
Check whether a number is a valid NPI number per the specifications detailed in the Final Rule for the Standard Unique Health Identifier for Health Care Providers (69 FR 3434).
npi_is_valid(x)
10-digit candidate NPI number
Boolean indicating whether npi is valid
npi
http://scott.sherrillmix.com/blog/tag/luhn-algorithm/
https://www.cms.gov/Regulations-and-Guidance/Administrative-Simplification/NationalProvIdentStand/Downloads/NPIcheckdigit.pdf
npi_is_valid(1234567893) #> [1] TRUE npi_is_valid(1234567898) #> [1] FALSE