An Idea for a Local Contact Tracing App
A quarter of the year has passed since Baguio and nearby cities and municipalities went into various forms of Community Quarantine. In that stretch of time, I have been thinking of ways software technologies could potentially help the people living in this crisis.
One such idea is a contact tracing app. This idea is not new at all, in fact several countries already built their own contact tracing app each with their own set of unique features and use cases. But one thing that is common to them all is their main function, to make it easier to conduct contact tracing to the population.
Apple and Google, the two biggest smartphone makers, partnered to create a contact tracing functionality built into their OS using Bluetooth technology. Android and iPhones with such functionalities will pass random IDs with each other. This interaction represents a contact between the owners of the phone. As with contact tracing concerns, the functionality is built with user privacy in mind. This functionality will then be integrated by app developers to their respective contact tracing apps. As of now, several countries already use this feature on their own apps. As far as I’m aware, the Philippines doesn’t have a plan yet.
Introduction
Disclaimer: This post is not meant as a complete technical specification and more of a conversation starter for a proposal/idea of what can be built. At the very least, it’s just meant as a personal brain dump. I’m a software developer by profession and focused mostly on using web technologies thus expect some biases on the tools, ideas, and solutions below. Treat this post more like an RFC (Request for Comment).
The purpose of the whole system is to automate the contact tracing of a city while also making it safer, faster, and more accurate than the current system while also maintaining the people’s privacy.
The system also assumes that the contact tracing functionality by Apple/Google (more accurately called Exposure Notification) will not be used. Instead, the system is built using a more visual kind of implementation. This implementation will have different implications. For one, citizens are more involved by actually having them do the scanning by themselves while the Exposure Notification does so automatically by sending beacons (random IDs) between the phones.
A brief rundown of the current system (as far as what I’ve observed):
The newly confirmed patient will go over their recent travels and contacts with the contact tracing team. The patient can optionally reveal their name to inform the people they might have interacted with. The details will be published in the city's online public forum.
The city government may order a lock-down of the patient’s neighborhood and the ones nearby for contact tracing.
For businesses, establishments, and public vehicles, customers are required to log their names, addresses, and phone numbers. It can possibly be used for further contact tracing.
There are a few problems with the current approach that a contact tracing app could alleviate:
The patients’ privacy and safety is at risk when their name and general neighborhood where they reside at are disclosed.
Locking down a whole neighborhood is like casting a net too wide.
Pen and paper approach is prone to human errors and risks exposure via physical contact with the items.
It relies too much on human memory. Remembering all those small interactions like which jeepney or taxi you rode on for example could be difficult.
It’s more time-consuming and difficult to trace.
The system
The key to this system is a unique identifier in the form of a QR code. This ID can be assigned to any form of establishment, public vehicle, or just a person. Example: a restaurant, the shoes area of a department store, a jeepney, or a taho vendor.
To manage these IDs, an ID and QR code generating service will be set up where anyone can get their unique IDs and be able to copy and print them out.

Name, phone number, and email address are required before getting an ID.

Once generated, the owner of the ID can print out the QR code or download it for backup. These QR code printouts will be placed somewhere in the establishment for customers to scan with their contact tracing app. In the case of a taho vendor, they can carry it around with them.
Letting anyone generate their own unique ID using the service allows for faster distribution of the IDs.
The app
One of the things almost everybody brings with them anywhere is a phone. Smartphones have lots of computing power, a decent camera and so much more. With so much potential, It's probably the best contact tracing tool that can be used at the moment.
The app is the second half of the system where its main function is to scan the QR code and record it on the phone. Alongside it is a timestamp of when the QR code is scanned.
id: 3b57643d-3c3c-41c5-9f69-8341258427fe
name: John's Pizza
timestamp: 1593673872
An example format of the stored data.

A mock-up of the phone app scanning a QR code. Also shows a list of recent contacts/scans.
Citizens will visit stores, markets, ride jeepneys, transact with food delivery riders, and purchase that sweet taho. During those times, citizens will scan the posted QR codes wherever they went recording the contacts on their phone. Thus, the citizens’ discipline and cooperation will play a major role for this system to work.
Detecting exposure
In the event that a patient is confirmed to be positive, the contact tracing team, with the consent of the patient, shall publish the patient’s recorded contacts in the phone to be accessible to the public.
Back to the citizens, using the app, they can download the patient’s records and cross-reference their own records against it.

A mock-up showing the list of active patients. The app allows for checking exposure to a patient.
The algorithm for cross-reference can be simply matching the IDs in the records. Then if a record has matched, check if the timestamp of the citizen’s visit is at most five hours after the patient’s visit (the time that lapse will depend on the actual science of the virus’ exposure). When these conditions are met, inform the citizen of possible exposure.
Meanwhile, all these processing happens on the app and all their data remains stored only on their phones, thus maintaining data privacy of the owner. On the other hand, since only the ID and the timestamp are required for cross-referencing, the patient can also remain anonymous.
At this point, the app can do various things to help the citizen. One is to show guidelines of what steps to do next: advice to enter a 14-day self-quarantine or contact a health institution. Second, it’s possible to implement a simple self-triaging feature in the app where the app shows a form of questions that the citizen will answer: e.g. Are you experiencing a fever? Are you experiencing a sore throat? How long have you stayed at the place where you possibly exposed?. The app will then show some basic guidelines depending on the answers.
Fallback
Even in these smartphone dominated times, there are people that don’t or can’t own one. In the absence of a smartphone, the system has a fallback to accommodate such a scenario.
Just like the original manual system, citizens can write their name, phone number, and address on a logbook of the establishments. And when a patient has been confirmed, the contact tracing team will have access to the patient's recorded contacts. Remember, the IDs have a phone number and email address associated with them. Thus, it can be used by the team to inform the establishments that were exposed (this can be also be done via automated text message/email). With the logbook in hand, the contact tracing team and the establishment can collaborate with each other.
Extending the app
If you look at the other countries' contact tracing apps, their respective apps have some extra functionalities aside from the contact tracing part. Some potential features can be:
A public information channel where important announcements, news, or just general information can be posted. e.g. Travel requirement processes, updated market schedule, new confirmed cases.
A COVID-19 data dashboard showing statistics and graphs about the current situation of the pandemic.
It's more akin to building a “smart city” app at this point making the possibilities somewhat endless.
Conclusion
This sounds like a lot of work but definitely not difficult to build. In the end, when all these systems and services are in place, it is really up to the citizen to follow and apply it. We now arrive in the second half of 2020 and the number of cases is still rising. On the positive side, the quarantine is slowly being lifted and economic activities are restarting. And the more we progress further, the smarter we should conduct our day to day life.
As the meme goes, modern smartphones have more processing power than the computers that helped launch the first people to the moon. Using that processing power to fight a pandemic does not seem far off.