darwin-eu / darwin-eu/CDMConnector
Advice needed: how to include ATLAS cohort table OR self-generated cohort data the most flexible way
- Dominant language
- HTML
- Stars
- 17
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
I want to create an R-package that uses CDMConnector for making data queries and where user either:
1) uses ATLAS-generated cohort table (uses existing cohorts in the database)
or, alternatively
2) builds cohort via CDMConnector commands.
What is the best (minimal code) way to do this? I expect that later the cdm$cohort has the necessary data?
For case 1:
I understand that I can use `CdmFromCon(writeSchema=schema, where ATLAS generated the cohorts)`, but to my knowledge, writeSchema has to have write permissions which is not the case for option 1 this time. Our data policy does not allow users directly modify tables in ATLAS schema, and forces creating new tables only user's home schema.
For case 2:
I understand that probably this is the best way:
`cdm$cohort <- omopgenerics::newCohortTable(my_cohort_data)`
Advice needed.
Contributor guide
Assessment
This issue has not been assessed yet.