I’m trying to create a rule for rule engine which searches a combined string for a particular value for a data set is quite messy in terms of string content .
for example: combined string row - “28000, male, employed at twitter”
rule: $combined string$ LIKE “employed”
to search for employed people
is it possible to create a rule with NOT LIKE i.e. NOT $combined string$ LIKE “employed”
I’m using a Rule Engine Dictionary on multiple healthcare data sets, which is why i’m using rules. As they will change depending on what set i’m working on.
In this case i want to add a rule to exclude a condition, additionally to a set of rules already being applied.
the Row Filter can also be provided with a dictionary. It is called Rule-based Row Filter (Dictionary). If you want to use the filtered records further, a Rule-based Row Splitter (Dictionary) could also be useful.
You need to include the wildcard characters in your string to get an inexact match e.g "*employed*" to match “is employed at work”. Usual wildcard characters apply ?*`.
To invert the match you can, as you suggest, use the NOT clause. I tested NOT both with and without brackets around the main clause and it appears that LIKE is higher precedence than NOT. In practice, I always put brackets around terms to ensure that processing is explicit e.g. NOT ($column1$ LIKE "*employee*") => TRUE. This prevents any risk that the computer processes operators in a different sequence from the one I intended.