During the COVID-19 pandemic, one of our team members enrolled in a mental health training course in order to learn how to be an advocate and help break the stigma against mental illness. After taking the course, it helped open doors into understanding how many people during the pandemic who may be older, with underlying mental and physical conditions are stressed, anxious, lonely and are scared about their health. This raised the question: how do people who tested positive for COVID-19 (or any other disease for a different pandemic) deal with this treatment along with adhering and receiving quality treatments for other underlying conditions?

In order to relieve these tensions, team BuddyUp created an app to help COVID-19 positive patients with underlying conditions navigate through this time of uncertainty by providing an app that allows patients to access support groups and help adhere to their care. This in turn reduces their fear and increases their confidence and emotional morale that they can fight through their illnesses.

What it does

PanPal (short for PandemicPal and adapted from the word “penpal”) allows COVID-19 positive patients to adhere to their care by connecting with other infected patients with similar underlying conditions. These connections will be in the form of support groups, which are automatically determined by a machine learning algorithm that is deployed on Google Cloud AI Engine.

Patients can message and can have scheduled, facilitated calls with other members in their support group to discuss their mental and physical well-being and help motivate each other during this daunting time in their lives. A facilitator will also be present during these calls to help moderate severe stresses by providing mental health morale. These individuals can be therapists, psychologists, nonprofit or private mental health advocates that partner with the hospital and are licensed on aiding these types of issues.

At the end of the call, patients receive a feedback survey with questions on how their health conditions are presently, their emotional well being and whether or not the meeting was beneficial to them. Physicians will look over these responses to check on their patients and see if there needs to be any tweaks to their treatment plans. In addition to community building through shared emotional experiences, patients will also have a tool that helps them adhere to their medication through a gamification styled method. Everyday, patients will check a box to whether or not they have been taking their prescriptions. For every day they persistently take their medications, they will receive raffle tickets that they can use to win a prize!

You can take a look at our two relevant GitHub projects here:

Unsupervised K-Means and Spectral Clustering ML Algorithm

Functional Web Demo

You can take a look at our underlying condition list and ranking system here. This is referred to as "Heuristics - Ranking Conditions" in the clustering algorithm's documentation.

How we built it

The clustering algorithm was built using the Synthea COVID-19 Specialized Dataset. We used standard data-encoding techniques with a special heuristic to rank conditions and their risks for COVID complication, so when grouped, patients can have access to highly relevant information. We decided to incorporate other features like geo-location, age, gender, medical history and vitals and other medical observations to build the features for the clustering algorithm. The implementation was assessed both using python sklearn’s K-Means and Spectral Clustering algorithms. For the dataset and features used, Spectral Clustering gave the best groups in terms of relevance and similarity between the members. We deployed the model to Google cloud to use the AI engine to do the continuous groupings as new patients opt-in for PanPals.

The front-end, including the gamification of patients taking prescriptions daily and the log of weekly group meetings was built using ReactJS, HTML, and CSS. The group chat for patients was made using NodeJS, Express,, HTML/CSS and Javascript.

Adobe XD was used to design and prototype the mobile app for patients and the website portal for physicians. Images used in the prototype are free through Adobe plug-ins (UI Faces, Icons 4 Design, and Stock) as well as from the Apple interface [1,2].

Challenges we ran into

Data encoding and feature reduction were the main challenges with the implementation of the clustering algorithm. The dataset had a lot of categorical data which created issues when encoding with one-hot encoders due to the vast amount of unique categories. Collaboration between healthcare experts and CS experts within the team helped us come up with the heuristic based approach which vastly reduced the number of features while increasing our accuracy significantly.

Accomplishments that we're proud of

Technically speaking, we are proud that we’ve been able to tackle so many technical challenges in such a limited amount of time. The person that created the ML clustering algorithm had very limited prior experience implementing ML and he learned it within the course of half a day, which is something we’re all very impressed by. We also managed to deploy the model to Google Cloud to any future predictions on new data.

Team BuddyUp is proud that we were able to bring in a diverse set of individuals with different mindsets and skill sets, ranging from machine learning/data science, UX experience, front-end programming, ethical dilemma analysis, and biomedical research experience in order to help a special niche of patients have better care at an emotional point of view. We all worked and communicated with each other with great ease and would always build on each other's innovative ideas. It was a blast to work in this team!

What we learned

We had a truly diverse team. In that regard, we all learned from each other bits and pieces about the principles of clinical science, bioethics and patient care, machine learning, UX design, and frontend programming.

Not only was there a transfer of knowledge and skills between skilled developers to healthcare pre-professionals, but we were truly able to understand the nuances, such as separating patient data to create clusters using algorithms to learning about health care norms through zoom workshops set by mentors and panelists, when marrying tech and healthcare together to create something fresh.

What's next for PanPal

Our mission is to extend this tool not only for the current pandemic but to the other ones that lie in the future. The confusion and anxiety that a complex clinical situation brings is intense, and support groups are hard to come by for rare combinations of diseases. This app gives the ability to arrange these support groups within a large hospital network almost effortlessly.

The concept of using machine learning and the heuristic-based approach is hugely extensible. Several possible use cases are:

  • Automatic creation of mental health support groups based around race/ethnicity
  • Clustering transplant patients based on closest possible organ match (as determined with many factors)
  • Sorting patients that have higher risk for developing complications from hospital acquired infection into adequately equipped facilities

Keeping all that in mind, the issue boils down to this: we all need a shoulder to lean on. Having support groups that are extremely customized with people that suffer the exact same way allows for greater understanding, emotional connection, and reassurance. At the most basic level, this function helps people explore different remedies or solutions that help others like them in their treatment journey, and rely on those that have walked the same treatment path for emotional stability during an extremely uncertain time. Providing this emotional support is the next step in ensuring the highest quality of care.

Image Citations

  1. IRStobe/Adobe Stock (2020). Doctor talking about organ transplantation. Artificial human organ, human langs. Flask with artificial lungs. The latest bioengineering technologies, health and medicine concept. Retrieved from:

  2. Apple Incorporated. (2020). Calendar. [mobile iOS 13.5.1].

Share this project: