Tallis Training

4a: Create a Simple Decision Based On Results of an Enquiry

In this chapter you will add a decision task to the process-description you created in the previous chapters. Decisions are tasks in which a choice is made (either by the Tallis Engine or by the end-user) between several different options, known as candidates. The current decision will recommend one of two possible diagnoses – cancer or peptic ulcer – based on the data collected by the Patient history enquiry.

To download the process-description created in the previous chapter select File > Load Process Description From Web Repository. If you are logged in, the Load Process Description dialog appears; otherwise, you have to log in (if you don’t have a personal account, use the guest account: User Name = Guest; Password = testpass). Navigate to World\Tutorials and select and load Chapter03_terminate_a_process.

1. Open the Process-Description That Was Created in Chapter 3

For more information about opening files see Step 1 of Chapter 2.

2. Add a Decision

Click on the Decision button in the toolbar (the decision icon is marked by a red square in the figure below); then click in the network view area to place the task.

Make sure the new decision is selected, and enter the following information in the Task Attributes panel:

Instance Name: Diagnosis_decision
Caption: Diagnosis

3. Add Candidates to the Decision

A candidate is added for each choice option. In this decision there will be two candidates, cancer and peptic ulcer.

Cancer Candidate

In the Candidates tab of the Decision Specific Attributes panel, enter the following information:

Name: cancer
Description: The diagnosis is cancer

Click Add.

  • The Name is an alphanumeric string representing the candidate’s ID.
  • The Description is the text label displayed to the end-user when the decision is executed.

Note: To edit a candidate, double-click it, or select it and click Edit.

Peptic Ulcer Candidate

Add the second candidate. Use the following information:

Name: peptic_ulcer
Description: The diagnosis is peptic ulcer

Don’t forget to Click Add.

You should now have two candidates in the Diagnosis decision:

4. Add Arguments For Each Candidate

When a decision is executed, arguments for and/or against each candidate are evaluated. The value of the net support of all arguments of a given candidate is typically used by the decision’s recommendation rule to determine whether or not a particular candidate is to be recommended. Next, you’ll add arguments to each of the candidates.

The Diagnosis decision will be based on the five data items that are entered by the clinicians in the Patient history enquiry: the patient's age; the pain site; the relation of the pain to meals, whether the patient is a smoker or a non-smoker; and the result of the biopsy, if there is one.

The table below displays the relationship between the data items and the possible candidates (note that the information in this table is not reliable and was fabricated for the purpose of this exercise).

  Cancer Peptic Ulcer

Age More common among older people More common among younger people
Pain Site Epigastric Epigastric
Pain Time Immediately after meals Delayed
Smoking More common among smokers -
Biopsy Result Positive Negative

Based on this table, arguments for each candidate can now be added.

Select the Arguments tab in the Decision Specific Attributes panel.

Cancer Candidate

From the Candidates drop-down list box, select the cancer candidate.

From the table above it can be seen that an older age, epigastric pain immediately after meals, smoking and a positive biopsy result are all arguments in favour of a cancer diagnosis. While most of these only suggest cancer, a positive biopsy result is much more conclusive. Five arguments can be constructed to ensure appropriate selection of the cancer candidate; four offer some support for the candidate, and one offers conclusive support:

1. Argument for the cancer candidate

Enter the following information:

Condition: age >= 70
Description: Patient is elderly
Support: + (For)

Click Add.

  • The Condition is a truth-valued expression that represents the circumstances under which the argument applies.
  • The Description is the text string displayed to the end-user during runtime (to represent the argument). If there is no description, the condition is displayed instead.
  • The Support that the argument offers if the condition is true is either for or against the candidate, or it can confirm or exclude the candidate.

Note: To edit an argument, double-click it, or select it and click Edit.

2. Argument for the cancer candidate

Enter the following information:

Condition: pain_site = Epigastric
Description: Pain site is epigastric
Support: + (For)

Click Add.

3. Argument for the cancer candidate

Enter the following information:

Condition: pain_time = Immediate
Description: Pain time is immediate
Support: + (For)

Click Add.

4. Argument for the cancer candidate

Enter the following information:

Condition: Smoker  = Yes
Description: Patient is a smoker
Support: + (For)

Click Add.

Note: If a confirming or an excluding argument is true, all other arguments are disregarded, as the support value of these arguments is infinite (either for or against the candidate).

5. Confirming argument for the cancer candidate

Enter the following information:

Condition: biopsy  =  Positive
Description: Biopsy result is positive
Support: ++ (Confirming)

Click Add.

You should now have five arguments in the Argument list of the cancer candidate:

