#National Drug Code Directory to FHIR Parser#
ndc-to-fhir is a Python script that parses drugs from the National Drug Code Directory into a series of FHIR-JSON dumps (Medication, Substance and Organization).
It is maintained by the Parsons Institute for Information Mapping (PIIM) and funded through the Telemedicine & Advanced Technology Research Center (TATRC).
###Requirements### Python 2.5 or greater
###Instructions###
####Download Database####
- Move into the cloned repo and create a
data
directorycd [ndc-to-fhir install directory]
mkdir data && cd data
- Download and unzip the NDC database
curl -O http://www.fda.gov/downloads/Drugs/DevelopmentApprovalProcess/UCM070838.zip
unzip UCM070838.zip -d ndc
####Run####
cd [ndc-to-fhir install directory]
python parse.py
####Troubleshooting####
locale.Error: unsupported locale setting
- run
locale -a
to get locales supported by your system - edit the
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
line inparse.py
to match one of the supported locales listed
- run