Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pritraj90/RxNorm-PostgreSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RxNorm-PostgreSQL

RxNorm Download Page link.

About

Scripts to create your own RxNorm Current Prescribable Content database for PostgreSQL.

Releases

For full database creation, see Releases. The releases are only for the SQL creation file and contain no Data files whatsoever.

Things I Have Learned

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:

  1. Execute table creation scripts
  2. Insert all data into the created tables
  3. Execute constraint scripts (and debug, because of what I have stated prior)
  4. Execute all index scripts

Case in Point

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.


Folder Structure

Constraints ( _constraints.sql )

The primary keys for each table in their respective SQL file.

Indexes ( _indexes.sql )

The unique and RxNorm recomended indexes for each table in their respective SQL file.

Scripts ( RxNormCurrentPostgreSQLDB.sql )

Contains the Full Database Creation RxNormCurrentPostgreSQLDB.sql. This will create a database RxNorm. Then create all tables, indexes, and constraints in the Public schema.

Tables ( _table.sql )

The table only creation scripts.

About

RxNorm Current Prescribable PostgreSQL db

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages