Conjunctive and Negation functions - ndobb/clinical-trials-seq2seq-annotation GitHub Wiki
Conjunctive functions, and()
and or()
, are used only as wrapper functions around eq()
s.
neg()
is the only negation function.
and()
and()
indicates that two or more eq()
s must all be true.
Arguments -
- Two or more
eq()
s.
Example -
'INC'
'3. Patients ≥ 1 and ≤ 6 months after type I myocardial infarction'
'3. Patients eq(op(GTEQ), val("1")) and eq(op(LTEQ), val("6"), temporal_unit(MONTH))
after eq(unit("type"), val("I")) cond("myocardial infarction")'
cond("myocardial infarction")
.num_filter(
eq(unit("type"), val("I"))
)
.duration(
and(
eq(op(GTEQ), val("1"), temporal_unit(MONTH)),
eq(op(LTEQ), val("6"), temporal_unit(MONTH))
)
)
if_then()
if_then()
indicates argument 2 should only apply to patients meeting argument 1.
Arguments -
- Two functions.
Example -
'EXC'
'2. Subject , if female , is pregnant or breastfeeding at screening .'
'2. Subject , if female() , is cond("pregnant") or cond("breastfeeding") at screening .'
if_then(
female(),
union(
cond("pregnant"),
cond("breastfeeding")
)
)
or()
or()
indicates that one of two eq()
s must be true.
Arguments -
- Two or more
eq()
s.
Example -
'INC'
'- Past or current infection .'
'- eq(temporal_per(PAST)) or eq(temporal_per(PRESENT)) cond("infection") '
cond("infection")
.temporality(
or(
eq(temporal_per(PAST)),
eq(temporal_per(PRESENT))
)
)
if_then()
if_then()
represents criteria that should only be used if the first argument is true.
Arguments -
- The "if" criteria in the form of a function.
- The "then" criteria in the form of a function.
Example -
'EXC'
'2. Subject , if female , is pregnant or breastfeeding at screening .'
'2. Subject , if female() , is cond("pregnant") or cond("breastfeeding") at screening .'
if_then(
female(),
union(
cond("pregnant"),
cond("breastfeeding")
)
)
neg()
neg()
indicates its arguments should not be true (i.e., are exclusion criteria).
Arguments -
- One or more functions.
Example -
'EXC'
'- No history of hypertension .'
'- neg() eq(temporal_per(PAST)) cond("hypertension") '
neg(
cond("hypertension")
.temporality(
eq(temporal_per(PAST))
)
)