Learn R Programming

Achilles (version 1.6.3)

achilles: The main Achilles analyses (for v5.x)

Description

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

Usage

achilles(connectionDetails, cdmDatabaseSchema,
  resultsDatabaseSchema = cdmDatabaseSchema,
  scratchDatabaseSchema = resultsDatabaseSchema,
  vocabDatabaseSchema = cdmDatabaseSchema, sourceName = "",
  analysisIds, createTable = TRUE, smallCellCount = 5,
  cdmVersion = "5", runHeel = TRUE, validateSchema = FALSE,
  runCostAnalysis = FALSE, conceptHierarchy = TRUE,
  createIndices = TRUE, numThreads = 1,
  tempAchillesPrefix = "tmpach", dropScratchTables = TRUE,
  sqlOnly = FALSE, outputFolder = "output", verboseMode = TRUE)

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'.

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 identifiability, cells with small counts (<= smallCellCount) are deleted. Set to NULL if you don't want any deletions.

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)

runHeel

Boolean to determine if Achilles Heel data quality reporting will be produced based on the summary statistics. Default = TRUE

validateSchema

Boolean to determine if CDM Schema Validation should be run. Default = FALSE

runCostAnalysis

Boolean to determine if cost analysis should be run. Note: only works on v5.1+ style cost tables.

conceptHierarchy

Boolean to determine if the concept_hierarchy result table should be created, for use by Atlas treemaps. Please note: this table creation only requires the Vocabulary, not the CDM itself. You could run this once for 1 Vocab version, and then copy the table to all CDMs using that Vocab.

createIndices

Boolean to determine if indices should be created on the resulting Achilles and concept_hierarchy table. 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

Value

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

Details

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

Examples

Run this code
# NOT RUN {
                              
# }
# 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", 
                                            runCostAnalysis = TRUE, 
                                            numThreads = 10,
                                            outputFolder = "output")
                                        
# }

Run the code above in your browser using DataLab