Mar 30, 2020

Motivation

COVID-19 is a pandemic that threatens global health. Now, the impacts are not even only in the health sector; economic, political, national defense and security, etc are also threatened. And my country, Indonesia, is very slow in dealing with the spread of this virus.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/77c0667f-60a0-4487-baa5-12d6fa1dbf22/Untitled.png

Data source: https://databoks.katadata.co.id/datapublish/2020/03/29/perkembangan-terkini-corona-meninggal-114-sembuh-64-minggu-293

Based on the data, the number of deaths is higher than recovered (up to 2 times of it! 😨). And unfortunately, the data only shows people who have been tested. How about the rest? A lot of people don’t know whether they are infected by this virus or not.

So, I want to give a little help in this case.


Solution

I built a chatbot that can be accessed by the public at Telegram. The idea is: this chatbot can make a diagnosis for the early symptoms of COVID-19. Why Telegram? It provides free access to the API for making bots, easy and without limits. Simplicity at its best 👌

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7beb8d24-d0ae-4405-b1a8-b9b27b974d28/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3041628d-aef5-427f-a08f-4434abaa33a2/Untitled.png

Disclaimer: the result may not be 100% accurate. And maybe if you don’t have any symptoms, you might become a carrier for the virus.

Components

https://twitter.com/Infermedica/status/1241002408555294722

How it works

For the first chat, I want to show the number of cases in Indonesia, I get it from covid19.go.id. But, should I scrape out the data from HTML tags? Nope. In the modern web architecture, they usually serve a font-end and back-end separately. So, what I do is inspect the element and go to the network panel.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/72f99236-7fad-4825-b661-9afc079f2f4a/Untitled.png

Data from: https://www.covid19.go.id/situasi-virus-corona/

We’ll see the request URL and get the data with JSON format. So, I just formatted and showed it to a message for the user. Cool! The nice-to-have-feature has done 🤣