A skeleton package, to be used as a starting point when implementing patient-level prediction studies.
Vignette: Using the package skeleton for patient-level prediction studies
# get the latest PatientLevelPrediction
install.packages("devtools")
devtools::install_github("OHDSI/PatientLevelPrediction")
# check the package
PatientLevelPrediction::checkPlpInstallation()
# install the network package
devtools::install_github("OHDSI/StudyProtocolSandbox/SevereCovidPrediction")
library(SevereCovidPrediction)
# USER INPUTS
#=======================
# The folder where the study intermediate and result files will be written:
outputFolder <- "./SevereCovidPredictionResults"
# Specify where the temporary files (used by the ff package) will be created:
options(fftempdir = "location with space to save big data")
# Details for connecting to the server:
dbms <- "you dbms"
user <- 'your username'
pw <- 'your password'
server <- 'your server'
port <- 'your port'
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms,
server = server,
user = user,
password = pw,
port = port)
# Add the database containing the OMOP CDM data
cdmDatabaseSchema <- 'cdm database schema'
# Add a database with read/write access as this is where the cohorts will be generated
cohortDatabaseSchema <- 'work database schema'
oracleTempSchema <- NULL
# table name where the cohorts will be generated
cohortTable <- 'SevereCovidPredictionCohort'
#=======================
execute(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
oracleTempSchema = oracleTempSchema,
outputFolder = outputFolder,
createProtocol = F,
createCohorts = T,
runAnalyses = T,
createResultsDoc = F,
packageResults = T,
createValidationPackage = F,
minCellCount= 5)
execute(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
outputFolder = outputFolder,
createProtocol = F,
createCohorts = F,
runAnalyses = F,
createResultsDoc = F,
packageResults = F,
createValidationPackage = T,
minCellCount= 5)
populateShinyApp(resultDirectory = outputFolder,
minCellCount = 10,
databaseName = 'friendly name'
)
viewShiny('SevereCovidPrediction')
Under development. Do not use
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.