GSoC Update: Apple HealthKit integrated with RADAR-base’s aRMT App

We are happy to share the successful completion of one of RADAR-base's projects for the Google Summer of Code (GSoC) 2022. This project took the first steps towards integrating data from Apple HealthKit into RADAR-base's active Remote Monitoring Technologies (aRMT) app. Continue reading to find out what our GSoC contributor, Kai You, did to enhance the RADAR-base platform.

It was the first time our RADAR-base team participated in the GSoC,a global online program that brings new contributors into open-source software development. Participants of the GSoC program work with an open-source organization on a 12+-week programming project under the guidance of mentors. Our mentoring team consisted of Peyman Mohtashmi, Nivethika Mahasivam, and Joris Borgdorff from The Hyve and Pauline Conde from the PhiDataLab, KCL. Watch the Youtube video below to learn more about RADAR-base and the GSoC projects from Nivethika Mahasivam, Product Manager of RADAR-base at The Hyve.

We need your consent to show you this video

RADAR-base project for GSoC

This GSoC project aimed to integrate data from Apple's HealthKit into RADAR-base's aRMT app. The RADAR-base platform allows biomedical researchers to collect passive and active data from multiple sources. Existing integrated sources include Android phone sensors and wearables such as Fitbit and Garmin. One source that would provide a lot of insightful health data and information from study participants as well is Apple HealthKit. Apple HealthKit provides a central repository for health and fitness data collected by iPhone and Apple Watch.

RADAR-base (Remote Assessment of Disease And Relapses) is an open-source platform to leverage data from wearables and mobile technologies. It provides both passive and active data collection via two applications. The main focus is the seamless integration of various data streams from wearables and store, manage and share the collected data with researchers for retrospective analysis.

Next to passive sensor data collection, RADAR-base offers active monitoring via the RADAR-base Active Mobile app (also known as the Questionnaire app). Active remote monitoring via questionnaires, active tasks, and challenges can be used to analyze cognitive behaviors, mental health, and overall well-being of an individual or cohort.

The aRMT app can collect active data through questionnaires on Android and iOS phones. However, the RADAR-base community wanted to develop and extend the iOS version of aRMT to incorporate data from Apple HealthKit and send it to the RADAR-base server. Because of how iOS devices are set up, we cannot collect HealthKit data passively in the background. We need to collect data actively when the app starts in the foreground or by notifying the participant that they should start collecting and sending the data. With the user’s permission, our apps can communicate with the HealthKit store to access and share its data.

Integrating data from Apple HealthKit into the aRMT app will be highly beneficial for researchers as it will allow more accurate data to be collected from the iPhone and Apple watches. The work done by Kai focused on retrieving data from Apple HealthKit by using the Cordova-health plugin, transferring the HealthKit data into RADAR-base's schema we created and publishing the data to the Kafka service. You can read the details of the exact steps taken by Kai in his final GSoC report.

Figure 1: Flowchart summarizing Apple HealthKit integration with the RADAR-base aRMT app

The new feature Kai developed will help with the final integration of HealthKit into the RADAR-base aRMT app. With his work we have made the first steps into making this feature available and allowing us to access some passive data from HealthKit, as well as active data collected via surveys. As soon as the feature is fully ready, it will significantly impact and benefit researchers because it will allow for richer data collection from iOS users.

Here’s what Kai You had to say about his overall experience working on RADAR-base for GSoC 2022:

I couldn't imagine this summer without attending GSoC as an open-source contributor. RADAR-base is such a nice, friendly community that has guided me through every stage of the process since I first got in.

It's really an honor to be able to learn, cooperate and contribute to the RADAR-base platform. I have learned so much this summer which can be a really great foundation for my future career.

I encourage all future GSoC students to try their best to share their ideas and code with the help of their mentors. You can potentially help so many people in the world with every line of your code”.

Disclaimer: The Apple HealthKit integration with RADAR-base's aRMT App has yet to be finalized, and some work still needs to be done before its release.