I am not hitting on the keyword(s) to try and find the different options available to cause visibility regions to display. I know there are several but can only think of a few currently. Those are separated on individual lines below so as not to cause unnecessary confusion with enclosing them in single or double quotes, or parentheses or such:
==
<>
>=
Can anyone tell me where to find a full list of these values (and their definitions/uses)? I'd also like to make sure I have a listing of when and how to use "AND", "OR", "NOT", "Match", etc.
Here's why I'm asking, if you'd rather help me solve the underlying issue that has me looking into this. I have a Dropdown list with four comma separated choices (Left Hip Replacement,Right Hip Replacement,Left Knee Replacement,Right Knee Replacement). The Dropdown List Connection Type is set to New Observation and the Name is SURGERY TYPE.
I've tried several statements in the Visibility Region, only one of which allowed the visibility region to display (and it didn't display as I had hoped it would, which is why I'd like the "dictionary" of these operators). Here are some of what I've tried to no avail:
OBSNOW("SURGERY TYPE") == "LEFT KNEE REPLACEMENT"
DOCUMENT.PROCEDURE_TYPE == "LEFT KNEE REPLACEMENT"
Match(DOCUMENT.PROCEDURE_TYPE,"Left Knee Replacement")==1
DOCUMENT.PROCEDURE_TYPE=="Left Knee Replacement"
DOCUMENT.PROCEDURE_TYPE== "Left Knee Replacement"
DOCUMENT.PROCEDURE_TYPE== "Left Knee Replacement" OR
DOCUMENT.PROCEDURE_TYPE== "Right Knee Replacement"
DOCUMENT.PROCEDURE TYPE== "Left Knee Replacement"
DOCUMENT.PROCEDURE TYPE== "Right Knee Replacement"
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.