The table below shows some common condition expressions, grouped into categories. The complete condition syntax is in the Reference Guide
Category  Expression  Description 
arithmetic  absolute value of  Takes the absolute value of a number. 
as integer  Rounds a calculation to the nearest whole number.  
+, , *, /  Sum, difference, product and ratio of two numbers.  
to the power of  Raises one number to the power of another.  
ln  Calculates the natural (base e) logarithm of a number.  
log  Calculates the logarithm (base 10) of a number.  
exp  Calculates e (euler’s number) to the power of a number.  
sum across episodes of  The total value, across all episodes, of an attribute.  
comparison  <, <=, >, >=  Compares two numerical values. 
__ < __ < __ (between)  Compares a value with two values at once.  
statistical analysis  max, min  The maximimum and minimum values for an attribute, amongst all episodes. 
mean  Average of the numerical values.  
baseline mean of first … … values beginning … days ago  Average of a “window” of values beginning some time in the past.  
standard deviation  Standard deviation of the numerical values.  
text analysis and manipulation  is, is not, are, are not  Compares text values, ignoring case. also compares numeric values for equality. 
as one line  Converts multiline text to a single line  
are all the same  Identifies sample sequences that all have the same value.  
has changed since last episode  Identifies sample sequences in which there is a change between the current and secondlast values.  
contains, does not contain  Analyses text strings for presence or absence of substrings (case insensitive).  
starts with, ends with  Identifies samples that start or end with a particular text fragment (case insensitive).  
append  Appends the text value of one attribute to another.  
distinct values of  Appends together the distinct text values across episodes of a single attribute to produce a comma separated, alphabetically ordered list.  
list of … values  Appends together the text values across episodes of a single attribute to produce a list separated by new lines.  
text after  Extracts the phrase after a matching phrase.  
text before  Extracts the phrase before a matching phrase.  
part … of … split by  For extracting elements from a list in which elements are separated by a fixed token.  
text between  Extracts the phrase between two phrases.  
text of … between … and …  Extracts the phrase (substring, in IT terms) bounded by two positions in some text.  
character of … at position  Extracts the symbol at a given position in a string of text.  
first match in… of …  Extracts a phrase defined by a regular expression from some text.  
first match in… of … calculated perepisode  Extracts a phrase defined by a regular expression from some text, with the regular expression itself a calculation.  
matches  Detects samples in which text matching a regular expression is found.  
matches … with case  Same as matches, but case sensitive.  
exactly matches  Detects samples that exactly match a regular expression.  
exactly matches … with case  Same as exactly matches, but case sensitive.  
to upper case  Rewrites some text in capitals so that it stands out in conclusions.  
as word  Converts small integers to the equivalent words. for use in comments.  
as set  Converts comma separated values of an attribute into a set.  
reference range  high, normal, low  Compares sample values with their reference ranges from the external information system. 
is within … percent of normal  Compares sample values with their reference ranges, with a percentage tolerance.  
upper reference value of  Refers to the upper value in a reference range provided by the external information system.  
lower reference value of  Refers to the lower value in a reference range provided by the external information system.  
change since last result  has increased by more than  Identifies cases in which there has been an increase (absolute or percentage) for an attribute from the previously available value to the current value. 
has decreased by more than  Identifies cases in which there has been a decrease (absolute or percentage) for an attribute from the previously available value to the current value.  
has changed by more than  Identifies cases in which there has been an increase or decrease (absolute or percentage) for an attribute from the previously available value to the current value.  
has not changed by more than  Identifies cases in which the current value for an attribute is within some limit (absolute or percentage) of the previously available value for that attribute.  
percent increase from previous  Relative change between current and previous sample.  
percent decrease from previous  Relative change between current and previous sample.  
trend  has increased by more than x from each result to next  For detection of cases in which the values for an attribute show a rising trend, over all results or over all results in a given time period. 
has increased by more than x between each of last n results  For detection of cases in which the values for an attribute show a rising trend over a certain number of results.  
has decreased by more than x from each result to next  For detection of cases in which the values for an attribute show a falling trend, over all results or over all results in a given time period.  
has decreased by more than x between each of last n results  For detection of cases in which the values for an attribute show a falling trend over a certain number of results.  
net change in  Calculates the difference between the first and last samples for an attribute.  
percent increase from min  Relative change between current and minimum value.  
percent decrease from max  Relative change between current and maximum value.  
differences between  Differences between successive numerical episodes.  
differences from first  Differences between the numerical episodes and the first numerical episode.  
differences from average  Differences between the numerical episodes and the average of the numerical episodes.  
differences from max  Differences between the numerical episodes and the maximum value amongst the numerical episodes.  
difference from min  Differences between the numerical episodes and the minimum value amongst the numerical episodes.  
as percentages  Modifies the differences functions to give results as percentages.  
rate of change  Absolute or pointtopoint daily or annual rate of change between selected episodes.  
yearly rate of change by linear regression  Annual linear rate of change according to the leastsquares line of best fit.  
counting  all, each  Identifies cases in which every episode satisfies a constraint. 
some  Identifies cases in which at least one episode satisfies a constraint.  
at least, more than  Identifies cases in which the number of episodes that satisfy a constraint is greater than some given number.  
exactly  Identifies cases in which the number of episodes that satisfy a constraint is equal to some given number.  
at most, fewer than  Identifies cases in which the number of episodes that satisfy a constraint is less than or equal to some given number.  
no, none  Identifies cases in which no episodes satisfy a constraint.  
identifying a particular episode  at  Identifies a particular episode based on the values of an attribute. 
first  Refers to the first nonblank sample.  
most recent  Refers to the most recent nonblank sample.  
second most recent  Refers to the second most recent nonblank sample.  
next  Refers to the sample after the indicated one.  
previous  Refers to the latest nonblank sample before the indicated one.  
nearest  Refers to the sample closest in time to the indicated one.  
current  Used to refer to the current episode in complex conditions.  
time since an incident  days since (weeks, months, years too)  Identify cases in which no episodes satisfying a constraint have occurred recently. 
days between (also minutes between, hours between, weeks between, years between)  Compare the times of two significant events.  
days between episodes  Calculates the number of days between successive episodes.  
has value of more recently than  Compare the times at which two attributes have attained a particular value (e.g. “true”). 

