National Plan and Provider Enumeration System (NPPES)

a.k.a. NPI Downloadable File, or full replacement Monthly NPI File, National Provider Identifier Standard (NPI).

Source

Grab the current Full Replacement Monthly NPI File from http://download.cms.gov/nppes/NPI_Files.html


In [1]:
url <- "http://download.cms.gov/nppes/NPPES_Data_Dissemination_Apr_2016.zip" # Update this URL as needed

Download and unzip the file


In [2]:
f <- tempfile()
download.file(url, f, mode="wb")
path <- tempdir()
unzip(f, exdir = path)
unzip(f, list=TRUE)


Out[2]:
NameLengthDate
1npidata_20050523-20160410.csv58813123092016-04-11 23:40:00
2npidata_20050523-20160410FileHeader.csv122492016-04-11 23:40:00
3NPPES Data Dissemination_Public File - Code Values.pdf3449182016-04-11 23:40:00
4NPPES Data Dissemination_Public File- Readme.pdf5202522016-04-11 23:40:00

Read the data file


In [3]:
library(data.table)
filenames <- unzip(f, list = TRUE)$Name
hdrFile <- grep("FileHeader\\.csv$", filenames, value = TRUE)
hdrFile <- file.path(path, hdrFile)
datFile <- grep("[0-9]\\.csv$", filenames, value = TRUE)
datFile <- file.path(path, datFile)
D <- fread(datFile)


Read 4860174 rows and 329 (of 329) columns from 5.477 GB file in 00:06:25

Substitute spaces in column names


In [4]:
oldvar <- names(D)
newvar <- gsub("\\(|\\)", "", gsub("\\s", "_", oldvar))
setnames(D, oldvar, newvar)

Show some examples


In [5]:
D[grep("OHSU", Provider_Other_Organization_Name), .(NPI, Provider_Other_Organization_Name)]


Out[5]:
NPIProvider_Other_Organization_Name
11609837574DIAGNOSTIC LAB OHSU DENTISTRY SCH
21609824010OHSU HOSPITALS AND CLINICS
31346263340OHSU OUTPATIENT PHARMACY
41417969304OHSU SCAPPOOSE RURAL HEALTH CLINIC
51982797155OHSU GABRIEL PARK PHARMACY
61790878965OHSU - CHH INFUSION PHARMACY
71790878973OHSU CHH RETAIL PHARMACY
81063596690OHSU SCHOOL OF DENTISTRY
91588748248OHSU DEPARTMENT OF OPHTHALMOLOGY
101972688919OHSU CHILD DEVELOPMENT & REHABILITATION CENTER
111740369818OHSU FACULTY DENTAL PRACTICE
121417036963OHSU FERTILITY CONSULTANTS
131851460638OHSU INTERCULTURAL PSYCHIATRIC PROGRAM (OHSU IPP)
141396800330OHSU RUSSELL STREET DENTAL CLINIC
151053454645OHSU DOERNBECHER CHILDRENS HOSP. PHARMACY
161922141415OHSU CASEY EYE INSTITUTE PHARMACY
171477675148OHSU RICHMOND HEALTH CENTER
181427263680OHSU BEHAVIORAL HEALTH CLINIC
191639356991OHSU MEDICAL GROUP IN LONGVIEW
201831368554OHSU SLEEP DISORDERS PROGRAM AT THE MARRIOTT
211851565493OHSU INTERCULTURAL PSYCH PROGRAM - EUGENE
221699929117OHSU SLEEP DISORDERS PROGRAM DME
231114164381OHSU KNIGHT CANCER INSTITUTE-BEAVERTON HEMATOLOGY AND ONCOLOGY OUTPATI
241952542540OHSU RICHMOND CLINIC PHARMACY
251437385036OHSU INTERCULTURAL PSYCHIATRIC PROGRAM
261770713224OHSU MAIL ORDER PHARMACY
271528396850OHSU CASEY EYE INSTITUTE AT CHH
281952630204OHSU LOWER COLUMBIA EYE CLINIC
291568780955OHSU CASEY EYE INSTITUTE AT ASTORIA
301336458140OHSU PARTNERSHIP PROJECT
311518253996OHSU KNIGHT DIAGNOSTIC LABORATORIES
321760760599OHSU CEI MOLECULAR DIAGNOSTIC LABORATORY
331073879268OHSU CHILD DEVELOPMENT & REHABILITATION CENTER
341104182369OHSU CARDIOLOGY HEART SERVICES
351487902706OHSU FAMILY MEDICINE AT RICHMOND WALK-IN CLINIC
361912259284OHSU INTERNAL MEDICINE AT MARQUAM HILL
371316354970OHSU AVEL GORDLY CENTER FOR HEALING
381154709426OHSU - INPATIENT PHARMACY
391750753687OHSU INTERCULTURAL PSYCHIATRIC PROGRAM

