Doc IndicationRule
Back to current version Restore this version

Definition#

Indication rules basically initiate the presentation of certain, subsequent questions or questionnaires to the user depending on previously provided answers. Indications also can be defined dependent on an already derived solution. In general, indicated questionnaires/questions are added at the end of the current dialog-agenda (the current, still-to-pose questionnaires/questions). However, there also exist instant indication rules in KnowWE, which present the indicated questionnaires/questions instantly after the current question.

Syntax - Basic indication rules#

Indication of one questionnaire/question#

IF someQuestion = answerValue
THEN specialQuestions
In this example, the questionnaire specialQuestions is added at the end of the dialog-agenda if the question someQuestion has been answered with answerValue.

Indication of multiple questionnaires/questions#

IF diag = diagState
THEN questionnaire1; questionnaire2
The above example shows that multiple questionnaires/questions for a gradual indication are simply separated by semicolons. It also presents the solution-dependent indication: if the diagnosis diag has the diagnosis state diagState (see Doc DiagnosisRule for a listing of scoring and diagnosis states) the questionnaires questionnaire1 and questionnaire2 are gradually indicated.

Checking for answers#

IF KNOWN[quest]
THEN specialQuestion
If a question/questionnaire should be indicated independet of the concrete answer value but depending just on that any answer value was provided, the KNOWN keyword is to be used. The example shows how to check, whether question quest has already been answered. The question that has to be checked must be placed within square brackets.

Syntax - Instant indication rules#

If an indicated question/questionnaire is to be presented instantly after the current question, so-called instant indication rules have to be used.
IF q1 = yes
THEN INSTANT [questionInstant]
In the following example questionInstant is presented instantly after the current question, if the question q1 is answered with yes - further questionnqires may be added by additionally listing them in square brackets, separated by semicolons (e.g. [qs1; qs2]).

Regarding start questionnaires, however, instant indications don't intervene the order there. Start questionnaires are always presented first.