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

achillesHeel(
  connectionDetails,
  cdmDatabaseSchema,
  resultsDatabaseSchema = cdmDatabaseSchema,
  scratchDatabaseSchema = resultsDatabaseSchema,
  oracleTempSchema = scratchDatabaseSchema,
  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.

oracleTempSchema

For Oracle only: the name of the database schema where you want all temporary tables to be managed. Requires create/insert permissions to this database.

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

Value

The full Heel SQL code

Details

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

Examples

if (FALSE) { 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") }