Demographic functions - ndobb/clinical-trials-seq2seq-annotation GitHub Wiki

Demographic functions, alongside Clinical functions, form the main part of criteria present in clinical trials eligibility descriptions. Demographics functions are used in the annotation to describe demographic traits of humans, such as age() or gender.

adult()

adult() represents a criterion for adult patients (i.e., over 18 years of age).

Arguments -

  • No arguments.

Example -

'INC'

'adult patients ( age 18 and above ) who admitted to burn unit during sampling period'

'adult() patients ( eq(op(GTEQ),val("18")) ) who enc(INPATIENT) to loc(unit("burn unit")) 
 during sampling period'

intersect(
  adult()
    .equiv(
      age().num_filter(eq(op(GTEQ), val("18")))
    ),
  enc(INPATIENT)
    .loc(unit("burn unit"))
)

age()

age() represents a criterion for age.

Arguments -

  • No arguments.

Example -

'INC'

'-  Patients aged 21 years or younger at the time of enrollment on this study of any gender , 
    race or ethnicity .'

'-  Patients age() eq(val("21"), temporal_unit(YEAR), op(LTEQ)) at the time of enrollment on 
    this study of any gender , race or ethnicity .'

age()
    .num_filter(
        eq(val("21"), temporal_unit(YEAR), op(LTEQ))
    )

child()

child() represents children.

Arguments -

  • No arguments.

Example -

'EXC'

'-  Children who are deceased prior to the family being approached for study participation'

'-  child() who are death() prior to the family being approached for study participation'

intersect(
    child(),
    death()
)

ethnic()

ethnic() represents an ethnicity, race, or ethnic heritage.

Arguments -

  • Quoted text, e.g., ethnic("Chinese")

Example -

'INC'

'-  self - identity as African American'

'-  self - identity as ethnic("African American")'

ethnic("African American")

family_member()

family_member() represents a member of a patient's family.

Arguments -

  • A function representing what the family member(s) suffer from or have experienced.

Example -

'EXC'

'-  Hypersensitivity to fluoridated anesthetics or history of malignant hyperthermia 
    in the patient or family'

'-  cond("Hypersensitivity") to mod("fluoridated anesthetics") or eq(temporal_per(PAST)) 
    of cond("malignant hyperthermia") in the patient or family_member()'

union(
    cond("Hypersensitivity")
        .mod("fluoridated anesthetics"), 
    union(
        cond("malignant hyperthermia"),
        family_member(
            cond("malignant hyperthermia")
        )
    )
    .temporality(
        eq(temporal_per(PAST))
    )
)

female()

female() represents a patient who identifies as female.

Arguments -

  • No arguments.

Example -

'EXC'

'-  Pregnant or lactating women'

'-  cond("Pregnant") or cond("lactating") female()'

intersect(
    union(
        cond("Pregnant"), 
        cond("lactating")
    ),
    female()
)

lang()

lang() represents a patient's language.

Arguments -

  • Quoted Text, e.g., lang("French")

Example -

'EXC'

'2.  Not speaking English before age 5 years .'

'2.  neg() speaking lang("English") before age() eq(val("5"), temporal_unit(YEAR)) .'

neg(
    seq(
        lang("English"),
        before(
            age()
                .num_filter(
                    eq(val("5"), temporal_unit(YEAR))
                )
        )
    )
)

male()

male() represents a patient who identifies as male.

Arguments -

  • No arguments.

Example -

'INC'

'-  Male or Female , aged 40 years to 85 years .'

'-  male() or female() , age() 
    eq(val("40"), temporal_unit(YEAR), op(BETWEEN), val("85"), temporal_unit(YEAR)) .'

intersect(
    union(
        male(), 
        female()
    ), 
    age()
        .num_filter(
            eq(val("40"), temporal_unit(YEAR), op(BETWEEN), val("85"), temporal_unit(YEAR))
        )
)

mother()

mother() represents the mother of a patient.

Arguments -

  • A function representing what the patient's mother has suffered from or experienced.

Example -

'INC'

'-  Maternal age ≥ 18 yrs'

'-  Maternal age() eq(op(GTEQ), val("18"), temporal_unit(YEAR))'

mother(
    age()
        .num_filter(
            eq(op(GTEQ), val("18"), temporal_unit(YEAR))
        )
)