Assuming the default recommendation rule (that requires a net support value larger than 1 for the candidate to be recommended) is used, if the patient is one or more of the following: Seventy or older, a smoker, has epigastric pain, has pain immediate after meals, has a positive biopsy result – the caner candidate will be recommended.

Peptic Ulcer Candidate

From the Candidates drop-down list box, select the peptic_ulcer candidate.

From the table above it can be seen that a younger age, epigastric delayed pain and a negative biopsy result are all arguments in favour of a peptic ulcer diagnosis. Four arguments can be constructed to ensure appropriate selection of the peptic ulcer candidate:

1. Argument for the peptic ulcer candidate

Enter the following information:

Condition: age < 70
Description: Patient is young
Support: + (For)

Click Add.

2. Argument for the peptic ulcer candidate

Enter the following information:

Condition: pain_site = Epigastric
Description: Pain site is epigastric
Support: + (For)

Click Add.

3. Argument for the peptic ulcer candidate

Enter the following information:

Condition: pain_time  =  Delayed
Description: Pain time is delayed
Support: + (For)

Click Add.

4. Argument for the peptic ulcer candidate

Enter the following information:

Condition: biopsy  =  Negative
Description: Biopsy result is negative
Support: + (For)

Click Add.

You should now have four arguments in the Argument list of the peptic ulcer candidate:

Assuming the default recommendation rule is used, if the patient is one or more of the following: younger than seventy, has epigastric pain, has pain which is delayed in relation to meals, has a negative biopsy result – the peptic ulcer candidate will be recommended.

5. Define a Recommendation Rule For Each Candidate

When a decision is executed, the condition and the support properties of an argument are used by the engine to determine the effect of each argument, and, in turn, the value of the net support for a given candidate. The recommendation rule is then used to determine whether or not a particular candidate is recommended.

Select the Decide tab in the Decision Specific Attributes panel.

From the Candidates drop-down list box, select the cancer candidate.

The default rule for this candidate is: netsupport(Diagnosis_decision, cancer) >= 1

This rule states that for this candidate to be recommended, its aggregated support (netsupport) has to be greater than or equal to 1.

You will now modify the recommendation rule to make it stricter, so that the cancer candidate would only be recommended if the biopsy result is positive, or if there are at least 3 other arguments for cancer.

In the Rule field, enter the following expression:

Rule: Netsupport( Diagnosis_decision, cancer ) >= 3

Note: Arguments for a candidate have a support value of 1. As the biopsy argument is a confirming argument, its support value is infinite.

Repeat this step for the peptic ulcer candidate – select the candidate from the drop-down list and enter the following expression for the recommendation rule:

Rule: Netsupport( Diagnosis_decision, peptic_ulcer) >= 3

6. Create a Scheduling Constraint

Create a scheduling constraint between the Patient history enquiry and the Diagnosis decision, so that the decision will run after the enquiry is completed (for more information about creating scheduling constraints, see Step 5 of Chapter 1).

7. Save the Process-Description

For more information about saving see Step 6 of Chapter 1.

8. Run the Process-Description in the Tallis Tester

For more information about running see Step 7 of Chapter 1.

Run the process-description to the point where the Diagnosis decision is in progress.

  • In progress decisions can be either yellow or orange:
    • Yellow: there are no recommended candidates for this decision
    • Orange: there is at least one recommended candidate for this decision
  • The decision is displayed in the Confirmable Decisions panel. Select it to display its candidates in the Candidates panel.
  • Depending on the data you’ve entered in the enquiry, the candidates’ icons will be either green, indicating that they are recommended, or red.
  • Click Details (or double click the decision) to view the Decision Properties.
    • Select a candidate in the Candidates panel of the Decision Properties window.
    • The arguments for the selected candidate are displayed in the Arguments panel: A black icon next to an argument indicates that the argument’s condition is true; a grey icon indicates that it is false.
    • Close the properties window.
  • In the main Tester screen, select a candidate, and click Commit.
    • Note that you can commit a candidate even if it isn’t recommended.
  • The decision, as well as the entire process-description, is completed.

Re-run the process-description to make sure that the decision functions as it should (For more information about restarting see Step 7 of Chapter 1). Test what happens when you enter different sets of data in the Patient history enquiry:

Cancer Data

  • Age: 75
  • Pain site: epigastric
  • Pain time: immediate
  • Smoker: yes
  • Biopsy result: positive

Peptic Ulcer Data

  • Age: 50
  • Pain site: epigastric
  • Pain time: delayed
  • Biopsy result: negative/no result

Exit the Tester before going on to the next chapter.

Top | «Prev | Next»

Last update: