# Enhancing Biomedical Research with ResearchKit: Digitization of IPAQ and MMSE for Sedentary Behavior and Cognitive Impairment Analysis

## Juan David López-Regalado and Gerardo Marx Chávez-Campos

Medical questionnaires and forms play a crucial role in diagnosing diseases and gathering essential patient information. Traditionally, these assessments are conducted through face-to-face interactions or phone calls, which can be time-consuming, costly, and inefficient. To address these challenges, digital adaptations of medical questionnaires have been developed, enabling faster and more accessible data collection across various platforms and applications.

ResearchKit, an open-source framework introduced by Apple, allows researchers and developers to create robust mobile applications for medical research. By leveraging this technology, large-scale data collection can be conducted efficiently, facilitating real-time analysis while reaching a broader population.

### Create project and implementation of ResearchKit

For create a medical applications for digitized questionnaires, it's necessary to download the framework from the next [repository](https://github.com/researchkit/researchkit)

and create a new ios project in Xcode in the option App.

![](images/project.png)

The next window will ask you name, interface, lenguage among other, but it is left as default, we only put a name and identifier, and saved in the desired path.

When the project is create the main window looks like the next image

![](images/main.png)

This is a main window, all the files from the application are found here, this is the environment where you work.

The previous folder download from github contain a xcode file, it name is *ResearchKit.xcodeproj* this file will be dragged to the top of the Xcode file explorer, as shown in the image below.

![](images/rk.png)

When the famework is here, is part of the application, only needs to activate. In the root of the application exist a general configuration, here in **Framework, Libraries and Embededden Content** in the plus sign is necessary activate the 3 parts of framework, in the next GIF, show how do that.

![](images/rkframe.gif)

Doing that, ResearchKit is ready to use.

### Visual Interface

The first part for develop a application is the visual part, you need to create a visual interface because the participants need a intuitive screen. This repository is not about the interface part, only about the ResearchKit part, therefore, we will skip the visual part, we can only say that it is necessary to place 3 buttons, one for consent, another for IPAQ and another for MMSE.

The visual interface needs to be easy, intuitive, but the design is part of you.

The main screen should be like the next image:

![](images/interface.png)

Now, it is necessary create 3 files for Consent(ConsentViewController, ConsentTask and ConsentDocument), 2 for IPAQ (IPAQViewConstroller and IPAQManager) and 2 for MMSE (MMSEViewController and MMSEManager). Files with termination ViewController are type CocoaTouchClass with subclass UIViewController and other termination only Swift File. In the next GIF show how to create this two files.

![](images/files.gif)

With all the files created, should look like the next image:

![](images/allfiles.png)

The files are in charge of managing all the forms that are generated with ResearchKit, the Managers are in charge of saying what and what parts are added to the form, that is, the questions, and the ViewController is in charge of triggering it and displaying it on the cell phone.


