achillesHeel: Execution of data quality rules (for v5 and above)

Description Usage Arguments Details Value Examples

View source: R/AchillesHeel.R

Description

achillesHeel executes data quality rules (or checks) on pre-computed analyses (or measures).

Usage

1
2
3
4
5
6
7
8
9
achillesHeel(connectionDetails, cdmDatabaseSchema,
  resultsDatabaseSchema = cdmDatabaseSchema,
  scratchDatabaseSchema = resultsDatabaseSchema,
  vocabDatabaseSchema = cdmDatabaseSchema, cdmVersion = "5",
  numThreads = 1, tempHeelPrefix = "tmpheel",
  dropScratchTables = FALSE, ThresholdAgeWarning = 125,
  ThresholdOutpatientVisitPerc = 0.43,
  ThresholdMinimalPtMeasDxRx = 20.5, outputFolder, sqlOnly = FALSE,
  verboseMode = TRUE)

Arguments

connectionDetails

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

cdmDatabaseSchema

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

resultsDatabaseSchema

string 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 'results.dbo'.

scratchDatabaseSchema

(OPTIONAL, multi-threaded mode) Name of a fully qualified schema that is accessible to/from the resultsDatabaseSchema, that can store all of the scratch tables. Default is resultsDatabaseSchema.

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

cdmVersion

Define the OMOP CDM version used: currently supports v5 and above. Default = "5".

numThreads

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

tempHeelPrefix

(OPTIONAL, multi-threaded mode) The prefix to use for the "temporary" (but actually permanent) Heel tables. Default is "tmpheel"

dropScratchTables

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

ThresholdAgeWarning

The maximum age to allow in Heel

ThresholdOutpatientVisitPerc

The maximum percentage of outpatient visits among all visits

ThresholdMinimalPtMeasDxRx

The minimum percentage of patients with at least 1 Measurement, 1 Dx, and 1 Rx

outputFolder

Path to store logs and SQL files

sqlOnly

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

verboseMode

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

Details

achillesHeel contains number of rules (authored in SQL) that are executed against achilles results tables.

Value

The full Heel SQL code

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  connectionDetails <- createConnectionDetails(dbms="sql server", server="some_server")
  achillesHeel <- achillesHeel(connectionDetails = connectionDetails, 
                               cdmDatabaseSchema = "cdm", 
                               resultsDatabaseSchema = "results", 
                               scratchDatabaseSchema = "scratch",
                               vocabDatabaseSchema = "vocab",
                               cdmVersion = "5.3.0",
                               numThreads = 10,
                               outputFolder = "output")

## End(Not run)

OHDSI/Achilles documentation built on Dec. 7, 2018, 11:13 p.m.