Skip to content

Read RXNORM database into an SQLite database within R

Notifications You must be signed in to change notification settings

dmcalli2/rxnorm_to_sqlite

Repository files navigation

rxnorm_to_sqlite

This short bit of R code runs SQL code, which has been provided by the US National Library of Medicine, in order to create an SQLITE database. The NLM SQL code reads RXNORM Rich Release Format (RRF) text files into a database, also creating a number of suitable indexes. The NLM SQL code was written for reading the database into MYSQL, but needed only one small change (removing a single contraint) to run in SQLITE. This has only been tested in two releases of RXNORM, 2016-01-08 and 2018-06-12.

This approach does not read in the database perfectly (the readr::read_delim function gives a warning about some of the files), but is a quick and easy way to quickly read RXNORM into an R-accessible format without having to install a large complex server SQL database engine such as MYSQL.

This code reuses, with permission, some code written by Peter Meissener on stackoverflow

About

Read RXNORM database into an SQLite database within R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published