semerj / nppes-postgres

Importing NPPES NPI CSV data into Postgres
13 stars 6 forks source link

NPPES NPI + Postgres

Quickly load National Provider Identifier (NPI) and Health Care Provider Taxonomy data into Postgres

NPI

Download Data

Clean Data

# Replace empty "" integer fields in NPI CSV file
$ sed 's/""//g' npidata_20050523-20160110.csv > npi.csv

# Convert taxonomy data to utf-8 and tab delimited
$ iconv -c -t utf8 nucc_taxonomy_160.csv | csvformat -T > taxonomy.tab

Create npi Database and Import Data

$ createdb -O [USERNAME] [DBNAME]
$ ./create_npi_db.sh [USERNAME] [DBNAME] /full/path/npi.csv /full/path/taxonomy.tab