Health Equity Research Assessment (HERA): a large scale characterization of gender and racial disparities
Follow these instructions for setting up your R environment, including RTools and Java.
Download the study package by cloning this repository using the following command:
bash
git clone https://github.com/ohdsi-studies/HERACharacterization.git
Open the study package project (HERACharacterization.Rproj) in RStudio. Use the following code to install all the dependencies:
r
install.packages("renv")
renv::restore()
In RStudio, select 'Build' then 'Install and Restart' to build the study package.
Once installed, you can execute the study by modifying and using the code below. For your convenience, this code is also provided under extras/CodeToRun.R
:
``` r library(HERACharacterization)
andromedaTempFolder <- if (Sys.getenv("ANDROMEDA_TEMP_FOLDER") == "") "~/andromedaTemp" else Sys.getenv("ANDROMEDA_TEMP_FOLDER") options(andromedaTempFolder = andromedaTempFolder)
dbms <- Sys.getenv("DBMS") user <- if (Sys.getenv("DB_USER") == "") NULL else Sys.getenv("DB_USER") password <- if (Sys.getenv("DB_PASSWORD") == "") NULL else Sys.getenv("DB_PASSWORD") server <- Sys.getenv("DB_SERVER") extraSettings <- if (Sys.getenv("DB_EXTRA_SETTINGS") == "") NULL else Sys.getenv("DB_EXTRA_SETTINGS") port <- Sys.getenv("DB_PORT")
oracleTempSchema <- NULL
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms, server = server, extraSettings = extraSettings, user = user, password = password, port = port)
databaseId <- "MDCR" databaseName <- "CDM_IBM_MDCD_V1703" databaseDescription <- "The IBM(R) MarketScan(R) Medicare Supplemental Database (MDCR) represents the health services of approximately 10 million retirees in the United States with Medicare supplemental coverage through employer-sponsored plans. This database contains primarily fee-for-service plans and includes health insurance claims across the continuum of care (e.g. inpatient, outpatient and outpatient pharmacy)."
cdmDatabaseSchema <- "cdm_truven_mdcr_v1703" cohortDatabaseSchema <- "scratch_asena5" cohortTable <- paste0("AS_HERACharacterization_", databaseId) featureSummaryTable <- paste0(cohortTable, "_smry") minCellCount <- 5
projectRootFolder <- "E:/HERACharacterization/Runs" outputFolder <- file.path(projectRootFolder, databaseId) if (!dir.exists(outputFolder)) { dir.create(outputFolder, recursive = TRUE) } setwd(outputFolder)
cohortIdsToExcludeFromExecution <- c() cohortIdsToExcludeFromResultsExport <- NULL
runStudy(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, cohortDatabaseSchema = cohortDatabaseSchema, cohortTable = cohortTable, featureSummaryTable = featureSummaryTable, oracleTempSchema = cohortDatabaseSchema, exportFolder = outputFolder, databaseId = databaseId, databaseName = databaseName, databaseDescription = databaseDescription, cohortIdsToExcludeFromExecution = cohortIdsToExcludeFromExecution, cohortIdsToExcludeFromResultsExport = cohortIdsToExcludeFromResultsExport, incremental = TRUE, minCellCount = minCellCount) ```
Review the results by using the Shiny application included in the study package:
r
# Use the next set of commands to compress results and view the output.
preMergeResultsFiles(outputFolder)
launchShinyApp(outputFolder)
Upload the file export/Results_<DatabaseId>.zip
in the output folder to the study coordinator:
``` r
keyFileName <- "E:/HERACharacterization/study-data-site-covid19.dat" userName <- "study-data-site-covid19"
uploadStudyResults(outputFolder, keyFileName, userName) ```
The HERACharacterization package is licensed under Apache License 2.0
HERACharacterization was developed in ATLAS and R Studio.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.