diff --git a/README.Rmd b/README.Rmd index 198383e..6e4eb4a 100644 --- a/README.Rmd +++ b/README.Rmd @@ -104,7 +104,7 @@ dbms <- Sys.getenv("dbms") user <- Sys.getenv("user") password <- Sys.getenv("password") server <- Sys.getenv("host") -port <- Sys.getenv +port <- Sys.getenv("port") connectionString <- Sys.getenv("connectionString") connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms, diff --git a/README.knit.md b/README.knit.md new file mode 100644 index 0000000..5121ffb --- /dev/null +++ b/README.knit.md @@ -0,0 +1,147 @@ +--- +output: github_document +--- + + + + + +# EHDEN Alopecia + + +[![R-CMD-check](https://github.com/ohdsi-studies/EhdenAlopecia/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ohdsi-studies/EhdenAlopecia/actions/workflows/R-CMD-check.yaml) +Study Status: Started + + +Analytic software to perform large-scale distributed analysis of patients with Alopecia as part of the EHDEN study-athon. + +- Analytics use case(s): Population-Level Estimation +- Study type: Clinical Application +- Tags: - +- Study lead: +- Study lead forums tag: +- Study start date: 1 November 2023 +- Study end date: - +- Protocol: To be added +- Publications: - +- Results explorer: - + +# Requirements + +A database in Common Data Model version 5 in one of these platforms: SQL Server, Oracle, PostgreSQL, IBM Netezza, Apache Impala, Amazon RedShift, Google BigQuery, or Microsoft APS. +R version 4.0.5 +On Windows: RTools +Java +100 GB of free disk space + +# How to run + +1. See the instructions at https://ohdsi.github.io/Hades/rSetup.html for configuring your R environment, including Java and RStudio. + +2. Clone the EhdenAlopecia package into your local R environment. + +3. Open your study package in RStudio. Use the following code to install all the dependencies: + +```R + +install.packages(c("TreatmentPatterns", + "DBI", + "dplyr", + "glue", + "zip", + "magrittr", + "checkmate", + "lubridate", + "rlang", + "readr", + "here", + "rmarkdown", + "checkmate", + "SqlRender", + "duckdb", + "ParallelLogger", + "DBI", + "glue", + "zip", + "lubridate", + "rlang", + "jsonlite")) + +remotes::install_github(c("ohdsi/CirceR", + "ohdsi/CohortGenerator", + "ohdsi/CohortDiagnostics")) + +``` + +In RStudio, select 'Build' then 'Install and Restart' to install the package. + +After succesfully installing the package. Open the extras/CodeTorun.R and run the following code: + +```R +#Load the library + +library(EhdenAlopecia) +library(here) + +# database metadata and connection details ----- +# The name/ acronym for the database +databaseId <- "..." + +# Database connection details ----- +#connection details +#User specified input + +# Details for connecting to the server: +dbms <- Sys.getenv("dbms") +user <- Sys.getenv("user") +password <- Sys.getenv("password") +server <- Sys.getenv("host") +port <- Sys.getenv("port") +connectionString <- Sys.getenv("connectionString") + +connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms, + connectionString = connectionString, + user = user, + password = password, + port = port) + + +cdmDatabaseSchema <- "..." +cohortDatabaseSchema <- "..." + + +# Name of table prefix to use in the result schema for tables created during the study. +# Notes: +# - if there is an existing table in your results schema with the same names it +# will be overwritten +# - name must be lower case +cohortTable <- "alopecia_ehden" + + +# minimum counts that can be displayed according to data governance +minCellCount <- 5 + +#specify where to save the results +outputFolder <- here::here("results") + + +#choose analysis to run +instantiateCohorts <- TRUE +runDiagnostics <- TRUE +runPatternAnalysis <- TRUE + +### Do not edit below here +EhdenAlopecia::runStudy( + connectionDetails = connectionDetails, + cohortTable = cohortTable, + cdmDatabaseSchema = cdmDatabaseSchema, + cohortDatabaseSchema = cohortDatabaseSchema, + instantiateCohorts = instantiateCohorts, + runDiagnostics = runDiagnostics, + runPatternAnalysis = runPatternAnalysis, + outputFolder = outputFolder, + databaseId = databaseId, + minCellCount = minCellCount +) + +``` diff --git a/README.md b/README.md index d387072..6c928aa 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ dbms <- Sys.getenv("dbms") user <- Sys.getenv("user") password <- Sys.getenv("password") server <- Sys.getenv("host") -port <- Sys.getenv +port <- Sys.getenv("port") connectionString <- Sys.getenv("connectionString") connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms,