RxNorm Download Page link.
Scripts to create your own RxNorm Current Prescribable Content database for PostgreSQL.
For full database creation, see Releases. The releases are only for the SQL creation file and contain no Data files whatsoever.
If you're like me you'll think it's awesome to have all of this drug data! Well, the data from RxNorm is not entirely accurate. In that, there are duplications in the data or formatting errors in their releases (the RRF files). So the recomended order of creating the database would be:
- Execute table creation scripts
- Insert all data into the created tables
- Execute constraint scripts (and debug, because of what I have stated prior)
- Execute all index scripts
According to NLM (National Library of Medicine), the RXNREL table should be able to have a Primary Key. It is not possible to create a composite key because of the NULL values in the Data. So, yea. There is that issue. This database is made with that in mind. So I have removed NOT NULL constraints on the columuns that are in reality NULL.
The primary keys for each table in their respective SQL file.
The unique and RxNorm recomended indexes for each table in their respective SQL file.
Contains the Full Database Creation RxNormCurrentPostgreSQLDB.sql. This will create a database RxNorm. Then create all tables, indexes, and constraints in the Public schema.
The table only creation scripts.