Show all the variables


In [6]:
names(D)


Out[6]:
  1. "NPI"
  2. "Entity_Type_Code"
  3. "Replacement_NPI"
  4. "Employer_Identification_Number_EIN"
  5. "Provider_Organization_Name_Legal_Business_Name"
  6. "Provider_Last_Name_Legal_Name"
  7. "Provider_First_Name"
  8. "Provider_Middle_Name"
  9. "Provider_Name_Prefix_Text"
  10. "Provider_Name_Suffix_Text"
  11. "Provider_Credential_Text"
  12. "Provider_Other_Organization_Name"
  13. "Provider_Other_Organization_Name_Type_Code"
  14. "Provider_Other_Last_Name"
  15. "Provider_Other_First_Name"
  16. "Provider_Other_Middle_Name"
  17. "Provider_Other_Name_Prefix_Text"
  18. "Provider_Other_Name_Suffix_Text"
  19. "Provider_Other_Credential_Text"
  20. "Provider_Other_Last_Name_Type_Code"
  21. "Provider_First_Line_Business_Mailing_Address"
  22. "Provider_Second_Line_Business_Mailing_Address"
  23. "Provider_Business_Mailing_Address_City_Name"
  24. "Provider_Business_Mailing_Address_State_Name"
  25. "Provider_Business_Mailing_Address_Postal_Code"
  26. "Provider_Business_Mailing_Address_Country_Code_If_outside_U.S."
  27. "Provider_Business_Mailing_Address_Telephone_Number"
  28. "Provider_Business_Mailing_Address_Fax_Number"
  29. "Provider_First_Line_Business_Practice_Location_Address"
  30. "Provider_Second_Line_Business_Practice_Location_Address"
  31. "Provider_Business_Practice_Location_Address_City_Name"
  32. "Provider_Business_Practice_Location_Address_State_Name"
  33. "Provider_Business_Practice_Location_Address_Postal_Code"
  34. "Provider_Business_Practice_Location_Address_Country_Code_If_outside_U.S."
  35. "Provider_Business_Practice_Location_Address_Telephone_Number"
  36. "Provider_Business_Practice_Location_Address_Fax_Number"
  37. "Provider_Enumeration_Date"
  38. "Last_Update_Date"
  39. "NPI_Deactivation_Reason_Code"
  40. "NPI_Deactivation_Date"
  41. "NPI_Reactivation_Date"
  42. "Provider_Gender_Code"
  43. "Authorized_Official_Last_Name"
  44. "Authorized_Official_First_Name"
  45. "Authorized_Official_Middle_Name"
  46. "Authorized_Official_Title_or_Position"
  47. "Authorized_Official_Telephone_Number"
  48. "Healthcare_Provider_Taxonomy_Code_1"
  49. "Provider_License_Number_1"
  50. "Provider_License_Number_State_Code_1"
  51. "Healthcare_Provider_Primary_Taxonomy_Switch_1"
  52. "Healthcare_Provider_Taxonomy_Code_2"
  53. "Provider_License_Number_2"
  54. "Provider_License_Number_State_Code_2"
  55. "Healthcare_Provider_Primary_Taxonomy_Switch_2"
  56. "Healthcare_Provider_Taxonomy_Code_3"
  57. "Provider_License_Number_3"
  58. "Provider_License_Number_State_Code_3"
  59. "Healthcare_Provider_Primary_Taxonomy_Switch_3"
  60. "Healthcare_Provider_Taxonomy_Code_4"
  61. "Provider_License_Number_4"
  62. "Provider_License_Number_State_Code_4"
  63. "Healthcare_Provider_Primary_Taxonomy_Switch_4"
  64. "Healthcare_Provider_Taxonomy_Code_5"
  65. "Provider_License_Number_5"
  66. "Provider_License_Number_State_Code_5"
  67. "Healthcare_Provider_Primary_Taxonomy_Switch_5"
  68. "Healthcare_Provider_Taxonomy_Code_6"
  69. "Provider_License_Number_6"
  70. "Provider_License_Number_State_Code_6"
  71. "Healthcare_Provider_Primary_Taxonomy_Switch_6"
  72. "Healthcare_Provider_Taxonomy_Code_7"
  73. "Provider_License_Number_7"
  74. "Provider_License_Number_State_Code_7"
  75. "Healthcare_Provider_Primary_Taxonomy_Switch_7"
  76. "Healthcare_Provider_Taxonomy_Code_8"
  77. "Provider_License_Number_8"
  78. "Provider_License_Number_State_Code_8"
  79. "Healthcare_Provider_Primary_Taxonomy_Switch_8"
  80. "Healthcare_Provider_Taxonomy_Code_9"
  81. "Provider_License_Number_9"
  82. "Provider_License_Number_State_Code_9"
  83. "Healthcare_Provider_Primary_Taxonomy_Switch_9"
  84. "Healthcare_Provider_Taxonomy_Code_10"
  85. "Provider_License_Number_10"
  86. "Provider_License_Number_State_Code_10"
  87. "Healthcare_Provider_Primary_Taxonomy_Switch_10"
  88. "Healthcare_Provider_Taxonomy_Code_11"
  89. "Provider_License_Number_11"
  90. "Provider_License_Number_State_Code_11"
  91. "Healthcare_Provider_Primary_Taxonomy_Switch_11"
  92. "Healthcare_Provider_Taxonomy_Code_12"
  93. "Provider_License_Number_12"
  94. "Provider_License_Number_State_Code_12"
  95. "Healthcare_Provider_Primary_Taxonomy_Switch_12"
  96. "Healthcare_Provider_Taxonomy_Code_13"
  97. "Provider_License_Number_13"
  98. "Provider_License_Number_State_Code_13"
  99. "Healthcare_Provider_Primary_Taxonomy_Switch_13"
  100. "Healthcare_Provider_Taxonomy_Code_14"
  101. "Provider_License_Number_14"
  102. "Provider_License_Number_State_Code_14"
  103. "Healthcare_Provider_Primary_Taxonomy_Switch_14"
  104. "Healthcare_Provider_Taxonomy_Code_15"
  105. "Provider_License_Number_15"
  106. "Provider_License_Number_State_Code_15"
  107. "Healthcare_Provider_Primary_Taxonomy_Switch_15"
  108. "Other_Provider_Identifier_1"
  109. "Other_Provider_Identifier_Type_Code_1"
  110. "Other_Provider_Identifier_State_1"
  111. "Other_Provider_Identifier_Issuer_1"
  112. "Other_Provider_Identifier_2"
  113. "Other_Provider_Identifier_Type_Code_2"
  114. "Other_Provider_Identifier_State_2"
  115. "Other_Provider_Identifier_Issuer_2"
  116. "Other_Provider_Identifier_3"
  117. "Other_Provider_Identifier_Type_Code_3"
  118. "Other_Provider_Identifier_State_3"
  119. "Other_Provider_Identifier_Issuer_3"
  120. "Other_Provider_Identifier_4"
  121. "Other_Provider_Identifier_Type_Code_4"
  122. "Other_Provider_Identifier_State_4"
  123. "Other_Provider_Identifier_Issuer_4"
  124. "Other_Provider_Identifier_5"
  125. "Other_Provider_Identifier_Type_Code_5"
  126. "Other_Provider_Identifier_State_5"
  127. "Other_Provider_Identifier_Issuer_5"
  128. "Other_Provider_Identifier_6"
  129. "Other_Provider_Identifier_Type_Code_6"
  130. "Other_Provider_Identifier_State_6"
  131. "Other_Provider_Identifier_Issuer_6"
  132. "Other_Provider_Identifier_7"
  133. "Other_Provider_Identifier_Type_Code_7"
  134. "Other_Provider_Identifier_State_7"
  135. "Other_Provider_Identifier_Issuer_7"
  136. "Other_Provider_Identifier_8"
  137. "Other_Provider_Identifier_Type_Code_8"
  138. "Other_Provider_Identifier_State_8"
  139. "Other_Provider_Identifier_Issuer_8"
  140. "Other_Provider_Identifier_9"
  141. "Other_Provider_Identifier_Type_Code_9"
  142. "Other_Provider_Identifier_State_9"
  143. "Other_Provider_Identifier_Issuer_9"
  144. "Other_Provider_Identifier_10"
  145. "Other_Provider_Identifier_Type_Code_10"
  146. "Other_Provider_Identifier_State_10"
  147. "Other_Provider_Identifier_Issuer_10"
  148. "Other_Provider_Identifier_11"
  149. "Other_Provider_Identifier_Type_Code_11"
  150. "Other_Provider_Identifier_State_11"
  151. "Other_Provider_Identifier_Issuer_11"
  152. "Other_Provider_Identifier_12"
  153. "Other_Provider_Identifier_Type_Code_12"
  154. "Other_Provider_Identifier_State_12"
  155. "Other_Provider_Identifier_Issuer_12"
  156. "Other_Provider_Identifier_13"
  157. "Other_Provider_Identifier_Type_Code_13"
  158. "Other_Provider_Identifier_State_13"
  159. "Other_Provider_Identifier_Issuer_13"
  160. "Other_Provider_Identifier_14"
  161. "Other_Provider_Identifier_Type_Code_14"
  162. "Other_Provider_Identifier_State_14"
  163. "Other_Provider_Identifier_Issuer_14"
  164. "Other_Provider_Identifier_15"
  165. "Other_Provider_Identifier_Type_Code_15"
  166. "Other_Provider_Identifier_State_15"
  167. "Other_Provider_Identifier_Issuer_15"
  168. "Other_Provider_Identifier_16"
  169. "Other_Provider_Identifier_Type_Code_16"
  170. "Other_Provider_Identifier_State_16"
  171. "Other_Provider_Identifier_Issuer_16"
  172. "Other_Provider_Identifier_17"
  173. "Other_Provider_Identifier_Type_Code_17"
  174. "Other_Provider_Identifier_State_17"
  175. "Other_Provider_Identifier_Issuer_17"
  176. "Other_Provider_Identifier_18"
  177. "Other_Provider_Identifier_Type_Code_18"
  178. "Other_Provider_Identifier_State_18"
  179. "Other_Provider_Identifier_Issuer_18"
  180. "Other_Provider_Identifier_19"
  181. "Other_Provider_Identifier_Type_Code_19"
  182. "Other_Provider_Identifier_State_19"
  183. "Other_Provider_Identifier_Issuer_19"
  184. "Other_Provider_Identifier_20"
  185. "Other_Provider_Identifier_Type_Code_20"
  186. "Other_Provider_Identifier_State_20"
  187. "Other_Provider_Identifier_Issuer_20"
  188. "Other_Provider_Identifier_21"
  189. "Other_Provider_Identifier_Type_Code_21"
  190. "Other_Provider_Identifier_State_21"
  191. "Other_Provider_Identifier_Issuer_21"
  192. "Other_Provider_Identifier_22"
  193. "Other_Provider_Identifier_Type_Code_22"
  194. "Other_Provider_Identifier_State_22"
  195. "Other_Provider_Identifier_Issuer_22"
  196. "Other_Provider_Identifier_23"
  197. "Other_Provider_Identifier_Type_Code_23"
  198. "Other_Provider_Identifier_State_23"
  199. "Other_Provider_Identifier_Issuer_23"
  200. "Other_Provider_Identifier_24"
  201. "Other_Provider_Identifier_Type_Code_24"
  202. "Other_Provider_Identifier_State_24"
  203. "Other_Provider_Identifier_Issuer_24"
  204. "Other_Provider_Identifier_25"
  205. "Other_Provider_Identifier_Type_Code_25"
  206. "Other_Provider_Identifier_State_25"
  207. "Other_Provider_Identifier_Issuer_25"
  208. "Other_Provider_Identifier_26"
  209. "Other_Provider_Identifier_Type_Code_26"
  210. "Other_Provider_Identifier_State_26"
  211. "Other_Provider_Identifier_Issuer_26"
  212. "Other_Provider_Identifier_27"
  213. "Other_Provider_Identifier_Type_Code_27"
  214. "Other_Provider_Identifier_State_27"
  215. "Other_Provider_Identifier_Issuer_27"
  216. "Other_Provider_Identifier_28"
  217. "Other_Provider_Identifier_Type_Code_28"
  218. "Other_Provider_Identifier_State_28"
  219. "Other_Provider_Identifier_Issuer_28"
  220. "Other_Provider_Identifier_29"
  221. "Other_Provider_Identifier_Type_Code_29"
  222. "Other_Provider_Identifier_State_29"
  223. "Other_Provider_Identifier_Issuer_29"
  224. "Other_Provider_Identifier_30"
  225. "Other_Provider_Identifier_Type_Code_30"
  226. "Other_Provider_Identifier_State_30"
  227. "Other_Provider_Identifier_Issuer_30"
  228. "Other_Provider_Identifier_31"
  229. "Other_Provider_Identifier_Type_Code_31"
  230. "Other_Provider_Identifier_State_31"
  231. "Other_Provider_Identifier_Issuer_31"
  232. "Other_Provider_Identifier_32"
  233. "Other_Provider_Identifier_Type_Code_32"
  234. "Other_Provider_Identifier_State_32"
  235. "Other_Provider_Identifier_Issuer_32"
  236. "Other_Provider_Identifier_33"
  237. "Other_Provider_Identifier_Type_Code_33"
  238. "Other_Provider_Identifier_State_33"
  239. "Other_Provider_Identifier_Issuer_33"
  240. "Other_Provider_Identifier_34"
  241. "Other_Provider_Identifier_Type_Code_34"
  242. "Other_Provider_Identifier_State_34"
  243. "Other_Provider_Identifier_Issuer_34"
  244. "Other_Provider_Identifier_35"
  245. "Other_Provider_Identifier_Type_Code_35"
  246. "Other_Provider_Identifier_State_35"
  247. "Other_Provider_Identifier_Issuer_35"
  248. "Other_Provider_Identifier_36"
  249. "Other_Provider_Identifier_Type_Code_36"
  250. "Other_Provider_Identifier_State_36"
  251. "Other_Provider_Identifier_Issuer_36"
  252. "Other_Provider_Identifier_37"
  253. "Other_Provider_Identifier_Type_Code_37"
  254. "Other_Provider_Identifier_State_37"
  255. "Other_Provider_Identifier_Issuer_37"
  256. "Other_Provider_Identifier_38"
  257. "Other_Provider_Identifier_Type_Code_38"
  258. "Other_Provider_Identifier_State_38"
  259. "Other_Provider_Identifier_Issuer_38"
  260. "Other_Provider_Identifier_39"
  261. "Other_Provider_Identifier_Type_Code_39"
  262. "Other_Provider_Identifier_State_39"
  263. "Other_Provider_Identifier_Issuer_39"
  264. "Other_Provider_Identifier_40"
  265. "Other_Provider_Identifier_Type_Code_40"
  266. "Other_Provider_Identifier_State_40"
  267. "Other_Provider_Identifier_Issuer_40"
  268. "Other_Provider_Identifier_41"
  269. "Other_Provider_Identifier_Type_Code_41"
  270. "Other_Provider_Identifier_State_41"
  271. "Other_Provider_Identifier_Issuer_41"
  272. "Other_Provider_Identifier_42"
  273. "Other_Provider_Identifier_Type_Code_42"
  274. "Other_Provider_Identifier_State_42"
  275. "Other_Provider_Identifier_Issuer_42"
  276. "Other_Provider_Identifier_43"
  277. "Other_Provider_Identifier_Type_Code_43"
  278. "Other_Provider_Identifier_State_43"
  279. "Other_Provider_Identifier_Issuer_43"
  280. "Other_Provider_Identifier_44"
  281. "Other_Provider_Identifier_Type_Code_44"
  282. "Other_Provider_Identifier_State_44"
  283. "Other_Provider_Identifier_Issuer_44"
  284. "Other_Provider_Identifier_45"
  285. "Other_Provider_Identifier_Type_Code_45"
  286. "Other_Provider_Identifier_State_45"
  287. "Other_Provider_Identifier_Issuer_45"
  288. "Other_Provider_Identifier_46"
  289. "Other_Provider_Identifier_Type_Code_46"
  290. "Other_Provider_Identifier_State_46"
  291. "Other_Provider_Identifier_Issuer_46"
  292. "Other_Provider_Identifier_47"
  293. "Other_Provider_Identifier_Type_Code_47"
  294. "Other_Provider_Identifier_State_47"
  295. "Other_Provider_Identifier_Issuer_47"
  296. "Other_Provider_Identifier_48"
  297. "Other_Provider_Identifier_Type_Code_48"
  298. "Other_Provider_Identifier_State_48"
  299. "Other_Provider_Identifier_Issuer_48"
  300. "Other_Provider_Identifier_49"
  301. "Other_Provider_Identifier_Type_Code_49"
  302. "Other_Provider_Identifier_State_49"
  303. "Other_Provider_Identifier_Issuer_49"
  304. "Other_Provider_Identifier_50"
  305. "Other_Provider_Identifier_Type_Code_50"
  306. "Other_Provider_Identifier_State_50"
  307. "Other_Provider_Identifier_Issuer_50"
  308. "Is_Sole_Proprietor"
  309. "Is_Organization_Subpart"
  310. "Parent_Organization_LBN"
  311. "Parent_Organization_TIN"
  312. "Authorized_Official_Name_Prefix_Text"
  313. "Authorized_Official_Name_Suffix_Text"
  314. "Authorized_Official_Credential_Text"
  315. "Healthcare_Provider_Taxonomy_Group_1"
  316. "Healthcare_Provider_Taxonomy_Group_2"
  317. "Healthcare_Provider_Taxonomy_Group_3"
  318. "Healthcare_Provider_Taxonomy_Group_4"
  319. "Healthcare_Provider_Taxonomy_Group_5"
  320. "Healthcare_Provider_Taxonomy_Group_6"
  321. "Healthcare_Provider_Taxonomy_Group_7"
  322. "Healthcare_Provider_Taxonomy_Group_8"
  323. "Healthcare_Provider_Taxonomy_Group_9"
  324. "Healthcare_Provider_Taxonomy_Group_10"
  325. "Healthcare_Provider_Taxonomy_Group_11"
  326. "Healthcare_Provider_Taxonomy_Group_12"
  327. "Healthcare_Provider_Taxonomy_Group_13"
  328. "Healthcare_Provider_Taxonomy_Group_14"
  329. "Healthcare_Provider_Taxonomy_Group_15"