A quick script to download the Drugs@FDA data into a Postgres database; a similar repo for the FDA Orange Book is also available.
This script will also parse the Orphan Drug Database.
A glossary of terms is found online.
NOTE: project assumes python3
pip install -r requirements.txt
./run.sh
NOTE:
- only some foreign key constraints are established between tables.
- all table names and table attributes are formatted with underscores and lowercase; for example the table name
ApplicationDocs
is created asapplication_docs
. - the
Products.txt
table has extra trailing tabs in lines 34517-24519 which were manually removed so thatinsert.py
could run properly. - the archive fda_drugs_2018-04-09.zip is provided as a refernce for a set of data that currently works with this repo including the line fix mentioned above; note that these data are otherwise updated on a weekly basis.