Open lcpinheiro opened 1 year ago
Another easy first commit:
Replace '@resultsDatabaseSchema' in the document "Building patient-level prediction models" cohort generation SQL code with '@cohortDatabaseSchema'.
There may also be a bug in this part (I'm not sure we defined resultsDatabaseSchema? so may need to replace resultsDatabaseSchema with cohortDatabaseSchema):
databaseDetails <- createDatabaseDetails( connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, cdmDatabaseName = '', cohortDatabaseSchema = resultsDatabaseSchema, cohortTable = 'AFibStrokeCohort', cohortId = 1, outcomeDatabaseSchema = resultsDatabaseSchema, outcomeTable = 'AFibStrokeCohort', outcomeIds = 2, cdmVersion = 5 )
Thanks, indeed, I changed my SQL file locally. Seems the SQL also creates two tables: PLPAFibStrokeCohort and AFibStrokeCohort, I suppose it's just the one (?).
In Building patient-level predictive models, the AfStrokeCohorts.sql script uses the parameter
@resultsDatabaseSchema
to call that object in R. However, the subsequent code does not use that object, but a different parameter:@cohortsDatabaseSchema
.This means the resulting SQL does not replace the parameter and thus throws an error.