Hi Chris,
The operators used in VFE are actually part of the MEL (Medicalogic Expression Language) that is created and maintained by athena. You should be able to access a document named 'Creating Clinical Content' via the Customer Success Portal on athena's website.
In the meantime, I want to clarify how visibility layers work. The statement's content actually is irrelevant, only the result is. Basically, to show the layer, the statement must evaluate to a boolean value of TRUE and for it to be hidden, it must evaluate to a boolean value of FALSE. In fact, you can actually use TRUE and FALSE to permanently display or hide a layer. If you look at other's creations, you might see something like 1 double equals 1 or 1 less-than-greater-than 1. Both of these are valid but they are not efficient. It is better to simply write TRUE or FALSE.
A few things when creating the statements to keep in mind:
1) Never use a single equals sign, in MEL, that is an assignment operator. Instead use the double equals which indicates comparison or valuation.
2) When using match(string, sub-string), understand only index number where the sub-string is found is actually returned. If not found, it will always return a zero. Also understand that case, spacing, and spelling matter. The match must be exact. Also know it is possible to return a match within a string, resulting in a false 'match' under certain conditions. This can be mitigated by knowing the value being used as the string and using the 'start' index for a TRUE match.
3) The use of AND / OR is simplified if you keep in mind that AND means both sides of the AND must evaluate to TRUE to show. Conversely, with OR, only one side of the OR statement must be TRUE.
When using AND, only one combination will result in a TRUE value:
TRUE and TRUE is TRUE
TRUE and FALSE is FALSE
FALSE and TRUE is FALSE
FALSE and FALSE is FALSE
When using OR, as long as one 'side' is TRUE, the result is TRUE:
TRUE or TRUE is TRUE
TRUE or FALSE is TRUE
FALSE or TRUE is TRUE
FALSE or FALSE is FALSE
You can mix AND with OR using parenthesis complying with the ordinal valuations typically associated with mathematics.
Example:
((1 == 1) and (X == 1)) or X == 2
If X equals 0 or is > 3 then this will evaluate to FALSE always, but if X is equal to 2 or 1 it will always be TRUE.
All of this and much more are covered in the VFE classes I teach through Logical Innovations. If you are interested, you might wish to review the website for more information.
https://www.logical-innovations.com/site/
I hope this helps.
Posted : April 1, 2024 2:07 am