Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cognitive Tests] Assessment tab for cognitive tests #44

Open
6 of 7 tasks
YurenSUN opened this issue Mar 4, 2024 · 0 comments
Open
6 of 7 tasks

[Cognitive Tests] Assessment tab for cognitive tests #44

YurenSUN opened this issue Mar 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@YurenSUN
Copy link
Contributor

YurenSUN commented Mar 4, 2024

Use Case

When the Apple team came to our class, they told us that ResearchKit provides a large number of useful active tasks. During our meeting with PIs, we decided to also incorporate the Trail-making and the Stroop task besides the MiniCog. We also believe the reaction time task is worth having if time permits.

Problem

With multiple tasks to involve and display, we want to have a tab where users can find all three cognitive tests and see related visualizations of the test results.

Solution

  • Incorporate the trail-making task and the Stroop task with ResearchKit (or StanfordBDHG forked version)
  • Incorporate the miniCog when done.
  • Parse the results of the tasks
  • Set up the assessment tab page and UI refinement
  • Develop visualizations of the test results.
  • If time permits, we can also add reaction time and timed walk from ResearchKit.

PRs: #39, #40, #43, #46, #50

Alternatives considered

Currently no.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@YurenSUN YurenSUN added the enhancement New feature or request label Mar 4, 2024
YurenSUN added a commit that referenced this issue Mar 11, 2024
# Assessments tests and minor fixes

## ♻️ Current situation & Problem
Currently, we only implement the assessments tab for #44 but we did not
write any tests to test it. Therefore, this PR aims to add the UI and
uni tests for the assessments tab, including each of the tasks and the
visualization of results.
Currently, we only test creating the task for trail making and reaction
time task as described below, but we reach the desired test coverage and
539 out of 589 lines (~91.5%) in the assessment folder are covered. This
PR also includes some small fixes described below.

## ⚙️ Release Notes 
- tests the assessment tasks. Currently, we run through the Stroop task
during the UI task and only test creating tasks for (1) trail-making
task as we are unable to click the buttons to make trails as they are
not shown in the app but grouped into an Other element `Tappable
Buttons` and (2) reaction time as currently there is no supports for the
shake motion in testing. This should be acceptable as the process of the
two tasks is also solely handled by the ResaerchKit, and we only wrote
functions to create and parse the results.
- Add the additional unit task to the function parsing the trail-making
task to ensure that no error is returned
- We are missing tests for parsing the reaction time result as the
simulator does not support result files, which is required when parsing
the reaction time result.

Other fixes
- Fix some colors for the dark mode for HealthKit visualizations.
- Fix the issue that the running task occurs on both the main screen and
the sheet. Change the toggle showingTestSheet to directly setting to
true to avoid the sheet not re-rendering (always showing trail-making
task) issue.
- Do not show chart legend for score/error count if those data are not
collected.

<img width="200" alt="image"
src="https://github.com/CS342/2024-PICS/assets/32094663/bd943430-d570-4dfa-952a-9cc0f5b2430c">


## 📚 Documentation
Related commends are added to the codes.

## ✅ Testing
The PR adds tests to our codes.

## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant