Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demographicsCohort ignores ageGroup names #357

Open
catalamarti opened this issue Oct 17, 2024 · 1 comment
Open

demographicsCohort ignores ageGroup names #357

catalamarti opened this issue Oct 17, 2024 · 1 comment

Comments

@catalamarti
Copy link
Collaborator

cdm <- CohortConstructor::mockCohortConstructor()
#> Note: method with signature 'DBIConnection#Id' chosen for function 'dbExistsTable',
#>  target signature 'duckdb_connection#Id'.
#>  "duckdb_connection#ANY" would also be valid

demographics <- CohortConstructor::demographicsCohort(
  cdm = cdm, 
  name = "demographics", 
  ageRange = list("name1" = c(0, 19), "name2" = c(20, Inf))
)
#> ! cohort columns will be reordered to match the expected order:
#>   cohort_definition_id, subject_id, cohort_start_date, and cohort_end_date.
#> ℹ Building new trimmed cohort
#> Adding demographics information
#> Creating initial cohort
#> Trim age
#> ✔ Cohort trimmed

CohortConstructor::settings(demographics)
#> # A tibble: 2 × 3
#>   cohort_definition_id cohort_name    age_range
#>                  <int> <chr>          <chr>    
#> 1                    1 demographics_1 0_19     
#> 2                    2 demographics_2 20_Inf

Created on 2024-10-17 with reprex v2.0.2

@edward-burn
Copy link
Collaborator

So would you want two settings?

  • age_name (name of list, or age_range as is now if no name provided)
  • age_range (as is)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants