OHDSI / CohortGenerator

An R package for instantiating cohorts using data in the CDM.
https://ohdsi.github.io/CohortGenerator/
11 stars 10 forks source link

getStatsTable is missing databaseId #116

Closed gowthamrao closed 2 months ago

gowthamrao commented 9 months ago

I tried to use getCohortStats to get cohort stats. But i got an error message. it complained that databaseId was missing. I had given it databaseId.

So i looked in the code and noticed this function is not getting the databaseId

`` results[[table]] <- getStatsTable( connectionDetails = connectionDetails, connection = connection, cohortDatabaseSchema = cohortDatabaseSchema, table = cohortTableNames[[table]], snakeCaseToCamelCase = snakeCaseToCamelCase, includeDatabaseId = includeDatabaseId )


maybe its a bug?
anthonysena commented 9 months ago

Yes, this looks like a bug whereby the databaseId is not passed here:

https://github.com/OHDSI/CohortGenerator/blob/8379cb8f0b0a089589e6b14be52b752dc687afc6/R/CohortStats.R#L235-L242