The following report summarizes the work done during Google Summer of Code 2022 along with the results, scope for improvements and future work. This also serves as the final project report with all the contributions.
- Name: Kai You
- Email: school021195@gmail.com
- Github Username: hardco2020
- Organization: Radar-base
- Project Title: Apple HealthKit integration to aRMT App
- Project Link: github.com/RADAR-base/RADAR-Questionnaire
I started contributing to the RADAR-base from March, I have previously won a Hackathon with medical related APP, that's when I have a huge interest in open-source projects related to health care industry. I started contributing by little, understanding about what's the RADAR-base goal's for this year's GSOC, asking questions about how to draft the proposal for the project. In the end, I am really honored to be selected as the RADAR-base GSOC 2022 student, since then, The mentor Paymen, Pauline, Natheticka and I have a regular bi-weekly meeting, discussing about how to implement Apple Healkit integration to RADAR-Questionnaire.
RADAR-base (Remote Assessment of Disease And Relapses) is an open source platform to leverage data from wearables and mobile technologies. The main focus of RADAR-base is seamless integration of data streams from various wearables to collect sensor data in real time and store, manage and share the collected data with researchers for retrospective analysis.
RADAR-base provides both passive and active data collection via two applications, Active data collection using the active Remote Monitoring Technologies (aRMT) app, which includes the use of questionnaires that might ask patients about their mood, medication intake, or the severity of symptoms.
The objective about this project is to integrate the Apple Healthkit into the aRMT App, Apple Healthkit provides a central repository for health and fitness data on iPhone and Apple Watch. With the user’s permission, apps communicate with the HealthKit store to access and share this data. If we can integrate the Apple Healthkit into aRMT App, it will have a huge benifit on the researcher, since we can collect much more accurate datas collected by iphone and Apple watch.
The majority of the work will be focusing on how to retreive the datas from Apple Health using cordova-health plugin and transfer the data into the schema which we will create to publish the datas to Kafka service.
- Create questionnaires for the aRMT App to send the request to Apple Healthkit
- Transfer the Apple Healthkit Data to the aRMT App
- Create schemas for the aRMT App to successfully send the data to Kafka service
- Process the data to fit the schema we created
The following flowchart summarizes the workflow of the project:
- Bi-Weekly video conferences over Google Meet were used as the primary mode of communication with the mentors
- The Radar-base slack workspace was used to resolve any doubts, suggestions and comments instead of Github Issues for faster coordination.
- The whole integration is hosted on the Implement Health plugin pull request under the RADAR-Questionniare on Github.
Since each pull request has a lof of changes, so we will be using small commit to represent small tasks.
-
✔ #1: Install: health installation
-
✔ #2: Add: health basic setup
-
✔ #3: Add: health-input UI and function
-
✔ #4: Add: put all datas in a object and output
-
✔ #5: Add: change shown data according to input
-
✔ #6: Add: health input from the questionnaire
-
✔ #7: Change received type to be a data field a question
-
✔ #8: Add: make health into matrxi-group field and fix the matrix-group overflow problem
-
✔ #8: Add: make health into matrxi-group field and fix the matrix-group overflow problem
-
✔ #9: Add localstorage, platformsupport, errorhandling
-
✔ #10: Add process the data to fit the schema:
-
✔ #11: Add: process the data and send to the topic
- Since under each activity there are more object in it, for example
activity:{
run:{
calories: 100,
distance: 1000,
}
}
- it would need more processing unlike other aggregated data
- I would suggest to create a specific schema for activity
- Currently there are so many corner cases and different health kit type needed to be handle in
health-input
, which will only get worse in the future if we include more type - I think what we could do is to add more input-type to fit to different schema
-
Because
health-input
is different than the questionnaire before, and we have different schema for it, so I hardcode a lot of judgement to process and send the data, for example -
It will make the code to be more clean and readable if we have some utils for handling health data
The cordova-plugin-health actually support not only Apple Healthkit, but also support the Google Fit which can be installed on Android, that means we can not only collect those precious data from Iphone users, we can also do that on Android users which is a big advantage, but the current work I made is mostly on Apple Healthkit including the schema and the questionniare, so the next big step would be including Google Fit into the aRMT App.
- The current README for Radar-Questionnaire is not that friendly for a new developer
- Some of the information on Radar-Questionnaire README is outdated
- Have a doc which state how's the App structured, this could help the developer understand the process faster
- The process it needed to start as a new developer are way too long
- Have a regitser account on Management Portal
- Have the Firebase set up for the configuration
- Change the setting file on local
Throughout the duration of the project, I have grown a lot. Participating in GSoC has definitely improved my interpersonal and technical skills. Here are some of the prominent ones:
- Learning how the Kafka Service works with the Firebase
- Comprehending how Angular does the state management
- Collaborating with different teams across different time zones.
- Understanding and implementing the opinion and suggestions of different stakeholders in the project
- Analysing different approaches to solve a problem along with their pros and cons
- Writing clean and well-commented code
- Understanding and reviewing code written by someone else and modifying it.
The project would not have been possible without the ongoing support of many people. I would especially like to thank
- Peyman for helping me debug when I first got in touch with RADAR-base
- Pauline Conde for discussing the project details with me bi-weekly and giving me a lot of support
- nivethika for answering my questions patiently when I am drafting the proposal
- Joris Borgdorff for reveiwing my pull request an guiding me to write the clean code