Learn R Programming

PatientLevelPrediction (version 3.0.0)

createCohort: createCohort - Loads all the cohort sql in a network study and creates the cohorts

Description

This function finds the sql files in a network study package, loads, renders and translates the sql then implements it

Usage

createCohort(cohortDetails, cohortLocation, connectionDetails,
  cdmDatabaseSchema, cohortDatabaseSchema, cohortTable,
  oracleTempSchema = cdmDatabaseSchema, package)

Arguments

cohortDetails

A dataframe containing two columns: cohortName and cohortId (if missing then the skeleton default is used when available)

cohortLocation

A string specifying the location of the cohort sql files (uses default skeleton location if missing)

connectionDetails

The connection details

cdmDatabaseSchema

A string specifying the CDM database schema e.g., database.dbo

cohortDatabaseSchema

A string specifying the cohort database schema e.g., cohort_database.dbo

cohortTable

A string specifying the cohort table

oracleTempSchema

Temp oracle schema

package

The name of the package

Value

A data frame with the cohortName, cohortId, size

Details

This is used by people running network studies using the package skeleton to enable users to create cohorts on their platform