Closed drewcdisc closed 7 months ago
While developing the FDA STF example, I tried to create some age group groupings using compound expressions. The compound expressions could be converted from the Excel template into YAML format, but conversion of YAML to JSON failed because the whereClauses
in the CompoundGroupExpression
class can currently only be specified as groupId
references (not as fully specified conditions or where clauses). I've seen some LinkML examples using:
any_of:
- inlined: true
- inlined: false
(i.e. sub-classes can either be fully specified or referenced by identifier) but haven't managed to get this to work without getting an error at some point in the process (generation of YAML, conversion to JSON, etc.).
Additional thoughts:
dataset
could/should be an attribute of an identified where clause (i.e., an attribute of AnalysisSet
, DataSubset
, Group
, AnalysisGroup
, and DataGroup
instead of WhereClauseCondition
): "this is a restriction that applies to the named dataset's variable(s)".whereClauseId
"). In this situation, it might also be helpful to define "join key" variables as metadata (to define how the datasets are joined), though this raises some questions:
dataset
and variable
at the analysis level?WhereClauseCompoundExpression
class:
logicalOperator
and inlined whereClauses
(the current definition)logicalOperator
, non-inlined whereClauseIds
, and the ability to define join keys (but would need to figure out how to define these and it might be better to define join keys at a higher level).WhereClauseCompoundExpression
class (CompoundSetExpression
, CompoundGroupExpression
, CompoundSubsetExpression
) - would you need two "flavours" of each...?The model has been updated to support the definition of compound expressions using, in the whereClauses
attribute, either of the following:
WhereClause
(containing either a condition
or another compoundExpression
):
whereClauses:
- level: ...
order: ...
condition:
dataset: ...
variable: ...
comparator: ...
value:
- ...
- level: ...
order: ...
compoundExpression:
whereClauses:
- ...
subClauseId
attribute referencing another "identified WhereClause
" by identifier value:
whereClauses:
- level: ...
order: ...
subClauseId: ...
This change has been applied for all types of WhereClause
, including WhereClause
, AnalysisSet
, DataSubset
and Group
.
Regarding using groupings with compound expressions.: