
Get occurrences of of a concept set from ATLAS for a given cohort
Source:R/get_condition_concepts.R
pull_concept_set.RdGet occurrences of of a concept set from ATLAS for a given cohort
Arguments
- cohort
tbl; reference to a table created in a user schema with a column called "person_id", and columns for start_date and end_date
- concept_set_id
num; the number associated with the concept_set_id in ATLAS
- start_date
the name of the start_date column in the cohort table (unquoted)
- end_date
the name of the end_date column in the cohort table (unquoted)
- concept_set_name
chr; Name to describe the concept set, used to create an indicator variable
- min_n
dbl; the minimum number of occurrences per person to consider the indicator true
- n
dbl; count the number of occurrences per person (will not include zeros)
- keep_all
lgl; keep columns with information about the concept (e.g., concept name, id, etc.)
- con
the connection object to ohdsilab
- atlas_url
chr; the base url for ATLAS (not ohdsilab)
- write_schema
chr; schema for the user