Each download is one JSON object, {meta, results}, usually zipped
(drug-drugsfda-0001-of-0001.json.zip,
drug-ndc-0001-of-0001.json.zip). Zips are read directly, without
extracting them to disk; an unzipped .json file works too. The
parser checks the number of records against meta.results.total.
Drugs@FDA lists FDA application products (NDA, ANDA, BLA); the NDC
directory lists products registered for sale, including products sold
under an OTC monograph without an application. Every application, product,
submission and listing is kept as the files have it, including tentative
approvals (submission_status "TA"); the parser does no status
grouping and no matching across sources.
YYYYMMDD dates become dates. NDC packaging dates are written two ways
(20220525 and 04-DEC-09) and are kept as text, as written.
finished and sample are logical. Every other field stays text.
The openfda block of each record is kept as (key, field, value)
rows; it is openFDA's annotation, and it can belong to another drug (for
example ANDA202111).
release_date defaults to the files' meta.last_updated (the
export date) when every file given has the same one.
Parsing the full Drugs@FDA and NDC files takes about a minute and needs
roughly 300 MB of memory.
openFDA data are released under CC0 1.0. openFDA asks for credit, which is
recorded in the object's metadata (see get_source_metadata),
and states: "Do not rely on openFDA to make decisions regarding medical
care."