a.k.a. NPI Downloadable File, or full replacement Monthly NPI File, National Provider Identifier Standard (NPI).
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]:
Name Length Date
1 npidata_20050523-20160410.csv 5881312309 2016-04-11 23:40:00
2 npidata_20050523-20160410FileHeader.csv 12249 2016-04-11 23:40:00
3 NPPES Data Dissemination_Public File - Code Values.pdf 344918 2016-04-11 23:40:00
4 NPPES Data Dissemination_Public File- Readme.pdf 520252 2016-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]:
NPI Provider_Other_Organization_Name
1 1609837574 DIAGNOSTIC LAB OHSU DENTISTRY SCH
2 1609824010 OHSU HOSPITALS AND CLINICS
3 1346263340 OHSU OUTPATIENT PHARMACY
4 1417969304 OHSU SCAPPOOSE RURAL HEALTH CLINIC
5 1982797155 OHSU GABRIEL PARK PHARMACY
6 1790878965 OHSU - CHH INFUSION PHARMACY
7 1790878973 OHSU CHH RETAIL PHARMACY
8 1063596690 OHSU SCHOOL OF DENTISTRY
9 1588748248 OHSU DEPARTMENT OF OPHTHALMOLOGY
10 1972688919 OHSU CHILD DEVELOPMENT & REHABILITATION CENTER
11 1740369818 OHSU FACULTY DENTAL PRACTICE
12 1417036963 OHSU FERTILITY CONSULTANTS
13 1851460638 OHSU INTERCULTURAL PSYCHIATRIC PROGRAM (OHSU IPP)
14 1396800330 OHSU RUSSELL STREET DENTAL CLINIC
15 1053454645 OHSU DOERNBECHER CHILDRENS HOSP. PHARMACY
16 1922141415 OHSU CASEY EYE INSTITUTE PHARMACY
17 1477675148 OHSU RICHMOND HEALTH CENTER
18 1427263680 OHSU BEHAVIORAL HEALTH CLINIC
19 1639356991 OHSU MEDICAL GROUP IN LONGVIEW
20 1831368554 OHSU SLEEP DISORDERS PROGRAM AT THE MARRIOTT
21 1851565493 OHSU INTERCULTURAL PSYCH PROGRAM - EUGENE
22 1699929117 OHSU SLEEP DISORDERS PROGRAM DME
23 1114164381 OHSU KNIGHT CANCER INSTITUTE-BEAVERTON HEMATOLOGY AND ONCOLOGY OUTPATI
24 1952542540 OHSU RICHMOND CLINIC PHARMACY
25 1437385036 OHSU INTERCULTURAL PSYCHIATRIC PROGRAM
26 1770713224 OHSU MAIL ORDER PHARMACY
27 1528396850 OHSU CASEY EYE INSTITUTE AT CHH
28 1952630204 OHSU LOWER COLUMBIA EYE CLINIC
29 1568780955 OHSU CASEY EYE INSTITUTE AT ASTORIA
30 1336458140 OHSU PARTNERSHIP PROJECT
31 1518253996 OHSU KNIGHT DIAGNOSTIC LABORATORIES
32 1760760599 OHSU CEI MOLECULAR DIAGNOSTIC LABORATORY
33 1073879268 OHSU CHILD DEVELOPMENT & REHABILITATION CENTER
34 1104182369 OHSU CARDIOLOGY HEART SERVICES
35 1487902706 OHSU FAMILY MEDICINE AT RICHMOND WALK-IN CLINIC
36 1912259284 OHSU INTERNAL MEDICINE AT MARQUAM HILL
37 1316354970 OHSU AVEL GORDLY CENTER FOR HEALING
38 1154709426 OHSU - INPATIENT PHARMACY
39 1750753687 OHSU INTERCULTURAL PSYCHIATRIC PROGRAM
Show all the variables
In [6]:
names(D)
Out[6]:
- "NPI"
- "Entity_Type_Code"
- "Replacement_NPI"
- "Employer_Identification_Number_EIN"
- "Provider_Organization_Name_Legal_Business_Name"
- "Provider_Last_Name_Legal_Name"
- "Provider_First_Name"
- "Provider_Middle_Name"
- "Provider_Name_Prefix_Text"
- "Provider_Name_Suffix_Text"
- "Provider_Credential_Text"
- "Provider_Other_Organization_Name"
- "Provider_Other_Organization_Name_Type_Code"
- "Provider_Other_Last_Name"
- "Provider_Other_First_Name"
- "Provider_Other_Middle_Name"
- "Provider_Other_Name_Prefix_Text"
- "Provider_Other_Name_Suffix_Text"
- "Provider_Other_Credential_Text"
- "Provider_Other_Last_Name_Type_Code"
- "Provider_First_Line_Business_Mailing_Address"
- "Provider_Second_Line_Business_Mailing_Address"
- "Provider_Business_Mailing_Address_City_Name"
- "Provider_Business_Mailing_Address_State_Name"
- "Provider_Business_Mailing_Address_Postal_Code"
- "Provider_Business_Mailing_Address_Country_Code_If_outside_U.S."
- "Provider_Business_Mailing_Address_Telephone_Number"
- "Provider_Business_Mailing_Address_Fax_Number"
- "Provider_First_Line_Business_Practice_Location_Address"
- "Provider_Second_Line_Business_Practice_Location_Address"
- "Provider_Business_Practice_Location_Address_City_Name"
- "Provider_Business_Practice_Location_Address_State_Name"
- "Provider_Business_Practice_Location_Address_Postal_Code"
- "Provider_Business_Practice_Location_Address_Country_Code_If_outside_U.S."
- "Provider_Business_Practice_Location_Address_Telephone_Number"
- "Provider_Business_Practice_Location_Address_Fax_Number"
- "Provider_Enumeration_Date"
- "Last_Update_Date"
- "NPI_Deactivation_Reason_Code"
- "NPI_Deactivation_Date"
- "NPI_Reactivation_Date"
- "Provider_Gender_Code"
- "Authorized_Official_Last_Name"
- "Authorized_Official_First_Name"
- "Authorized_Official_Middle_Name"
- "Authorized_Official_Title_or_Position"
- "Authorized_Official_Telephone_Number"
- "Healthcare_Provider_Taxonomy_Code_1"
- "Provider_License_Number_1"
- "Provider_License_Number_State_Code_1"
- "Healthcare_Provider_Primary_Taxonomy_Switch_1"
- "Healthcare_Provider_Taxonomy_Code_2"
- "Provider_License_Number_2"
- "Provider_License_Number_State_Code_2"
- "Healthcare_Provider_Primary_Taxonomy_Switch_2"
- "Healthcare_Provider_Taxonomy_Code_3"
- "Provider_License_Number_3"
- "Provider_License_Number_State_Code_3"
- "Healthcare_Provider_Primary_Taxonomy_Switch_3"
- "Healthcare_Provider_Taxonomy_Code_4"
- "Provider_License_Number_4"
- "Provider_License_Number_State_Code_4"
- "Healthcare_Provider_Primary_Taxonomy_Switch_4"
- "Healthcare_Provider_Taxonomy_Code_5"
- "Provider_License_Number_5"
- "Provider_License_Number_State_Code_5"
- "Healthcare_Provider_Primary_Taxonomy_Switch_5"
- "Healthcare_Provider_Taxonomy_Code_6"
- "Provider_License_Number_6"
- "Provider_License_Number_State_Code_6"
- "Healthcare_Provider_Primary_Taxonomy_Switch_6"
- "Healthcare_Provider_Taxonomy_Code_7"
- "Provider_License_Number_7"
- "Provider_License_Number_State_Code_7"
- "Healthcare_Provider_Primary_Taxonomy_Switch_7"
- "Healthcare_Provider_Taxonomy_Code_8"
- "Provider_License_Number_8"
- "Provider_License_Number_State_Code_8"
- "Healthcare_Provider_Primary_Taxonomy_Switch_8"
- "Healthcare_Provider_Taxonomy_Code_9"
- "Provider_License_Number_9"
- "Provider_License_Number_State_Code_9"
- "Healthcare_Provider_Primary_Taxonomy_Switch_9"
- "Healthcare_Provider_Taxonomy_Code_10"
- "Provider_License_Number_10"
- "Provider_License_Number_State_Code_10"
- "Healthcare_Provider_Primary_Taxonomy_Switch_10"
- "Healthcare_Provider_Taxonomy_Code_11"
- "Provider_License_Number_11"
- "Provider_License_Number_State_Code_11"
- "Healthcare_Provider_Primary_Taxonomy_Switch_11"
- "Healthcare_Provider_Taxonomy_Code_12"
- "Provider_License_Number_12"
- "Provider_License_Number_State_Code_12"
- "Healthcare_Provider_Primary_Taxonomy_Switch_12"
- "Healthcare_Provider_Taxonomy_Code_13"
- "Provider_License_Number_13"
- "Provider_License_Number_State_Code_13"
- "Healthcare_Provider_Primary_Taxonomy_Switch_13"
- "Healthcare_Provider_Taxonomy_Code_14"
- "Provider_License_Number_14"
- "Provider_License_Number_State_Code_14"
- "Healthcare_Provider_Primary_Taxonomy_Switch_14"
- "Healthcare_Provider_Taxonomy_Code_15"
- "Provider_License_Number_15"
- "Provider_License_Number_State_Code_15"
- "Healthcare_Provider_Primary_Taxonomy_Switch_15"
- "Other_Provider_Identifier_1"
- "Other_Provider_Identifier_Type_Code_1"
- "Other_Provider_Identifier_State_1"
- "Other_Provider_Identifier_Issuer_1"
- "Other_Provider_Identifier_2"
- "Other_Provider_Identifier_Type_Code_2"
- "Other_Provider_Identifier_State_2"
- "Other_Provider_Identifier_Issuer_2"
- "Other_Provider_Identifier_3"
- "Other_Provider_Identifier_Type_Code_3"
- "Other_Provider_Identifier_State_3"
- "Other_Provider_Identifier_Issuer_3"
- "Other_Provider_Identifier_4"
- "Other_Provider_Identifier_Type_Code_4"
- "Other_Provider_Identifier_State_4"
- "Other_Provider_Identifier_Issuer_4"
- "Other_Provider_Identifier_5"
- "Other_Provider_Identifier_Type_Code_5"
- "Other_Provider_Identifier_State_5"
- "Other_Provider_Identifier_Issuer_5"
- "Other_Provider_Identifier_6"
- "Other_Provider_Identifier_Type_Code_6"
- "Other_Provider_Identifier_State_6"
- "Other_Provider_Identifier_Issuer_6"
- "Other_Provider_Identifier_7"
- "Other_Provider_Identifier_Type_Code_7"
- "Other_Provider_Identifier_State_7"
- "Other_Provider_Identifier_Issuer_7"
- "Other_Provider_Identifier_8"
- "Other_Provider_Identifier_Type_Code_8"
- "Other_Provider_Identifier_State_8"
- "Other_Provider_Identifier_Issuer_8"
- "Other_Provider_Identifier_9"
- "Other_Provider_Identifier_Type_Code_9"
- "Other_Provider_Identifier_State_9"
- "Other_Provider_Identifier_Issuer_9"
- "Other_Provider_Identifier_10"
- "Other_Provider_Identifier_Type_Code_10"
- "Other_Provider_Identifier_State_10"
- "Other_Provider_Identifier_Issuer_10"
- "Other_Provider_Identifier_11"
- "Other_Provider_Identifier_Type_Code_11"
- "Other_Provider_Identifier_State_11"
- "Other_Provider_Identifier_Issuer_11"
- "Other_Provider_Identifier_12"
- "Other_Provider_Identifier_Type_Code_12"
- "Other_Provider_Identifier_State_12"
- "Other_Provider_Identifier_Issuer_12"
- "Other_Provider_Identifier_13"
- "Other_Provider_Identifier_Type_Code_13"
- "Other_Provider_Identifier_State_13"
- "Other_Provider_Identifier_Issuer_13"
- "Other_Provider_Identifier_14"
- "Other_Provider_Identifier_Type_Code_14"
- "Other_Provider_Identifier_State_14"
- "Other_Provider_Identifier_Issuer_14"
- "Other_Provider_Identifier_15"
- "Other_Provider_Identifier_Type_Code_15"
- "Other_Provider_Identifier_State_15"
- "Other_Provider_Identifier_Issuer_15"
- "Other_Provider_Identifier_16"
- "Other_Provider_Identifier_Type_Code_16"
- "Other_Provider_Identifier_State_16"
- "Other_Provider_Identifier_Issuer_16"
- "Other_Provider_Identifier_17"
- "Other_Provider_Identifier_Type_Code_17"
- "Other_Provider_Identifier_State_17"
- "Other_Provider_Identifier_Issuer_17"
- "Other_Provider_Identifier_18"
- "Other_Provider_Identifier_Type_Code_18"
- "Other_Provider_Identifier_State_18"
- "Other_Provider_Identifier_Issuer_18"
- "Other_Provider_Identifier_19"
- "Other_Provider_Identifier_Type_Code_19"
- "Other_Provider_Identifier_State_19"
- "Other_Provider_Identifier_Issuer_19"
- "Other_Provider_Identifier_20"
- "Other_Provider_Identifier_Type_Code_20"
- "Other_Provider_Identifier_State_20"
- "Other_Provider_Identifier_Issuer_20"
- "Other_Provider_Identifier_21"
- "Other_Provider_Identifier_Type_Code_21"
- "Other_Provider_Identifier_State_21"
- "Other_Provider_Identifier_Issuer_21"
- "Other_Provider_Identifier_22"
- "Other_Provider_Identifier_Type_Code_22"
- "Other_Provider_Identifier_State_22"
- "Other_Provider_Identifier_Issuer_22"
- "Other_Provider_Identifier_23"
- "Other_Provider_Identifier_Type_Code_23"
- "Other_Provider_Identifier_State_23"
- "Other_Provider_Identifier_Issuer_23"
- "Other_Provider_Identifier_24"
- "Other_Provider_Identifier_Type_Code_24"
- "Other_Provider_Identifier_State_24"
- "Other_Provider_Identifier_Issuer_24"
- "Other_Provider_Identifier_25"
- "Other_Provider_Identifier_Type_Code_25"
- "Other_Provider_Identifier_State_25"
- "Other_Provider_Identifier_Issuer_25"
- "Other_Provider_Identifier_26"
- "Other_Provider_Identifier_Type_Code_26"
- "Other_Provider_Identifier_State_26"
- "Other_Provider_Identifier_Issuer_26"
- "Other_Provider_Identifier_27"
- "Other_Provider_Identifier_Type_Code_27"
- "Other_Provider_Identifier_State_27"
- "Other_Provider_Identifier_Issuer_27"
- "Other_Provider_Identifier_28"
- "Other_Provider_Identifier_Type_Code_28"
- "Other_Provider_Identifier_State_28"
- "Other_Provider_Identifier_Issuer_28"
- "Other_Provider_Identifier_29"
- "Other_Provider_Identifier_Type_Code_29"
- "Other_Provider_Identifier_State_29"
- "Other_Provider_Identifier_Issuer_29"
- "Other_Provider_Identifier_30"
- "Other_Provider_Identifier_Type_Code_30"
- "Other_Provider_Identifier_State_30"
- "Other_Provider_Identifier_Issuer_30"
- "Other_Provider_Identifier_31"
- "Other_Provider_Identifier_Type_Code_31"
- "Other_Provider_Identifier_State_31"
- "Other_Provider_Identifier_Issuer_31"
- "Other_Provider_Identifier_32"
- "Other_Provider_Identifier_Type_Code_32"
- "Other_Provider_Identifier_State_32"
- "Other_Provider_Identifier_Issuer_32"
- "Other_Provider_Identifier_33"
- "Other_Provider_Identifier_Type_Code_33"
- "Other_Provider_Identifier_State_33"
- "Other_Provider_Identifier_Issuer_33"
- "Other_Provider_Identifier_34"
- "Other_Provider_Identifier_Type_Code_34"
- "Other_Provider_Identifier_State_34"
- "Other_Provider_Identifier_Issuer_34"
- "Other_Provider_Identifier_35"
- "Other_Provider_Identifier_Type_Code_35"
- "Other_Provider_Identifier_State_35"
- "Other_Provider_Identifier_Issuer_35"
- "Other_Provider_Identifier_36"
- "Other_Provider_Identifier_Type_Code_36"
- "Other_Provider_Identifier_State_36"
- "Other_Provider_Identifier_Issuer_36"
- "Other_Provider_Identifier_37"
- "Other_Provider_Identifier_Type_Code_37"
- "Other_Provider_Identifier_State_37"
- "Other_Provider_Identifier_Issuer_37"
- "Other_Provider_Identifier_38"
- "Other_Provider_Identifier_Type_Code_38"
- "Other_Provider_Identifier_State_38"
- "Other_Provider_Identifier_Issuer_38"
- "Other_Provider_Identifier_39"
- "Other_Provider_Identifier_Type_Code_39"
- "Other_Provider_Identifier_State_39"
- "Other_Provider_Identifier_Issuer_39"
- "Other_Provider_Identifier_40"
- "Other_Provider_Identifier_Type_Code_40"
- "Other_Provider_Identifier_State_40"
- "Other_Provider_Identifier_Issuer_40"
- "Other_Provider_Identifier_41"
- "Other_Provider_Identifier_Type_Code_41"
- "Other_Provider_Identifier_State_41"
- "Other_Provider_Identifier_Issuer_41"
- "Other_Provider_Identifier_42"
- "Other_Provider_Identifier_Type_Code_42"
- "Other_Provider_Identifier_State_42"
- "Other_Provider_Identifier_Issuer_42"
- "Other_Provider_Identifier_43"
- "Other_Provider_Identifier_Type_Code_43"
- "Other_Provider_Identifier_State_43"
- "Other_Provider_Identifier_Issuer_43"
- "Other_Provider_Identifier_44"
- "Other_Provider_Identifier_Type_Code_44"
- "Other_Provider_Identifier_State_44"
- "Other_Provider_Identifier_Issuer_44"
- "Other_Provider_Identifier_45"
- "Other_Provider_Identifier_Type_Code_45"
- "Other_Provider_Identifier_State_45"
- "Other_Provider_Identifier_Issuer_45"
- "Other_Provider_Identifier_46"
- "Other_Provider_Identifier_Type_Code_46"
- "Other_Provider_Identifier_State_46"
- "Other_Provider_Identifier_Issuer_46"
- "Other_Provider_Identifier_47"
- "Other_Provider_Identifier_Type_Code_47"
- "Other_Provider_Identifier_State_47"
- "Other_Provider_Identifier_Issuer_47"
- "Other_Provider_Identifier_48"
- "Other_Provider_Identifier_Type_Code_48"
- "Other_Provider_Identifier_State_48"
- "Other_Provider_Identifier_Issuer_48"
- "Other_Provider_Identifier_49"
- "Other_Provider_Identifier_Type_Code_49"
- "Other_Provider_Identifier_State_49"
- "Other_Provider_Identifier_Issuer_49"
- "Other_Provider_Identifier_50"
- "Other_Provider_Identifier_Type_Code_50"
- "Other_Provider_Identifier_State_50"
- "Other_Provider_Identifier_Issuer_50"
- "Is_Sole_Proprietor"
- "Is_Organization_Subpart"
- "Parent_Organization_LBN"
- "Parent_Organization_TIN"
- "Authorized_Official_Name_Prefix_Text"
- "Authorized_Official_Name_Suffix_Text"
- "Authorized_Official_Credential_Text"
- "Healthcare_Provider_Taxonomy_Group_1"
- "Healthcare_Provider_Taxonomy_Group_2"
- "Healthcare_Provider_Taxonomy_Group_3"
- "Healthcare_Provider_Taxonomy_Group_4"
- "Healthcare_Provider_Taxonomy_Group_5"
- "Healthcare_Provider_Taxonomy_Group_6"
- "Healthcare_Provider_Taxonomy_Group_7"
- "Healthcare_Provider_Taxonomy_Group_8"
- "Healthcare_Provider_Taxonomy_Group_9"
- "Healthcare_Provider_Taxonomy_Group_10"
- "Healthcare_Provider_Taxonomy_Group_11"
- "Healthcare_Provider_Taxonomy_Group_12"
- "Healthcare_Provider_Taxonomy_Group_13"
- "Healthcare_Provider_Taxonomy_Group_14"
- "Healthcare_Provider_Taxonomy_Group_15"
Content source: chse-ohsu/PublicUseData
Similar notebooks: