What it does
Bmatch is a chatbot built on Telegram and Facebook messenger platform that matches voluntary non paid blood donors to recipients based on certain criteria such as blood group and location of the recipient. It also provides additional details such as distance and estimated time of arrival to the recipient's destination. A user can also search for the nearest blood drive and blood bank to their location. All this is done with the help of here routing, search, and data layers. Wit AI was also used to integrate NLP into the chatbot which enabled us to fetch structured data from users' chat.
How it works
- Telegram: Visit t.me/bmatchbot
Facebook Messenger: Visit m.me/bmatchbot (Note: The Facebook messenger bot is currently not live because individual verification has been put to a hold by facebook. Send an email to firstname.lastname@example.org to be added as a tester to the bot.)
- Tap /start button (Telegram) or tap the Get Started button (Facebook messenger).
- Registration: fill in the necessary information required such as phone number, gender, blood group/type, age, country and your current location. (The entered current location is queried on here's search API and results are displayed. You'd have to select from the list of displayed addresses)
- Help: Send "help" to display the bot's menu.
- Register as donor: Send "register as a donor" or tap => Donor > Register in the menu. Tap "yes" to proceed donor registration after reading the details of what it means.
- Request for a donor: Send "request for a donor" or tap => Donor > Request in the menu. Tap "yes" to proceed donor request after reading the details of what it means.
- Search for blood bank: Send "search for a blood bank" or tap => Blood Bank > Search in the menu. Fill in the location to fetch the nearest blood bank.
- Search for blood drive: Send "search for a blood drive" or tap => Blood Drive > Search in the menu. Fill in the location to fetch the nearest blood drive.
- Register as a donor: It makes it possible for willing blood donors to register through the chatbot. The user would have to tap or send "yes" to continue with donor registration or "no" to cancel registration as a donor. A user can also opt-out or unregister as a blood donor to stop receiving blood donor requests.
To register, try sending: Register as a donor
To opt-out, try sending: Opt out from donor registration
- Request for a donor: Bmatch makes it possible for recipients to request for a blood donor. The recipient is matched based on the location and blood group of the available donor. Personal details such as name, phone number, gender, blood group, and the current location(health center) of the recipient would be sent to the matching blood donor. The current location of the recipient is queried with the here search API. This makes it easy for us to restrict users to input known locations on the here location service. When a match is found, additional details such as the distance and estimated time of arrival to the recipient is sent to the blood donor. The additional details(distance and eta) are fetched using the here routing API.
To request, try sending: Request for a donor
- Search for blood bank: Users can search for the nearest blood bank close to a selected location. The entered location is queried on the here search API to restrict users to input known locations on the here location service. Blood banks are fetched from three sources:
- Here places data layer: Blood banks from Johannesburg, South Africa are fetched and updated into our database weekly using the data from the places layer.
- Bmatch Partner: Blood banks are manually stored in our database upon request by users to do so. These blood banks are validated by bmatch before it is stored.
- Here Search API (Browse): Blood banks are also fetched from the search API and filtered by category.
To search, try sending: Find the nearest blood bank close to me.
- Search for blood drive: The blood drive is created and stored in the database upon request by users. Users can now search for the nearest blood drive close to a selected location. The entered location is queried on the here search API to restrict users to input known locations on the here location service.
To search, try sending: Find the nearest blood drive close to me.
- Enlist Blood Bank: Blood banks can contact us to enlist their blood bank on our platform.
To enlist, try sending: Enlist blood bank.
- Organize Blood Drive: A user can organize a blood drive in a selected location. To moderate creation of blood drives, interested individuals would have to contact us to create one.
To organize, try sending: Organize a blood drive
How we built it
- Chatbot Channel: Telegram, Facebook Messenger.
- Location Service: Here data layer, search, and route service.
- Backend: Node JS/Sails JS
- Database: Redis, MongoDB
- Natural Language Processing: Wit AI
- External APIs: Telegram Bot API, Facebook Messenger API, Wit AI API.
Challenges we ran into
We initially built the chatbot on the Facebook messenger platform but when we were about to go live, we noticed we couldn't because we needed to do the individual verification for the Facebook app. Due to covid19, Individual verification for apps is currently paused on the Facebook developers portal so we could not go live with the Facebook messenger platform. We decided to also build the chatbot on the Telegram platform.
What's next for Bmatch
- Complete integration with the Facebook Messenger platform.
- Restrict requests for blood donors to come from only recipients in known health centers (clinics, hospitals).