2: Collect Data
In this chapter you will modify the keystones created in the previous chapter into enquires – tasks that collect data. The enquiries will collect information about the patient.
The first enquiry will check that the patient’s main problem is weight loss. If it isn’t, the clinician should be using a different protocol. If it is, then the clinician should go on to find out more information about the patient, such as the patient’s age, and the location of pain.
Information from these queries will be used in the following chapters to make a decision about the appropriate diagnosis.
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 Chapter01_create_and_run_a_simple_task_process.
1. Open the Process-Description That Was Created in Chapter 1
Select File > Open (or click the Open button on the toolbar ).
Browse and select the process-description that you would like to open, and click Open.
2. Modify the Keystones to Enquiries
Select the first keystone.
Select Edit > Change Keystone to > Enquiry (or right-click the keystone and select Change to > Enquiry from the pop-up menu).
The keystone should be replaced by an enquiry.
Repeat this step for the second keystone.
3. Add a Source to the Patient Problem Enquiry
Each enquiry can hold many sources - a source is added for each required piece of information.
There are two methods for adding sources: creating a source from scratch, or linking a source to an existing data definition. In this chapter you will create a source for the Patient problem enquiry, and link to existing data definitions for the Patient history enquiry.
Create a Source From Scratch
What is the patient’s main problem?
Select the Patient problem enquiry.
In the Enquiry Specific Attributes panel of the Task Attributes, enter the following information:
Name: | Problem |
Caption: | What is the patient's main problem? |
Data Type: | Text |
Range: | Weight loss, Constipation |
Default Value: | Weight loss |
Selection Mode: | Single-value |
Status: | Mandatory |
Click Add.
- The Name is an alphanumeric string representing the Source’s ID.
- The Caption is displayed to the end-user when the enquiry is executed.
- The collected data can be of one of four data types: text (string), integer, real, or boolean.
- The collected data can be of a limited Range of values; in the example above the end-user will have to select one of the predefined range values.
- The collected data can have a Default Value. It is used to pre-populate the data entry dialogue box when the source is requested.
- Selection Mode determines whether the end-user can enter more than one value for a given source. By default, the selection is set to single-value, so that only one value may be entered.
- The Status of a source determines the behaviour of the enquiry during runtime:
- When the status is mandatory, the enquiry remains in progress until all the data is collected, and only then completes.
- When the status is optional, the enquiry completes as soon as all the mandatory sources are given values.
Note: To edit a source, double-click it, or select it and click Edit.
4. Add Sources to the Patient History Enquiry
Sources are based on data definitions. When you create a source from scratch, Composer creates a new data definition for it in the background. But the process can also be reversed – sources can be linked to predefined data definitions. Data definitions can be created in the Data Definition Manager; they can also be imported from other process-descriptions, or from data definition libraries. In this step you will import data definitions for five sources from a data definition library.
Import Data Definitions
Select File > Load Data Definitions > From Web Repository (or click the Load Data Definitions from Web Repository button on the toolbar ).
If you are logged in, the Load Data Definition Library 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).
Select the All Folders option in View Mode. Navigate to World\Tutorials and select and load the Tutorial02DataDefinitionLibrary file (note that this file has a different icon, as it is a data definition library and not a process-description).
To view the data definitions of the current process-description, select View > Process Data Definition (or click the Data Definition Manager button on the toolbar ). The Data Definition list should display the problem data definition that was created in the previous step, and the additional data definitions that you’ve imported from a library – age, biopsy, pain_site, pain_time and smoker. The five sources of the Patient history enquiry will be based on these data definitions.
Create Sources by Linking to Data Definitions
What is the patient’s age?
Close the Data Definition Manager and select the Patient history enquiry. In the Enquiry Specific Attributes panel of the Task Attributes, click the button to the right of the Name field. In the Data Definition List dialog that appears, select age and click OK.
The Enquiry panel will be populated with the values of the age data definition:
Name: | age |
Caption: | What is the patient's age? |
Data Type: | Integer Note: Age will be entered in whole years |
Selection Mode: | Single-value |
The key difference between a source and a data definition is that a source only exists within the context of an enquiry and therefore also has a status attribute, which isn’t part of the data definition. Status determines the behaviour of the enquiry during runtime: when the status is mandatory, the enquiry remains in progress until all the data is collected, and only then completes; when the status is optional, the enquiry completes as soon as all the mandatory sources are given values. The age data will be used later in the process-description, and therefore the status of its source should be mandatory.
In the Status field, select the Mandatory radio button, and click Add.
Biopsy result
Repeat the previous step to add the biopsy source:
In the Enquiry Specific Attributes panel of the Task Attributes, click the button to the right of the Name field. In the Data Definition List dialog select biopsy and click OK.
The Enquiry Specific Attributes panel will be populated with the values of the biopsy data definition:
Name: | Biopsy |
Caption: | Result of biopsy |
Data Type: | Text |
Range: | No biopsy result, Negative, Positive |
Selection Mode: | Single-value |
In the Status field, select the Mandatory radio button, and click Add.
What is the site of the pain?
Repeat the previous step to add the pain_site source.
Relation of the pain to meals
Repeat the previous step to add the pain_time source.
Does the patient smoke?
Repeat the previous step to add the smoker source.
Note that the data type of the smoker data definition is boolean; this means that the end-user will have to choose between yes and no.
Make Sure That All Sources Were Entered Correctly
This is what the Source list of the Patient problem enquiry should look like:
This is what the Source list of the Patient history enquiry should look like:
5. Save the Process-Description
For more information about saving a process-description see Step 6 of Chapter 1.
6. Run the Process-Description in the Tallis Tester
For more information about running a process-description see Step 7 of Chapter 1.
- The top-level Plan, Management of weight loss (simplified) and the Patient problem enquiry are both in progress. This is indicated by the yellow colour of their icons in the tree view.
- The source of the Patient problem enquiry is displayed in the Requested Data panel.
- Select View > Data Browser (or click the Data Browser icon ).
- The Data Browser lists all the data items of the process-description and their current values.
- As you can see, the current values of the data items in the list are unknown.
- Close the Data Browser.
- On the Requested Data panel, click Add All (Alternatively, you can enter the data by selecting a source and clicking Add).
- Weight loss is selected by default. Click Commit.
- Once you enter the data for the problem source, the Patient problem enquiry becomes completed, and the Patient history enquiry becomes in progress.
- The sources of the Patient history enquiry are displayed in the Requested Data panel.
- Enter the requested data and click Commit.
- Once you enter the data for the sources requested by the Patient history enquiry, the enquiry becomes completed, and so does the whole process-description.
- In the Data Browser you can see the values that you’ve entered for each data item.
Exit the Tester before going on to the next chapter.