Add obesity flag
Arguments
- x
A
cdm_tableobject, it mus containperson_idorsubject_idas columns.- indexDate
A character string that points to a
Datecolumn in thextable.- window
Window to asses
obesityin, it must be a vector of two numeric valuesc(min, max). Window times refer to days sinceindexDate.- conceptSet
It can either be a
, <codelist_with_details> or <concept_set_expression> object. It must contain obesity,bmias concepts. IfNULLconcepts will be retrieved using the OmopConcepts package.- bmiThreshold
Argument to indicate the thresholds for the obesity using BMI measurements. It can be:
A single number, any BMI measurement above the threshold will be consider as an obesity record.
A tibble with the columns
bmi_threshold,sex,age_minandage_max, to use age and sex specific thresholds.NULL the table
CohortRecipes::bmiThresholdwill be used.
- nameStyle
A character string with the name of the new column.
- name
A character string with the name of the new table. If
NULLa temporary table will be created.
Value
The table x with a new column column indicating if subjects have
an obesity record in the window of interest.