HealthLingo | AI Agents Enabling Multilingual Doctor consultation via WhatsApp

Mohamed Ashiq Sultan - Jun 21 - - Dev Community

This is a submission for Twilio Challenge v24.06.12

What I Built

People can directly contact doctors from WhatsApp in their native language.
Based on patients query a suitable doctor from the list of doctor will be selected by AI.
The Doctor replies in English while the patient's will receive the reply in their preferred language.

Demo

Small gif showing translation

Video explanation of the project and the codebase

whatsapp sandbox link

Working of the App

The app consists of two layers

  1. Business layer
  2. AI layer

The business layer is responsible for handling the incoming msg and Database interactions while the AI layer consists of multiple small agents which interacts with Open AI API. I have used MongoDB as the database to store information like patient details, chat summary and doctor information.

explanation of code base

Twilio and AI

AI

  • Multiple Agents for handling specific tasks using OpenAI's GPT-4o model
  • Translate Agent
  • Chat Summary Agent
  • Two Agents for Details Collection
    • Basic Details Agent
    • Medical Details Agent

Twilio

  • Twilio Whatsapp service.
  • Initially the app was deployed as Twilio Functions but was as I added more conditions I was hitting timeouts sometimes. So yeah, I just deployed in AWS using docker. And yes only one Twilio service.

Additional Prize Categories

Impactful Innovators: People who are visiting a country for first time or immigrants who still find it difficult to express especially their medical condition in the foreign language can use this kind of app to communicate with doctors and express their symptoms and conditions.
Also the AI will pick the right doctor based on their condition.
The privacy of both doctor and patient is maintained as no phone numbers are shared.

The vision of such a app in real life would be

  • Social service mined Doctors signing up for such a service and give some details about their specialty
  • Patients who are looking for answers for some rare or specific condition could potentially find the right doctor and explain their problem in the language they are comfortable with

If you've made it this far, thanks for reading the post! Leaving a like would mean a lot, as it supports my work and encourages me to keep creating more content. Have a great day !

GitHub

GitHub logo ashiqsultan / twilio-whatsapp-ai-bot

A project developed for dev.to hackathon using Twilio whatsapp service using ChatGPT for AI services

Twilio Whatsapp Bot

This project is created as part of dev.to Twilio Challenge 2024. Link to Challenge Page

The project uses Twilio Whatsapp service along with OpenAI ChatGPT model for AI.

The concept of the app is to facilitate communication between patients and doctors.

Change log

Im need to change the code base from twilio functions to normal express server. This is due to the 10 sec runtime in twilio functions. There will be lot of file changes as the module imports are different for twilio reusable functions To refer the code you can checkout this commit: c0797c0




. . . . . . . .
Terabox Video Player