demo_analysis/export_drug_mapping.R

# Export the drug mapping

# Load package
library(OHDSIDeriveVariables)

####### Setup environment ###########
cdmDatabaseSchema <- 'cdm5'
connectionDetails <- createConnectionDetails(dbms="postgresql",
                                             server="localhost/ohdsi",
                                             user="postgres", password="",
                                             port=5433,
                                             schema=cdmDatabaseSchema)

# write in the current working directory.
file <- file.path(getwd(),'drug_mapping.csv' )
exportDrugMapping(connectionDetails, file)
thehyve/ohdsi-DeriveVariables documentation built on May 31, 2019, 9:13 a.m.