ohdsi-studies / Covid19SubjectsAesiIncidenceRate

Extending on our previous work by Li et al. in understanding the incidence rates of adverse events of special interest (AESI) for COVID-19, this work will look at the rates of these AESIs in patients who had COVDI-19 disease.
https://ohdsi-studies.github.io/Covid19SubjectsAesiIncidenceRate/Protocol.html
2 stars 4 forks source link

object 'cohortTable' not found #21

Closed andrepist closed 2 years ago

andrepist commented 2 years ago

Hi, I'm trying to run the package but the following error is thrown, after instanciating the cohorts:

... 16/16: Instantiation cohort Thrombosis with Thrombocytopenia (TWT) (547.sql) 2022-01-13 10:35:56 [Main thread] INFO Covid19SubjectsAesiIncidenceRate createCohortsAndRef Insert outcome reference 2022-01-13 10:35:57 [Main thread] INFO Covid19SubjectsAesiIncidenceRate createCohortsAndRef ---------------------------------------------------------- 2022-01-13 10:35:57 [Main thread] INFO Covid19SubjectsAesiIncidenceRate createCohortsAndRef ---- Union Cohort Tables for Cohort Diagnostics ---- 2022-01-13 10:35:57 [Main thread] INFO Covid19SubjectsAesiIncidenceRate createCohortsAndRef ---------------------------------------------------------- 2022-01-13 10:35:57 [Main thread] FATAL SqlRender render Error in lapply(list(...), function(x) { : object 'cohortTable' not found

Thread: Main Message: Error in lapply(list(...), function(x) { : object 'cohortTable' not found Level: FATAL Time: 2022-01-13 10:35:57

Stack trace: 7: logFatal(gsub("\n", " ", geterrmessage())) 6: Main.R#68: (function () { logFatal(gsub("\n", " ", geterrmessage())) if (!is.null(previousErrorHandler)) { eval(previousErrorHa 5: lapply(list(...), function(x) { paste(x, collapse = ",") }) 4: render(sql = parameterizedSql[1], warnOnMissingParameters = warnOnMissingParameters, ...) 3: createCohortsAndRef.R#175: SqlRender::loadRenderTranslateSql(sqlFilename = "CreateCohortTableUnion.sql", packageName = "Covid19SubjectsAesiIncid 2: Main.R#68: createCohortsAndRef(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, cohortDatabaseSchema = cohortDataba 1: Covid19SubjectsAesiIncidenceRate::execute(connectionDetails = connectionDetails, outputFolder = outputFolder, cdmDatabaseSchema = cdmDatabaseSch

ericaVoss commented 2 years ago

Would it possible to share your log files?
• COVID19SubjectsAesiIncidenceRate_log.txt • COVID19SubjectsAesiIncidenceRate_ErrorReportR.txt • ErrorReportSql.txt (this is typically found a level up)

If you rather not share on GitHub, you can send them to evoss3 (AT) its.jnj.com.

andrepist commented 2 years ago

Hi Erica, I attach the files. The ErrorReportSql was not available. Thanks, Andrea Covid19SubjectsAesiIncidenceRate_log.txt Covid19SubjectsAesiIncidenceRate_ErrorReportR.txt

ericaVoss commented 2 years ago

@andrepist - this is very odd to have gotten through creating all the cohorts but bomb on the union step. I'm wondering if something wasn't set properly in the variables needed to run. Do you mind emailing me so we could set up some time to meet? I'd like to see how you are kicking it off. evoss3 (AT) its.jnj.com

ericaVoss commented 2 years ago

I am closing this issue, I think the issue happened because cohortTable was not specified.

cohortTable <- "aesi_cohort"

ericaVoss commented 2 years ago

We are seeing a similar issue at UCSF. However it is hitting the issue at this place in CD: https://github.com/OHDSI/CohortDiagnostics/blob/692c97c54f555f1e2a3e2e851abfc042596cd5d1/R/CohortLevelDiagnostics.R#L91

I've asked them to check the specified variables first.

ericaVoss commented 2 years ago

This has now been resolved