Inspiration

In light of recent events, it has become evident that health care systems across the world are not sufficiently prepared to provide health care in times of crisis. Hospitals and medical staff are overwhelmed and WHO officials warn that health systems are ‘collapsing’ under the coronavirus.

Peer.md aims to connect patients in need of consultation with medical professionals available worldwide. As not all health care systems are equally strained at all times, providing access for clients to doctors in less afflicted areas helps make use of the full capacity of the systems by distributing patients efficiently. This enables patients in crisis areas who do not need acute treatment or a visit to a physician to receive professional care online. It is meant to be, in essence, a load balancer for health care systems. It can also be used to help people with no health insurance (28 million people in the US alone) or people in remote/less-developed areas, so COVID-19 is only one of a plethora of possible use cases. A side benefit of such a system for the COVID-19 pandemic is that the spread of the virus is better contained because many people with less severe illnesses do not risk contracting the disease by physically visiting a doctor.

Why Peer? Why MD?

Peer stands for peer-to-peer because the goal is to have the infrastructure work with as little input from a central authority as possible. MD is an abbreviation for Doctor of Medicine (lat. Medicinae Doctor, the American version of Dr. med.)

What it does

You can register either as a doctor or as a patient. If you are a patient, you can create medical "issues" which fall into one of the following three categories: "urgent", "normal" and "observation". You can add "reports" to your medical issue and send "messages" to your doctor, which will be visible as part of the issue.

  • If the issue is urgent, you enter a queue and match up with a doctor, who will provide you with immediate help via chat and video.
  • If the issue is normal, it is assigned to a doctor who will look at the symptoms you described and ask you further questions by sending you messages. You can schedule a video call with your assigned doctor if your doctor agrees to it.
  • If the issue is an observation, you are not matched up with a doctor and can add reports to your log until you believe you need to match with a doctor.

As your situation develops, you can change the category of the issue (e.g. if the medical issue you marked as an observation evolves to acute symptoms, you can change it to an urgent issue and enter a waiting room to see a doctor immediately.)

After the issue is diagnosed, it is marked as "completed". If you feel worse again, you can move it into a different category and receive medical help. Your new doctor will see your previous reports.

Your medical profile stores all of your issues and general data about your health: allergies, preexisting conditions etc. all belong here.

How we built it

To speed up the process of building a prototype, we used Google Cloud Firestore as the database because of its flexibility and ease of use. Around it, we built a REST API in TypeScript that supports the different ways in which we need to query and store user data. For the user interface, we built a progressive web app in React.js/TypeScript. To enable direct video and audio communication between clients, we used WebRTC. In addition, we used a framework built on top of WebSockets to handle signaling (setting up peer-to-peer connections via WebRTC) between clients.

Challenges we ran into

It was not easy to get access to the webcam stream because every browser on every device handles audio/video media a little bit differently.

What we learned

Choosing a NoSQL database turned out to be a good idea because the structure of our data schemas changed multiple times during the development process. It took a significant amount of time to set up basic functionality such as authentication/sessions, so if we decide to build a web app next time, we will probably write a boilerplate in advance so that we can focus more of our time on building the essential functionality of the application.

What's next for peermd

The eventual vision is to build an infrastructure that leverages technology to allow everyone on the planet to have access to a medical professional.

This hackathon is just the beginning. We are going to continue building the application and adding exciting features. Some of these include:

  • Ability to upload images and documents to a report
  • Confirmation of qualification for doctors (using a document)
  • Improved matching of patients and doctors (e.g. matching by multiple criteria such as languages spoken and type of problem)
  • Feedback system from patients after diagnosis
  • Strong data privacy infrastructure (because of the incredible sensitivity of the data we’re handling)
  • Review from multiple professionals for complex/ambiguous cases
  • Information videos on diseases, to allow doctors to focus more time on analyzing patients and answering questions
  • Computer-aided diagnosis by analyzing symptoms (first similarity to other diagnoses/decision tree, then more complex probabilistic models e.g. machine learning)
  • Prioritization of people in certain geographic areas (e.g. Italy or New York City during COVID-19 pandemic)
  • Financing of the platform (initially through donations and volunteering, later public funding from organizations such as the WHO and governments)
  • The hiring of professional doctors who get paid to consult on the service
  • Ship medical equipment and medication to developing nations, highly qualified doctors available online to analyze data from medical equipment and provide medical expertise necessary for accurate diagnosis

There are also already lots of bugs we need to fix, but we are looking forward to turning our vision into reality and helping more people around the globe have access to medical help. We are aware that the journey will be tough, but we believe that by continuing to work on this project we could improve and perhaps even save lots of lives.

Share this project:

Updates