darwin-eu / darwin-eu/CDMConnector

Advice needed: how to include ATLAS cohort table OR self-generated cohort data the most flexible way

Open
#56 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.