achilles: achilles

View source: R/Achilles.R

achillesR Documentation

achilles

Description

achilles creates descriptive statistics summary for an entire OMOP CDM instance.

Usage

achilles(
  connectionDetails,
  cdmDatabaseSchema,
  resultsDatabaseSchema = cdmDatabaseSchema,
  scratchDatabaseSchema = resultsDatabaseSchema,
  vocabDatabaseSchema = cdmDatabaseSchema,
  tempEmulationSchema = resultsDatabaseSchema,
  sourceName = "",
  analysisIds,
  createTable = TRUE,
  smallCellCount = 5,
  cdmVersion = "5",
  createIndices = TRUE,
  numThreads = 1,
  tempAchillesPrefix = "tmpach",
  dropScratchTables = TRUE,
  sqlOnly = FALSE,
  outputFolder = "output",
  verboseMode = TRUE,
  optimizeAtlasCache = FALSE,
  defaultAnalysesOnly = TRUE,
  updateGivenAnalysesOnly = FALSE,
  excludeAnalysisIds,
  sqlDialect = NULL
)

Arguments

connectionDetails

An R object of type connectionDetails created using the function createConnectionDetails in the DatabaseConnector package.

cdmDatabaseSchema

Fully qualified name of database schema that contains OMOP CDM schema. On SQL Server, this should specifiy both the database and the schema, so for example, on SQL Server, 'cdm_instance.dbo'.

resultsDatabaseSchema

Fully qualified name of database schema that we can write final results to. Default is cdmDatabaseSchema. On SQL Server, this should specifiy both the database and the schema, so for example, on SQL Server, 'cdm_results.dbo'.

scratchDatabaseSchema

Fully qualified name of the database schema that will store all of the intermediate scratch tables, so for example, on SQL Server, 'cdm_scratch.dbo'. Must be accessible to/from the cdmDatabaseSchema and the resultsDatabaseSchema. Default is resultsDatabaseSchema. Making this "#" will run Achilles in single-threaded mode and use temporary tables instead of permanent tables.

vocabDatabaseSchema

String name of database schema that contains OMOP Vocabulary. Default is cdmDatabaseSchema. On SQL Server, this should specifiy both the database and the schema, so for example 'results.dbo'.

tempEmulationSchema

Formerly oracleTempSchema. For databases like Oracle where you must specify the name of the database schema where you want all temporary tables to be managed. Requires create/insert permissions to this database.

sourceName

String name of the data source name. If blank, CDM_SOURCE table will be queried to try to obtain this.

analysisIds

(OPTIONAL) A vector containing the set of Achilles analysisIds for which results will be generated. If not specified, all analyses will be executed. Use getAnalysisDetails to get a list of all Achilles analyses and their Ids.

createTable

If true, new results tables will be created in the results schema. If not, the tables are assumed to already exist, and analysis results will be inserted (slower on MPP).

smallCellCount

To avoid patient identification, cells with small counts (<= smallCellCount) are deleted. Set to 0 for complete summary without small cell count restrictions.

cdmVersion

Define the OMOP CDM version used: currently supports v5 and above. Use major release number or minor number only (e.g. 5, 5.3)

createIndices

Boolean to determine if indices should be created on the resulting Achilles tables. Default= TRUE

numThreads

(OPTIONAL, multi-threaded mode) The number of threads to use to run Achilles in parallel. Default is 1 thread.

tempAchillesPrefix

(OPTIONAL, multi-threaded mode) The prefix to use for the scratch Achilles analyses tables. Default is "tmpach"

dropScratchTables

(OPTIONAL, multi-threaded mode) TRUE = drop the scratch tables (may take time depending on dbms), FALSE = leave them in place for later removal.

sqlOnly

Boolean to determine if Achilles should be fully executed. TRUE = just generate SQL files, don't actually run, FALSE = run Achilles

outputFolder

Path to store logs and SQL files

verboseMode

Boolean to determine if the console will show all execution steps. Default = TRUE

optimizeAtlasCache

Boolean to determine if the atlas cache has to be optimized. Default = FALSE

defaultAnalysesOnly

Boolean to determine if only default analyses should be run. Including non-default analyses is substantially more resource intensive. Default = TRUE

updateGivenAnalysesOnly

Boolean to determine whether to preserve the results of the analyses NOT specified with the analysisIds parameter. To update only analyses specified by analysisIds, set createTable = FALSE and updateGivenAnalysesOnly = TRUE. By default, updateGivenAnalysesOnly = FALSE, to preserve the original behavior of Achilles when supplied analysisIds.

excludeAnalysisIds

(OPTIONAL) A vector containing the set of Achilles analyses to exclude.

sqlDialect

(OPTIONAL) String to be used when specifying sqlOnly = TRUE and NOT supplying the connectionDetails parameter. if the connectionDetails parameter is supplied, sqlDialect is ignored. If the connectionDetails parameter is not supplied, sqlDialect must be supplied to enable SqlRender to translate properly. sqlDialect takes the value normally supplied to connectionDetails$dbms. Default = NULL.

Details

achilles creates descriptive statistics summary for an entire OMOP CDM instance.

Value

An object of type achillesResults containing details for connecting to the database containing the results

Examples

## Not run: 
connectionDetails <- createConnectionDetails(dbms = "sql server", server = "some_server")
achillesResults <- achilles(connectionDetails = connectionDetails,
  cdmDatabaseSchema = "cdm",
  resultsDatabaseSchema = "results",
  scratchDatabaseSchema = "scratch", 
  sourceName = "Some Source", 
  cdmVersion = "5.3", 
  numThreads = 10, 
  outputFolder = "output")

## End(Not run)


Achilles documentation built on May 31, 2023, 8:57 p.m.