Public | Automated Build

Last pushed: never
Short Description
Automated build of David McCallie's NPI-based FHIR Provider directory
Full Description


A simple hack/demonstration of how to access provider directory (NPPES) via FHIR services


  • Elasticsearch - to serve as database for NPPES records (Lucene)
  • Flask - simple python web server
  • gunicorn - WSGI gateway to expose the Flask app to the web

Very brief instructions:

  • Install and launch Elasticsearch. I took all the defaults, which is overkill, but it works
  • Use python to "pip install" Flask, elasticsearch, and gunicorn
  • run the "" script in NPPES_data to download the NPPES file from CMS, and the "taxonomy" file from NUCC. On the Mac, the unzip tool may not be able to handle the large CSV from NPPES, so you may need to manually extract with some other unzip tool. The unziped size is ~5GB
  • Run 'bulk_load_nppes'
    • It should find the right CSV files. If not, pass them in on the comand line.
    • It should default to point to your local install of ElasticSearch. If not, look in the code to see which environment variables to set to point to your instance of ES.
    • Loading the ~3.7M records takes about 5-6 minutes on my i7/SSD. Ignore the error messages about non-Ascii provider entries. That's a bug to be fixed, but obly drops a relatively few provider names. You only need to load the provider records into elasticsearch once, of course.
  • Run "serve_nppes' to test locally (defaults to
  • Deploy to web by running gunicorn to serve up serve_nppes:app (the WSGI entry point.)
    • gunicorn -b -w 4 serve_nppes:app

More details:

Set up Python 2.7 and elasticsearch on localhost, then:
cd nppes_fhir_demo
pip install -r requirements.txt
cd NPPES_data
sh ./
cd ../nppes_fhir_demo

# in local env

# in prod
gunicorn -b serve_nppes:app

Dockerized version



Docker Pull Command
Source Repository