IN WHICH OUR HERO NERDS OUT PRETTY HARD

  • Archive
  • RSS
  • Holla attcha boy

Asesor: A medical advice app using Django & Twilio

I recently spent a few evenings working on a side project built around helping to get medical advice to those living in extreme rural areas, primarily in 3rd world countries. The idea is to help bring together those in need of medical advice, translators who can communicate with them, and doctors who can answer their questions, even when all 3 are scattered around the world. If you tend towards the geeky, you can think of it as a distributed, asynchronous medical advisement system.

Bit of Background

I got this idea after my girlfriend went on a trip to Nicaragua as a 2nd year medical student. Every year her med school sends a troop of med students and a some doctors to a rural Nicaraguan village to set up a clinic for a couple of weeks. Often, the 2 week span that the med students & doctors are there is the only time the villagers can get their medical questions answered. Normally they’d have to travel for days to get to the nearest clinic, which is a big barrier. While the med students do far more than simply answer questions, it’s a non-trivial part, and it would be awesome if the villagers could have access to medical knowledge (even if not in person checkups) all year round.

Hence, my thinking; There are many communities like this, who certainly need in-person medical attention, but could also benefit greatly from simply having their medical questions answered. There are also many medical professionals who are more than willing to volunteer their time each day but who have packed schedules and may be on very different timezones than those in need of advice. Finally, there may be a language barrier between those in need of advice and the medical professionals, but there are also many translators around the world who would also be willing to donate their time.

My Solution

Fortunately, the one piece of technology that that is almost ubiquitous is the telephone. So centered on that, my solution was to build an asynchronous question->translate->answer system. The basic idea is that someone without ready access to medical advice would call a special phone number, that number being associated with their native language, and record their question. A network of translators proficient in that language would see that question. One of them would translate and transcribe it into English. Once translated, medical professionals on the system would see the translated question and be able to provide an answer. The original translator would then see that the question had been answered and be able to call the patient back, translating the doctor’s answer into the language of the patient.

Here’s a picture of the flow (using Spanish as an example). Each step (except for the very last) is asynchronous, with the parties not needing to interact in real-time:

Asesor Flow

Key Advantages

This distributed, asynchronous setup has a few key advantages as I see it:

  1. Minimal Patient Technology - The patient does not more technology than a telephone, which let’s this work for many remote populations.
  2. Native Language - The answer is delivered in the same language it which it is asked, which is key for populations without a strong knowledge of English.
  3. Doctor’s Convenience - Doctors are able to answer the questions when they have time. They don’t need to conform to the timezones of those asking questions. They also only need to know English.
  4. Global Supply of Experts - There is never a worry of needing doctors who speak a specific language. So long as there are enough translators of that language, there simply need to be sufficient English speaking doctors. The system can also tap into a global supply of translators and doctors.

Twilio

Shortly after having this idea, I heard about Twilio’s recently launched Twilio Client, which allows voice calls to and from the browser. This seemed like a good technological fit, as it lets patients record messages from their phone as well as let translators call back patients straight from their web browser.

Twilio also started a contest around the launch of Twilio Client for people to build apps using their new library. This was all the excuse I needed to spend some evenings building a proof of concept implementation.

There are many advantages to using Twilio, but I’ll call out a couple. First it makes associating a phone number with a specific language a snap. The app that handles incoming calls can easily determine what language to answer in, and how to tag the question once it’s recorded. Secondly, being able to call the patient from the browser is not only convenient, it’s private. The translator can never actually find out the phone number of the patient being called. The app itself handles the connection, while Twilio Client handles the voice communication. This makes all the questions asked truly anonymous.

Asesor

The fruits of my labors are available here: http://asesor.importrob.com. It’s a fairly straight forward Django app that uses Twilio and Twilio Client to handle the voice communication. I won’t dig too deep into the actual implementation (I’ll leave that for a follow-up post) but I have posted the source on github, so you can dig through it if you want to see how it’s built: https://github.com/robboyle/asesor.

Try it Yourself!

Using the app on display at http://asesor.importrob.com is fairly simply. The first step is to get a question into the system. To do that, I’ve set up two Twilio numbers that you can call, one for Spanish and one for German (the only languages I’m even passingly familiar with). I apologize for the google-translate level greetings, but if you know either language it should be easy to decode:

  1. Spanish - (415) 237-2135
  2. German - (650) 241-4435

You’ll be greeted by a voice in the given language asking you to state some information about yourself (the patient) and your question. Record your information and your question after the beep.

Then, go to http://asesor.importrob.com/register/ and create a translator account. Make sure you select that you are proficient in the language in which you recorded your question. Once you’ve made your account and logged in, visit http://asesor.importrob.com/dashboard/. You should see your question waiting to be claimed. Claim it and translate it into English. Once you’ve translated it it will disappear off your lists, as it’s now waiting on a doctor for an answer.

To pick it up again, you’ll need to become a doctor. Don’t worry, for the moment you can skip all the years of schooling and simply go to http://asesor.importrob.com/register/ again to create a doctor account. Logged in as a doctor, you’ll see that your question on the dashboard in need of answering. Claim it and answer it.

Once you’ve done so, log back in with your translator account. You’ll see your question again, but this time with the medical answer you just provided. There will also be a big button right in your browser allowing you to call the patient (in this case yourself, if you created the question) and tell them the answer to their question in their own language.

This may feel a bit complicated, but remember that you’re playing the part of 3 separate people here. In a live system the patient, translator, and doctor would only have to worry about their individual part of the overall puzzle.

Looking Forward

Obviously there are many places this could be improved. Letting doctors speak directly to patients, having a standardized patient questionnaire, allowing for doctors that are also translators. However, I think the seed is here. I could see this easily becoming the technological underpinnings of a pretty sweet non-profit. The technology would actually be the easy part. Gathering together the translators and doctors to make the system function would definitely require the most legwork. However, what encourages me is that there are lots of doctors and translators out there, ready and willing to volunteer their time. This kind of app may be just what’s needed to unlock all that willingness and give a helping hand to those that need it.

So, there you have it, my little project. Hope it sparks some thoughts if nothing else. No matter what though, let me know what you think by shooting me a question or a comment!

    • #django
    • #programming
    • #twilio
    • #medicine
  • 1 year ago
  • 15
  • Comments
  • Permalink
  • Share
    Tweet

15 Notes/ Hide

  1. mangalcun likes this
  2. jeremytbarton reblogged this from gosurob
  3. mcd-is reblogged this from gosurob and added:
    Much respect for this project Rob. Nice work man
  4. jeremytbarton likes this
  5. gosurob posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

Rob Boyle

Avatar I spend a lot of time coding and taking pictures of people looking ridiculous, and combined they make up 95% of this blog. I'm also the CTO / cofounder of Legit.

Rob, Elsewhere

  • @gosurob on Twitter
  • robboyle on github
  • RSS
  • Random
  • Archive
  • Holla attcha boy
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr