Forums: Define.xml
Expression Code: From the ODM specification: If a FormalExpression is provided, it must contain a machine-readable expression that will evaluate to True or False. Multiple FormalExpressions can be provided if each has a different Context attribute, allowing the same expression to be represented in forms appropriate to multiple systems.
Expression Context: A free-form qualifier to suggest an appropriate computer language to be used when evaluating the FormalExpression content. For example: SAS 9.4
The Method itself is supposed to be plain English.
I have not seen the Formal Expression being used much in submission. When used, I have seen it sometimes return values other than True or False, which is strictly spoken not correct.
[Edited answer: please see correction below]
@Lex: if I am not wrong (please tell me if I am), the execution of "FormalExpression" must only evaluate to "true" or "false" when it is part of "ConditionDef".
When it is part of "MethodDef", it should evaluate to the data type (text, integer, float, ...) of the Item that references the method.
I use "FormalExpression" a lot in define.xml in my SDTM-generating software to keep all the machine-readable mappings between the operational data and the SDTM data. I remove them all when generating the final define.xml for submission ("clean-up button"): I presume the FDA is not at all interested in these scripts ;-)
@Jozef - You are completely right! I took the explanation from the ConditionDef.
This is the appropriate part of the ODM specification:
“A MethodDef defines how a data value can be obtained from a collection of other data values. The Description element must be provided and should include a prose description. This is the normative content of the MethodDef.
If a FormalExpression is provided, it must contain a machine-readable expression that implements the Description and will return a value. Multiple FormalExpressions can be provided if each has a different Context attribute, allowing the same expression to be represented in forms appropriate to multiple systems.”
Note to self: don’t answer forum questions while on vacation :-)
What is the purpose of the Expression Context and Expression Code columns on the Methods worksheet in the define specifications workbook? Where can I find documentation on these columns?