Title: | Achilles Data Source Characterization |
---|---|
Description: | Automated Characterization of Health Information at Large-Scale Longitudinal Evidence Systems. Creates a descriptive statistics summary for an Observational Medical Outcomes Partnership Common Data Model standardized data source. This package includes functions for executing summary queries on the specified data source and exporting reporting content for use across a variety of Observational Health Data Sciences and Informatics community applications. |
Authors: | Frank DeFalco [aut, cre], Patrick Ryan [aut], Martijn Schuemie [aut], Vojtech Huser [aut], Chris Knoll [aut], Ajit Londhe [aut], Taha Abdul-Basser [aut], Anthony Molinaro [aut], Observational Health Data Science and Informatics [cph] |
Maintainer: | Frank DeFalco <[email protected]> |
License: | Apache License |
Version: | 1.7.2 |
Built: | 2024-11-02 04:12:37 UTC |
Source: | https://github.com/cran/Achilles |
achilles
creates descriptive statistics summary for an entire OMOP CDM instance.
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 )
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 )
connectionDetails |
An R object of type |
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 |
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 |
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 |
achilles
creates descriptive statistics summary for an entire OMOP CDM instance.
An object of type achillesResults
containing details for connecting to the database
containing the results
## 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)
## 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)
Create indicies
createIndices( connectionDetails, resultsDatabaseSchema, outputFolder, sqlOnly = FALSE, verboseMode = TRUE, achillesTables = c("achilles_results", "achilles_results_dist") )
createIndices( connectionDetails, resultsDatabaseSchema, outputFolder, sqlOnly = FALSE, verboseMode = TRUE, achillesTables = c("achilles_results", "achilles_results_dist") )
connectionDetails |
An R object of type |
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'. |
outputFolder |
Path to store logs and SQL files |
sqlOnly |
TRUE = just generate SQL files, don't actually run, FALSE = run Achilles |
verboseMode |
Boolean to determine if the console will show all execution steps. Default = TRUE |
achillesTables |
Which achilles tables should be indexed? Default is both achilles_results and achilles_results_dist. |
Post-processing, create indices to help performance. Cannot be used with Redshift.
A collection of queries that were executed to drop any existing indices and create new indicies as specified.
createTimeSeries
Creates a monthly multivariate time series object given a data frame in the
proper format.
createTimeSeries(temporalData)
createTimeSeries(temporalData)
temporalData |
A data frame from which to create the time series |
createTimeSeries
Requires the following:
1. The given data frame must contain four columns: START_DATE, COUNT_VALUE, PREVALENCE, and PROPORTION_WITHIN_YEAR. 2. START_DATE must be in the YYYYMMDD format. 3. COUNT_VALUE, PREVALENCE, and PROPORTION_WITHIN_YEAR contain only numeric data.
The individual monthly univariate time series can be extracted by specifying the correct column name (see example).
A multivariate time series object
# Example 1: temporalData <- data.frame(START_DATE = seq.Date(as.Date("20210101", "%Y%m%d"), as.Date("20231201", "%Y%m%d"), by = "month"), COUNT_VALUE = round(runif(36, 1, 1000)), PREVALENCE = round(runif(36, 0, 10), 2), PROPORTION_WITHIN_YEAR = round(runif(36, 0, 1), 2), stringsAsFactors = FALSE) dummyTs <- createTimeSeries(temporalData) dummyTs.cv <- dummyTs[, "COUNT_VALUE"] dummyTs.pv <- dummyTs[, "PREVALENCE"] dummyTs.pwy <- dummyTs[, "PROPORTION_WITHIN_YEAR"] ## Not run: # Example 2: pneumonia <- 255848 temporalData <- getTemporalData(connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", conceptId = pneumonia) pneumoniaTs <- createTimeSeries(temporalData) pneumoniaTs.cv <- pneumoniaTs[, "COUNT_VALUE"] pneumoniaTs.pv <- pneumoniaTs[, "PREVALENCE"] pneumoniaTs.pwy <- pneumoniaTs[, "PROPORTION_WITHIN_YEAR"] ## End(Not run)
# Example 1: temporalData <- data.frame(START_DATE = seq.Date(as.Date("20210101", "%Y%m%d"), as.Date("20231201", "%Y%m%d"), by = "month"), COUNT_VALUE = round(runif(36, 1, 1000)), PREVALENCE = round(runif(36, 0, 10), 2), PROPORTION_WITHIN_YEAR = round(runif(36, 0, 1), 2), stringsAsFactors = FALSE) dummyTs <- createTimeSeries(temporalData) dummyTs.cv <- dummyTs[, "COUNT_VALUE"] dummyTs.pv <- dummyTs[, "PREVALENCE"] dummyTs.pwy <- dummyTs[, "PROPORTION_WITHIN_YEAR"] ## Not run: # Example 2: pneumonia <- 255848 temporalData <- getTemporalData(connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", conceptId = pneumonia) pneumoniaTs <- createTimeSeries(temporalData) pneumoniaTs.cv <- pneumoniaTs[, "COUNT_VALUE"] pneumoniaTs.pv <- pneumoniaTs[, "PREVALENCE"] pneumoniaTs.pwy <- pneumoniaTs[, "PROPORTION_WITHIN_YEAR"] ## End(Not run)
Drop all possible scratch tables
dropAllScratchTables( connectionDetails, scratchDatabaseSchema, tempAchillesPrefix = "tmpach", numThreads = 1, tableTypes = c("achilles"), outputFolder, verboseMode = TRUE, defaultAnalysesOnly = TRUE )
dropAllScratchTables( connectionDetails, scratchDatabaseSchema, tempAchillesPrefix = "tmpach", numThreads = 1, tableTypes = c("achilles"), outputFolder, verboseMode = TRUE, defaultAnalysesOnly = TRUE )
connectionDetails |
An R object of type |
scratchDatabaseSchema |
string name of database schema that Achilles scratch tables were written to. |
tempAchillesPrefix |
The prefix to use for the "temporary" (but actually permanent) Achilles analyses tables. Default is "tmpach" |
numThreads |
The number of threads to use to run this function. Default is 1 thread. |
tableTypes |
The types of Achilles scratch tables to drop: achilles |
outputFolder |
Path to store logs and SQL files |
verboseMode |
Boolean to determine if the console will show all execution steps. Default = TRUE |
defaultAnalysesOnly |
Boolean to determine if only default analyses should be run. Including non-default analyses is substantially more resource intensive. Default = TRUE |
Drop all possible Achilles scratch tables
No return value, called to drop interim scratch tables.
exportConditionEraToJson
Exports Achilles Condition Era report into a JSON form for reports.
exportConditionEraToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportConditionEraToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Condition Era report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportConditionEraToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportConditionEraToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportConditonToJson
Exports Achilles Condition report into a JSON form for reports.
exportConditionToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportConditionToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Condition report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportConditionToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportConditionToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportDashboardToJson
Exports Achilles Dashboard report into a JSON form for reports.
exportDashboardToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportDashboardToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Dashboard report found in Achilles.Web. NOTE: This function reads the results from the other exports and aggregates them into a single file. If other reports are not genreated, this function will fail.
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDashboardToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDashboardToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportDataDensityToJson
Exports Achilles Data Density report into a JSON form for reports.
exportDataDensityToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportDataDensityToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Data Density report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDataDensityToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDataDensityToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportDeathToJson
Exports Achilles Death report into a JSON form for reports.
exportDeathToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportDeathToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Death report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDeathToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDeathToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportDrugEraToJson
Exports Achilles Drug Era report into a JSON form for reports.
exportDrugEraToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportDrugEraToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Drug Era report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDrugEraToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDrugEraToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportDrugToJson
Exports Achilles Drug report into a JSON form for reports.
exportDrugToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportDrugToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Drug report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDrugToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportDrugToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportMeasurementToJson
Exports Measurement report into a JSON form for reports.
exportMeasurementToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportMeasurementToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Measurement report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportMeasurementToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportMeasurementToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportMetaToJson
Exports Achilles META report into a JSON form for reports.
exportMetaToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportMetaToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Achilles META report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportMetaToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportMetaToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportObservationPeriodToJson
Exports Achilles Observation Period report into a JSON form
for reports.
exportObservationPeriodToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportObservationPeriodToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Observation Period report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportObservationPeriodToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportObservationPeriodToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportObservationToJson
Exports Achilles Observation report into a JSON form for reports.
exportObservationToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportObservationToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Observation report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportObservationToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportObservationToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportPerformanceToJson
Exports Achilles performance report into a JSON form for reports.
exportPerformanceToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportPerformanceToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates performance report including how long each Achilles result took to generate.
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportPerformanceToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportPerformanceToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportPersonToJson
Exports Achilles Person report into a JSON form for reports.
exportPersonToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportPersonToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Person report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportPersonToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportPersonToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportProcedureToJson
Exports Achilles Procedure report into a JSON form for reports.
exportProcedureToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportProcedureToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Procedure report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportProcedureToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportProcedureToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportResultsToCSV
exports all results to a CSV file
exportResultsToCSV( connectionDetails, resultsDatabaseSchema, analysisIds = c(), minCellCount = 5, exportFolder )
exportResultsToCSV( connectionDetails, resultsDatabaseSchema, analysisIds = c(), minCellCount = 5, exportFolder )
connectionDetails |
An R object of type |
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'. |
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 |
minCellCount |
To avoid patient identification, cells with small counts (<= minCellCount) are deleted. Set to 0 for complete summary without small cell count restrictions. |
exportFolder |
Path to store results |
exportResultsToCSV
writes a CSV file with all results to the export folder.
No return value. Called to export CSV file to the file system.
exportToAres
Exports Achilles statistics for ARES
exportToAres( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, vocabDatabaseSchema, outputPath, reports = c() )
exportToAres( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, vocabDatabaseSchema, outputPath, reports = c() )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the OMOP CDM. |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
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'. |
outputPath |
A folder location to save the JSON files. Default is current working folder |
reports |
vector of reports to run, c() defaults to all reports See |
Creates export files
none
exportToJson
Exports Achilles statistics into a JSON form for reports.
exportToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, reports = getAllReports(), vocabDatabaseSchema = cdmDatabaseSchema, compressIntoOneFile = FALSE )
exportToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, reports = getAllReports(), vocabDatabaseSchema = cdmDatabaseSchema, compressIntoOneFile = FALSE )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the OMOP CDM. |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
A folder location to save the JSON files. Default is current working folder |
reports |
A character vector listing the set of reports to generate. Default is all reports. |
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'. |
compressIntoOneFile |
Boolean indicating if the JSON files should be compressed into one
zip file. Please note that in Windows, the zip application must be
stored in the system environment, e.g. Sys.setenv("R_ZIPCMD",
"some_path_to_zip"). Due to recursion, the actual Achilles files and
folders will be embedded in any parent directories that the source
folder has. See |
Creates individual files for each report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportVisitDetailToJson
Exports Achilles VISIT_DETAIL report into a JSON form for reports.
exportVisitDetailToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportVisitDetailToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for VISIT_DETAIL report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportVisitDetailToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportVisitDetailToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
exportVisitToJson
Exports Achilles Visit report into a JSON form for reports.
exportVisitToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
exportVisitToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath, vocabDatabaseSchema = cdmDatabaseSchema )
connectionDetails |
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port) |
cdmDatabaseSchema |
Name of the database schema that contains the vocabulary files |
resultsDatabaseSchema |
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema |
outputPath |
folder location to save the JSON files. Default is current working folder |
vocabDatabaseSchema |
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'. |
Creates individual files for Visit report found in Achilles.Web
none
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportVisitToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
## Not run: connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportVisitToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path") ## End(Not run)
Get all analysis details
getAnalysisDetails()
getAnalysisDetails()
Get a list of all analyses with their analysis IDs and strata.
A data.frame with the analysis details.
The seasonality score of a monthly time series is computed as its departure from a uniform distribution.
getSeasonalityScore(tsData)
getSeasonalityScore(tsData)
tsData |
A time series object. |
The degree of seasonality of a monthly time series is based on its departure from a uniform distribution. If the number of cases for a given concept is uniformly distributed across all time periods (in this case, all months), then its monthly proportion would be approximately constant. In this case, the time series would be considered "strictly non-seasonal" and its "seasonality score" would be zero. Similarly, if all cases recur at a single point in time (that is, in a single month), such a time series would be considered "strictly seasonal" and its seasonality score would be 1. All other time series would have a seasonality score between 0 and 1. Currently, only monthly time series are supported.
A numeric value between 0 and 1 (inclusive) representing the seasonality of a time series.
getTemporalData
Retrieve specific monthly analyses data to support temporal
characterization.
getTemporalData( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, analysisIds = NULL, conceptId = NULL )
getTemporalData( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, analysisIds = NULL, conceptId = NULL )
connectionDetails |
An R object of type |
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'. |
analysisIds |
(OPTIONAL) A vector containing the set of Achilles analysisIds for
which results will be returned. The following are supported:
|
conceptId |
(OPTIONAL) A SNOMED concept_id from the |
getTemporalData
Assumes achilles
has been run.
Currently supported Achilles monthly analyses are: 202 - Visit Occurrence 402 - Condition occurrence 602 - Procedure Occurrence 702 - Drug Exposure 802 - Observation 1802 - Measurement 2102 - Device
A data frame of query results from DatabaseConnector
## Not run: pneumonia <- 255848 monthlyResults <- getTemporalData(connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", conceptId = pneumonia) ## End(Not run)
## Not run: pneumonia <- 255848 monthlyResults <- getTemporalData(connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", conceptId = pneumonia) ## End(Not run)
Uses the Augmented Dickey-Fuller test to determine when the time series has a unit root.
isStationary(tsData)
isStationary(tsData)
tsData |
A time series object. |
A time series must have a minimum of three complete years of data. For details on the implementation of the Augmented Dickey-Fuller test, see the tseries package on cran.
A boolean indicating whether or not the given time series is stationary.
listMissingAnalyses
Find and return analyses that exist in getAnalysisDetails
, but
not in achilles_results or achilles_results_dist
listMissingAnalyses(connectionDetails, resultsDatabaseSchema)
listMissingAnalyses(connectionDetails, resultsDatabaseSchema)
connectionDetails |
An R object of type |
resultsDatabaseSchema |
Fully qualified name of database schema that contains achilles_results and achilles_results_dist tables. |
A dataframe which is a subset of getAnalysisDetails
## Not run: Achilles::listMissingAnalyses(connectionDetails = connectionDetails, resultsDatabaseSchema = "results") ## End(Not run)
## Not run: Achilles::listMissingAnalyses(connectionDetails = connectionDetails, resultsDatabaseSchema = "results") ## End(Not run)
Optimize atlas cache
optimizeAtlasCache( connectionDetails, resultsDatabaseSchema, vocabDatabaseSchema = resultsDatabaseSchema, outputFolder = "output", sqlOnly = FALSE, verboseMode = TRUE, tempAchillesPrefix = "tmpach" )
optimizeAtlasCache( connectionDetails, resultsDatabaseSchema, vocabDatabaseSchema = resultsDatabaseSchema, outputFolder = "output", sqlOnly = FALSE, verboseMode = TRUE, tempAchillesPrefix = "tmpach" )
connectionDetails |
An R object of type |
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'. |
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'. |
outputFolder |
Path to store logs and SQL files |
sqlOnly |
TRUE = just generate SQL files, don't actually run, FALSE = run Achilles |
verboseMode |
Boolean to determine if the console will show all execution steps. Default = TRUE |
tempAchillesPrefix |
The prefix to use for the "temporary" (but actually permanent) Achilles analyses tables. Default is "tmpach" |
Post-processing, optimize data for atlas cache in separate table to help performance.
The SQL statement executed to update cache tables is returned.
performTemporalCharacterization
Perform temporal characterization on a concept or family of concepts belonging to a supported Achilles analysis.
performTemporalCharacterization( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, analysisIds = NULL, conceptId = NULL, outputFile = "temporal-characterization.csv" )
performTemporalCharacterization( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, analysisIds = NULL, conceptId = NULL, outputFile = "temporal-characterization.csv" )
connectionDetails |
An R object of type |
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'. |
analysisIds |
(OPTIONAL) A vector containing the set of Achilles analysisIds for
which results will be returned. The following are supported: |
conceptId |
(OPTIONAL) A SNOMED concept_id from the |
outputFile |
CSV file where temporal characterization will be written. Default is temporal-characterization.csv. |
performTemporalAnalyses
Assumes achilles
has been run.
Currently supported Achilles analyses for temporal analyses are: 202 - Visit Occurrence 402 - Condition occurrence 602 - Procedure Occurrence 702 - Drug Exposure 802 - Observation 1802 - Measurement 2102 - Device
A csv file with temporal analyses for each time series
## Not run: # Example 1: pneumonia <- 255848 performTemporalCharacterization( connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", conceptId = pneumonia, outputFolder = "output/pneumoniaTemporalChar.csv") # Example 2: performTemporalCharacterization( connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", analysisIds = c(402,702), outputFolder = "output/conditionAndDrugTemporalChar.csv") # Example 3: performTemporalCharacterization( connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", outputFolder = "output/CompleteTemporalChar.csv") ## End(Not run)
## Not run: # Example 1: pneumonia <- 255848 performTemporalCharacterization( connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", conceptId = pneumonia, outputFolder = "output/pneumoniaTemporalChar.csv") # Example 2: performTemporalCharacterization( connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", analysisIds = c(402,702), outputFolder = "output/conditionAndDrugTemporalChar.csv") # Example 3: performTemporalCharacterization( connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", outputFolder = "output/CompleteTemporalChar.csv") ## End(Not run)
runMissingAnalyses
Automatically find and compute analyses that haven't been executed.
runMissingAnalyses( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema = cdmDatabaseSchema, scratchDatabaseSchema = resultsDatabaseSchema, vocabDatabaseSchema = cdmDatabaseSchema, tempEmulationSchema = resultsDatabaseSchema, outputFolder = "output", defaultAnalysesOnly = TRUE )
runMissingAnalyses( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema = cdmDatabaseSchema, scratchDatabaseSchema = resultsDatabaseSchema, vocabDatabaseSchema = cdmDatabaseSchema, tempEmulationSchema = resultsDatabaseSchema, outputFolder = "output", defaultAnalysesOnly = TRUE )
connectionDetails |
An R object of type |
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 tempEmulationSchema. 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. |
outputFolder |
Path to store logs and SQL files |
defaultAnalysesOnly |
Boolean to determine if only default analyses should be run. Including non-default analyses is substantially more resource intensive. Default = TRUE |
No return value. Run to execute analyses currently missing from results.
## Not run: Achilles::runMissingAnalyses(connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", outputFolder = "/tmp") ## End(Not run)
## Not run: Achilles::runMissingAnalyses(connectionDetails = connectionDetails, cdmDatabaseSchema = "cdm", resultsDatabaseSchema = "results", outputFolder = "/tmp") ## End(Not run)
showReportTypes
Displays the Report Types that can be passed as vector values to
exportToJson.
showReportTypes()
showReportTypes()
exportToJson supports the following report types: "CONDITION","CONDITION_ERA", "DASHBOARD", "DATA_DENSITY", "DEATH", "DRUG", "DRUG_ERA", "META", "OBSERVATION", "OBSERVATION_PERIOD", "PERSON", "PROCEDURE","VISIT"
none (opens the allReports vector in a View() display)
## Not run: showReportTypes() ## End(Not run)
## Not run: showReportTypes() ## End(Not run)
For a monhtly time series, compute sum and proportion by month across all years
sumAcrossYears(tsData)
sumAcrossYears(tsData)
tsData |
A time series object |
A data frame reporting the monthly sum across all years and the proportion this sum contributes to the total.
Trim a monthly time series object to so that partial years are removed
tsCompleteYears(tsData)
tsCompleteYears(tsData)
tsData |
A time series object |
This function is only supported for monthly time series
A time series with partial years removed.