This package automates the process of preparing and loading the OMOP Vocabulary Tables into a Postges database.

Installation

You can install the development version from GitHub with:

devtools::install_github("meerapatelmd/setupAthena")

Requirements

  1. Unpacked vocabulary bundle from athena.ohdsi.org. If CPT4 is in the bundle, remember to reconstitute it with either the prepare_cpt4 function available in this package or from the Command Line using the README.txt that came with the vocabularies.
  2. Postgres database with superuser credentials or as a member of the pg_read_server_files role. This is necessary to run the sql command COPY that loads the csvs into the tables.

Execution

A. After the zip file is unpacked and the CPT4 have been reconstituted:

library(setupAthena) 
run_setup(conn = conn, 
          target_schema = "my_schema",
          path_to_csvs = "~/Desktop/athena_vocab")

B. To use the option of reconstituting CPT4 alongside the rest of the setup:

library(setupAthena) 
run_setup(conn = conn, 
          target_schema = "my_schema",
          path_to_csvs = "~/Desktop/athena_vocab",
          steps = c("prepare_cpt4", "drop_tables", "copy", "indices", "constraints", "log"),
          umls_api_key = 1000-9342-31304)

Code of Conduct

Please note that the setupAthena project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.