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

IncidenceRate SQL Server - SQL Error #14

Closed shorban-uod closed 2 years ago

shorban-uod commented 2 years ago

Covid19SubjectsAesiIncidenceRate v1.2.4 completes the cohort creation and cohort diagnostics successfully, but fails at the first incidence rate SQL query on a Microsoft SQL Server database.

I have been unable to run the SQL on SQL Server Management Studio to debug, as it references temp tables which are cleared when the query fails.

Error and log files attached.

errorReportSql.txt Covid19SubjectsAesiIncidenceRate_ErrorReportR.txt Covid19SubjectsAesiIncidenceRate_log.txt .

ericaVoss commented 2 years ago

I see the issue and I caused the problem. I had a typo in my SQL and you must have pulled before I was able to fix it: https://github.com/ohdsi-studies/Covid19SubjectsAesiIncidenceRate/commit/e49b85ff1553cbb70eeda582338560f01d5d2f39

You are bombing here: CAST(count_big(distinct t1.subject_id) as num_persons_w_no_tar

So you have 2 options:

OPTION 1 - try to pick up where you bombed

OPTION 2 - start over

However, you can just start over again from a clean folder if you don't want to be bothered with the above.

shorban-uod commented 2 years ago

This has now been fixed and the issue I was running into was some sort of hangover from a previous install. Erica and I created a fresh folder, downloaded the lockfile and restored the project and this pulled the correct SQL file and solved the issue.

I'll close this issue now.