calendar calculations  date at  Determines the date of a particular sample and presents it in the form “21/apr/05”. 
long date at  Determines the date of a particular sample and presents it in the form “21 april, 2005”.  
day of  Determines the day in the week of a particular sample.  
minutes at  Evaluates a sample as the number of minutes in the day after midnight.  
days from now, months from now  Calculates the date some days/months after the date of the most recent episode.  
is after date  Compares an attribute value with a fixed date in one of the two formats “21/apr/05” or “21 apr 05”.  
as days  Used for finding the number of days between two sample values  
minutes after epoch using format  Used for finding the time between any two case values, in any format.  
minutes difference between … and …  Time in minutes between the values of two attributes.  
days between episodes  Calculates the days between each successive episode in the case  
fractional days (years) between episodes  Calculates the time between selected episodes.  
fractional days (years) between first and subsequent episodes  Calculates the time between the first episode and subsequent episodes.  
today  Today’s date and time  
formatting  formatted to … places  Formats a numerical output to a fixed number of decimal places 
formatted as …  Formats a numerical value according to some output pattern  
as date  Display the sample value as a readable date in the format dd mmm yy  
as time  Display the sample value as a readable time in the format hh:mm  
as datetime  Display the sample value as a readable time using a flexible date and time format  
in format  Display the date and time using a flexible date and time format  
restriction clauses  of latest … values  Restricts attention to the most recent episodes. 
… episodes ago  For getting a value from some previous episode.  
previous  Restricts attention to the episodes before the current episode.  
where  Restricts attention to those episodes satisfying a constraint.  
within last  Restrict attention to recent episodes.  
older than  Restrict attention to older episodes.  
after  Restrict attention to episodes after some specified episode.  
before  Restrict attention to episodes before some specified episode.  
logical operators  and  For combining conditions. evaluates to true if both conditions are true 
or  For combining conditions. evaluates to true if either condition is true  
if…else  For choosing which attribute’s values to use, depending on some true or false condition.  
whenever…otherwise  For choosing between the samples of two attributes, on a perepisode basis.  
sets  {attributes}  Returns all of the primary attributes in a case. 
that equal  Selects the attributes in a case that have a specified value.  
in range  Defines a set as those attributes whose values are within a specified range  
except  Defines a set as those attributes in the first set but not in the second set (i.e. set difference)  
intersect  Defines a set as those attributes that are in both the first set and the second set (i.e.set intersection)  
union  Combines two sets into single set containing all elements from both sets (i.e. set union)  
not in  Same as ‘except”  
for, for current  Selects a set subject to some condition.  
for which, for which currently  Selects the attributes from a set that satisfy a predicate that uses variable attributes.  
in range … for  Defines a set with the ‘in range’ syntax, subject to some condition.  
number of  The number elements in a set.  
sum of  The sum of the values of the elements in a set.  
includes, does not include  Whether or not a set contains a particular attribute.  
is empty, are empty, is not empty, are not empty  Whether or not a set contains any elements.  
with some abnormal value  Collects together those attributes that have had an abnormal value.  
contains only high (low, normal) values  Detects cases in which every attribute in a set has high, low or normal values.  
contains only samples within 20 percent of normal  Detects cases in which every attribute in a set has a normal value, to within some percentage tolerance.  
as groups from  Displays a group name for each attribute in the set, rather than the attribute name.  
as names  Displays just the names of the attributes in a set, rather than the names and values  
miscellaneous  cardiovascular event risk  Calculates the probability of a patient having a heart attack. 
flag  Returns the flag field from a sample.  
units  Returns the units field from a sample.  
circular right shift of  Rearranges a sample sequence.  
distance between … and …  Calculates the distance between two points, given their latitude and longitude.  
fill from  Sets all episodes with the value from an attribute or constant. 