Inspiration

The American Red Cross supplies roughly 40% of the nation's blood. Unfortunately, the COVID pandemic has caused canceled blood drives, scared away potential donors, and made it difficult for nonprofit blood banks to retain and attract employees. As a result, the Red Cross has recently stated that its supplies have reached critically low levels. Our goal with Donorlist is to alleviate this shortage by facilitating direct connections between geographically proximate donors and donees. We are currently proving our concept in the local Philadelphia community.

What it does

The site lets potential donors and recipients input both their blood type and city to view nearby blood type matches. Recipients in need of blood (or their families) can then reach out to potential donors either on a one-to-one basis or en masse to arrange a donation at a local hospital or affiliated blood bank.

How we built it

We built the site predominantly using the full stack python-based web framework Django, with Bootstrap and JavaScript providing some additional styling and functionality on the front end. We leveraged the Geopy library and the OpenCage API to calculate the user's latitude and longitude based on their inputted city, as well as calculate the distance between different users to filter nearby blood type matches.

Challenges we ran into

Early on, we had a problem with excessive API calls, which resulted in the "view donors" page taking several seconds to load. We were using the API to calculate the exact distance (based on realistic travel routes) between the user and every other user in the database. This resulted in a large number of requests per page load, which inevitably slowed it down and would prevent the site from scaling in the future. To fix this, we created latitude and longitude fields in the user (profile) database, pulling these values just once upon sign up and storing them. For the "view donors" page we then used a function in Geopy that calculated an "as the crow flies" distance between two users based on their longitude and latitude. As most people can't fly, this is a less accurate measure than that provided by the API call, but it is a sufficiently accurate approximation for our purposes and made page loads instant.

Accomplishments that we're proud of

This was the first Django project either of us had ever completed, and so we're very happy to have an MVP that carries out the basic functionality outlined in a reasonably attractive manner. Moreover, we believe our project is highly relevant to the MCIT and greater UPenn community because blood shortages at the UPenn Health system can have meaningful consequences across the entire student and faculty body that depends on it. The power of our business model is the ability to mobilize and empower recipients as a salesforce to go and seek out more donors through community outreach than a traditional blood drive could.

What we learned

Django has a reputation as being one of the less flexible web frameworks, particularly in relation to frameworks such Flask or Node. We learned how to leverage core Django functionality while also extending and customizing it to meet the needs of our project. For example, Django provides robust authentication with its built-in User model, but this User model did not have necessary fields like City, Blood Type etc. While it was finicky, we used a separate model (Profile) with a one-to-one relationship with User to take advantage of Django's authentication without compromising on our desired user model. We also gained more experience with using an ORM rather than SQL to perform database operations.

What's next for Donorly - the blood donor matching site.

We have a number of new features in our roadmap. The following are current priorities:

  • City and Age Validation to improve accuracy of data fed into geo API
  • Hospital Integration allowing hospital administrators to tap into our user base and initiate community blood drives
  • Expanding into other medical categories with shortages, like bone marrow
Share this project:

Updates