OHDSI / CohortGenerator

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

Prevent upload of inclusion rule information #78

Closed anthonysena closed 1 month ago

anthonysena commented 1 year ago

Currently, inclusion rule name insertion will use bulk uploading optionally depending on how a user has their the environment variables set. Here is a reference to the code:

https://github.com/OHDSI/CohortGenerator/blob/f170a5085aa729dc9fd03491e9b653ac7439dd5c/R/CohortStats.R#L120-L128

And the documentation for the insertTable command:

http://ohdsi.github.io/DatabaseConnector/reference/insertTable.html

Generally, the amount of rows to insert for inclusion rules is small so we should disable bulk upload here since may require additional R package dependencies based on the target RDMBS for the insert. Specifically, RedShift requires additional AWS packages when bulk uploading is performed.

anthonysena commented 1 month ago

Instead of uploading these rules, let's use an in-memory join approach to obtain this information.

anthonysena commented 1 month ago

The notion of uploading the inclusion rule names should be removed per #158 but since this is a breaking change, we'll wait for v1.x to address this. In the meantime, the exportCohortStatsTables function now takes a cohortDefinitionSet argument to avoid the need to upload inclusion rules per #156.