populatePlpResultTables: Populate the PatientLevelPrediction results tables

View source: R/uploadPlpDbResults.R

populatePlpResultTablesR Documentation

Populate the PatientLevelPrediction results tables

Description

This function formats and uploads results that have been generated via an ATLAS prediction package into a database

Usage

populatePlpResultTables(
  conn,
  resultSchema,
  stringAppendToTables = "",
  targetDialect = "postgresql",
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  packageName,
  studyJsonList,
  studyName = "",
  studyDescription = "",
  researcherName = "",
  researcherEmail = "",
  researcherOrg = "",
  databaseName = NULL,
  databaseAcronym = NULL,
  databaseVersion = 1,
  databaseDescription = NULL,
  databaseType = NULL,
  valDatabases = list(ccae = list(name = "CCAE", description = "", version = 1, type =
    "US Claims")),
  resultLocation = NULL,
  resultPattern = "",
  validationLocation = file.path(resultLocation, "Validation"),
  addInternalValidation = T,
  addExternalValidation = T,
  gsubVal = NULL,
  removePattern = NULL
)

Arguments

conn

A connection to a database created by using the function connect in the DatabaseConnector package.

resultSchema

(string) The name of the database schema with the result tables.

stringAppendToTables

(string) A string that appends to the PatientLevelPrediction result tables

targetDialect

(string) The database management system being used

tempEmulationSchema

(string) The temp schema used when the database management system is oracle

packageName

(string) The name of the ATLAS R package used to generate the results (this is used to extract cohort jsons)

studyJsonList

(list) A list of lists per cohort with the cohort_name, cohort_id and cohort_json

studyName

(string) A reference study name

studyDescription

(string) A description of the study

researcherName

(string) Name of the researcher who developed the study

researcherEmail

(string) Email of the researcher who developed the study

researcherOrg

(string) Organisation of the researcher who developed the study

databaseName

(string) name of the database used to develop the model/s

databaseAcronym

(string) acronym of the database used to develop the model/s

databaseVersion

(int) Version of the database used to develop the model/s

databaseDescription

(string) Description of the database used to develop the model/s

databaseType

(string) Type of the database used to develop the model/s (e.g., claims)

valDatabases

(list) A named list with details of the external validation databases. Needs to contain: name, description, version, type.

resultLocation

(string) location of directory where the main package results were saved

resultPattern

(string) A string to match to select models of interest

validationLocation

(string) location of directory where the validation package results were saved

addInternalValidation

(boolean) Whether the internval validation results should be uploaded

addExternalValidation

(boolean) Whether the externval validation results should be uploaded

gsubVal

(string) Remove patterns from the result name

removePattern

(string) Restrict to result names with this pattern

Details

This function can be used upload PatientLevelPrediction results into a database

Value

Returns NULL but uploads all the results in resultLocation to the PatientLevelPrediction result tables in resultSchema


quinterpriest/PatientLevelPrediction documentation built on April 20, 2022, 12:50 a.m.