-
We report on vaccination under different age group. Something like
I have created a study definition with population satisfying a certain age group.
Is it possible to have a single study definition with population targeting different age groups or do I need to create multiple study definitions and extract cohort data separately? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The typical way to analyse different age groups (or any other category) seperately would be to define an age group variable (either within the study definition, or after you have imported the extracted data for analysis) and then stratify or group your analysis on that variable. To create an age group variable within the study definition you can use the age_group = patients.categorised_as(
{
"0": "DEFAULT",
"16-59": """ age >= 16 AND age < 60""",
"60-69": """ age >= 60 AND age < 70""",
"70-79": """ age >= 70 AND age < 80""",
"80+": """ age >= 80 AND age < 120""",
},
return_expectations={
"rate": "universal",
"category": {
"ratios": {
"16-59": 0.5,
"60-69": 0.125,
"70-79": 0.25,
"80+": 0.125,
}
},
},
), For the specific usecase you describe, you might be interested in using |
Beta Was this translation helpful? Give feedback.
The typical way to analyse different age groups (or any other category) seperately would be to define an age group variable (either within the study definition, or after you have imported the extracted data for analysis) and then stratify or group your analysis on that variable.
To create an age group variable within the study definition you can use the
patients.categorised_as
function as follows (assumingage
is defined elsewhere in the study definition):