June 03, 2025

msDTMT

APP

The traditional Trail Making Test (TMT) relies on paper and pencil, a method with significant drawbacks. It requires constant supervision from a neurologist, offers limited metrics (only time and number of errors), and suffers from a learning effect because the test is always the same. Patients can memorize the path, which compromises the validity of repeated tests. This process also wastes resources, consuming paper and ink with each administration.

Main solution configuration
To address these issues, we developed msDtmt, a multi-platform application for tablets and mobile devices that digitizes the TMT. Developed in collaboration with the Hospital Universitario de Getafe, msDtmt transforms the assessment process, providing a more objective, reliable, and efficient tool for neurologists.

Here's how we achieve this:
  • Randomized Test Generation: A core objective was to create an algorithm that generates a new, randomized layout of circles for every test, eliminating the learning effect and enhancing the test's validity over time.
  • Advanced Metrics Capture: Beyond simple time and errors, msDtmt automatically records a rich set of data points, including:
    • Average pause duration.
    • Average finger-lift duration.
    • Average speed of the trace (both between and within circles).
    • Average applied pressure on the screen (if supported by the device).
    • Average contact area size.
    This provides neurologists with a deeper, more granular understanding of a patient's cognitive performance.
  • Multi-Platform Compatibility: Built with Flutter, the application is compatible with both Android and iOS operating systems on both mobile phones and tablets, ensuring wide accessibility.
  • Data Synchronization: The application can securely send all collected metrics to a server for analysis. We also implemented a robust offline mode that stores results locally if there's no internet connection and automatically resends them once connectivity is resto.
  • Technical architecture and implementation
    Our technical approach is based on a hybrid methodology that combines the structure of a waterfall model for the overall project flow with Agile elements for iterative development. The core of our application's design is Clean Architecture, organized using a Feature-First approach.

    The architecture consists of three distinct layers:
  • Presentation Layer: This is the outermost layer, containing the UI components built with Flutter. It manages the user interface, handles user input, and uses GetX for reactive state management and navigation.
  • Domain Layer: The heart of the application, this layer is independent of any framework. It contains business logic, defining the core rules through Use Cases, and orchestrating the flow of data via Repository Interfaces and Entities.
  • Data Layer: This layer is responsible for data retrieval and storage. It provides concrete implementations of the repository interfaces from the domain layer. We use SQLite for local data persistence (for user profiles and test history) and the Dio library for secure HTTP communication with the server's RESTful API.
  • Key technical components
  • Flutter: A powerful, multi-platform UI toolkit that allows us to build natively compiled applications from a single codebase. It's crucial for our goal of reaching a wide range of devices.
  • GetX: A lightweight micro-framework for Flutter that provides high-performance state management, dependency injection, and intuitive routing. We leveraged it to simplify development and maintain a clean code structure.
  • SQLite: A serverless, self-contained relational database used for local storage of user profiles and test results, enabling multi-user functionality and offline access.
  • WorkManager: This library handles background tasks, such as automatically resending unsent results once an internet connection is restored. Although it has some limitations on iOS, it is a robust solution for our use case.
  • Documentation Tools: We used Sphinx and Dart Doc to generate comprehensive technical documentation, which is publicly available on ReadTheDocs to promote transparency and collaboration within the open-source community.

    Impact and future work
    msDtmt aligns with the UN's Sustainable Development Goals (SDGs), specifically SDG 3 (Good Health and Well-being) and SDG 12 (Responsible Consumption and Production). By digitizing the TMT, we improve the quality and accessibility of cognitive assessment while reducing the environmental impact of paper-based tests.

    Future work includes:
  • Clinical Validation: Deploying the app at the Hospital Universitario de Getafe to gather real-world data and feedback from patients and neurologists.
  • AI Integration: Exploring the use of machine learning models to analyze the rich dataset of metrics captured by the app, identifying subtle patterns to improve diagnostic accuracy.
  • Public Release: Evolving the application from a clinical tool to a version accessible to the general public, promoting self-assessment and awareness of cognitive health.

  • If you are interested in this app, you are welcome to contact the Neurology Unit of the Getafe University Hospital or through this website.