Add male attribute to a query

Add female attribute to a query

Add race filter to a demographic criteria group

Add ethnicity filter to a demographic criteria group

male()

female()

raceConcepts(...)

ethnicityConcepts(...)

Arguments

...

Integer OMOP ethnicity concept IDs (e.g. 38003563L Hispanic or Latino, 38003564L Not Hispanic or Latino).

Value

An attribute that can be used in a query function

An attribute that can be used in a query function

A conceptAttribute with name Race for use in withAll()/withAny() attrition groups.

A conceptAttribute with name Ethnicity for use in withAll()/withAny() attrition groups.

Functions

  • male(): male demographic attribute

  • female(): female demographic attribute

  • raceConcepts(): race demographic attribute

  • ethnicityConcepts(): ethnicity demographic attribute

Examples

# Create a cohort of males with Type 1 diabetes
t1dm <- cs(descendants(201254, 435216, 40484648), name = "type 1 diabetes")
t1dm_males <- cohort(conditionOccurrence(t1dm, male()))
# Create a cohort of males with Type 1 diabetes
t1dm <- cs(descendants(201254, 435216, 40484648), name = "type 1 diabetes")
t1dm_females <- cohort(conditionOccurrence(t1dm, female()))