ohdsi-studies / PioneerWatchfulWaiting

This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
Apache License 2.0
7 stars 18 forks source link

Errors running `runCohortDiagnostics` #79

Closed Jake-Gillberg closed 3 years ago

Jake-Gillberg commented 3 years ago

console_log.txt

console_log_errors.txt

sql_error.txt

These errors are confounding me. Looks like it is propagating up from Cohort Diagnostics

Jake-Gillberg commented 3 years ago

Was this the fix for the issue? https://github.com/ohdsi-studies/PioneerWatchfulWaiting/commit/65fd63d2758016329294e2e871c671204066fbc4

keesvanbochove commented 3 years ago

@Jake-Gillberg thanks for following up, it looks like I was a bit too fast with closing this. I had assumed that it was related to #78 but looking at the error logs this seems to be a different issue. It seems the offending query is in https://github.com/OHDSI/CohortDiagnostics/blob/master/inst/sql/sql_server/ComputeIncidenceRates.sql, so this would actually be an issue to raise in CohortDiagnostics instead. Could it be caused by invalid start or end dates in TMC_RED.dbo.observation_period? It's also possible that year_of_birth is null but judging by the SQL that should not throw an error although it may mess up the data.

Jake-Gillberg commented 3 years ago

Any thoughts on if these errors have impacted the results we sent? The run was able to recover successfully after encountering them. I'll potentially be able to dig into this further next week

keesvanbochove commented 3 years ago

I'm closing this issue here since it is actually raised in CohortDiagnostics (see link above), so it should be filed there if it persists: https://github.com/OHDSI/CohortDiagnostics/issues.

To answer your last question: It would show up in the cohort diagnostics results as missing incidence rates for some cohorts, but this may not be a big deal (the cohort in the attached log, 301 is a strata cohort for EAU High Risk that isn't populated in many databases anyway). More problematic is that it stops the execution of cohort diagnostics as well, so the diagnostics results that you sent in are empty (the zip file is only a few KB).

There is a small chance that this problem was actually caused by some end dates that were before the start dates, which has been fixed in the newest release https://github.com/ohdsi-studies/PioneerWatchfulWaiting/releases/tag/v0.4.4 - maybe it's worth trying this version and see if the error persists?