Creating cognitive assessment tests is the core features of Cognition Package. This tutorial will guide you through how to create the needed domain model objects for a cognitive assessment task, how to present it in the UI, how to combine different cognitive tests into a single assessment, and finally how to collect the results.
> Note: This tutorial is limited to present some of the cognitive test types and give an introduction on how to combine them into one assessment app. For all the available cognitive test options please see the list of available cognitive tests on the Cognition Package page.
Overall, the Cognition Package builds on top of the Research Package. You may want to read the tutotial on its API before reading on.
Research Package uses a
Task to represent a survey containing a list of
Steps, which each returns a
Result. In the API, the task is an
RPOrderedTask object and the steps are
RPStep objects. Results are saved as
RPTaskResult objects. ResearchPackage also support a navigable tasks with the
A cognitive test is a new type of
ActivityStep. The new
ActivityStep can be used in
RPTasks, where they can be combined with all the other
Step types (InstructionStep, QuestionStep, CompletionStep, etc.). This allows you to create your own instructions for tests, combine them with questions, or any other flow needed.
ActivitySteps implement 3 stages of each test – Instruction, Task, Result – which control the flow of the test.
RPActivitySteps include optional parameters for including or excluding the instruction and the result respectively. Each individual test has additional optional parameters, which can be used for customising the tests. These are listed on the Cognition Package page.
The Cognition Steps
With the Cognition Package comes 14 new
RPActivtyStep models reflecting 14 cognitive tests. The
Steps that are currently available, and the name of their respective test, are:
Details about the tests can be found on the Cognition Package page.
Example Cognition Test
Below is an example of how to create a cognitive test. The example used is the Multiple Object Tracking Test. We have selected the length of the test to be extended to 180 seconds and set some parameters for the number of distracting dots and excluded the results section from the test.
Rapid Visual Information Processing Test Example
ActivityStep is very similar to creating a survey question
RPActivityStep continuousVisualTracking = RPContinuousVisualTrackingActivity( 'ContinuousVisualTracking step ID', amountOfDots: 15, lengthOfTest: 180, includeResults: false);
The test can then simply be put inside an
RPTask in the same way questions can.
RPOrderedTask surveyTask = RPOrderedTask( identifier: 'surveyTaskID', steps: [ instructionStep, continuousVisualTracking, completionStep, ], );
Task is used in a
RPUITask, it recognises the
ActivitySteps and will display the UI of the test – here an
RPUIActivityStep with a body of
To the left the Multiple Object Tracking test can be seen running with the parameters set:
- 3 trials are run
- 15 distracting dots are present
- 2 target dots are present
- The dots move for 5 seconds each trial
- The dots are 40px