It is possible to apply rules to questionnaires. Rules are applied independently without affecting a patient’s experience. Rules can generate different types of outcomes:

  • A recommendation in the medical history report.
  • A priority number on a case.
  • Information that is readable by external systems.

The rules are configured by the Doctrin medical team. The rules can be specific for a unit or applied to several units. Rules can be exported and imported in JSON format (JavaScript Object Notation).

Hierarchic vs non-hierarchic rules

More than one rule can be applied to a questionnaire. The rules are built with or without hierarchy. If the rules are hierarchical, a maximum of one outcome can be generated.

Example:
If a patient fulfils the criteria in rule 1 and 2, only the outcome from rule 1 will be generated. Rules that are not hierarchical can fall out simultaneously, in case a patient fulfils the criteria of several rules.

Each response from the patient is in this context a variable. To give value to the variables when writing rules, so-called logical expressions are used, consisting of comparison operators and logical operators.

The rules are built as condition sets, where conditions between different variables are defined using logical expressions defined in blocks delimited by brackets.

Syntax
Comparison operators  
= Equal in comparison; A is equal to B
!= Not equal to; A and B are not equal
< Less than; A is smaller than B
> Greater than; A is larger than B
>= Greater than or equal to; A is greater than or equal to B
<= Less than or equal to; A is less than or equal to B
Logical operators  
IF When several conditions are combined in relation to each other in a block. Each block is delimited by arc brackets (or).
AND All the conditions must be true for the block to be true.
OR One or more of the conditions must be true for the block to be true.
NOT No condition must be true for the block to be true.
INCLUDES ANY One, or more, of the variables must be met in for the condition to become true.
INCLUDES ALL All variables must be met in for the condition to become true.
NOT INCLUDES ANY None, or more, of the specified variables must be met in for the condition to become true.
NOT INCLUDES ALL All of the specified variables must not be met in for the condition to become true.
Other values  
AGE Age – where min is the age delimited downwards (eg 1 = 1 year and 0 days) and max is the age delimited upwards (11 = 11 years and 364 days)
GENDER Assigned sex at birth – male, female or both