Long lines anywhere can be a frustrating experience, but they can be a life-threatening one in the emergency room. Even with the use of triage, a minority of hospitals meet recommended wait times for admitting patients to their emergency departments and fewer than half of hospitals consistently admit patients within 6 hours. This is a situation with poor outcomes for everyone. Patients do not expediently receive treatment and the quality of that treatment drops when hospital staff are inundated with a demand that they cannot meet. For this very reason many hospitals publish live ER waiting times, but this information is often scattered across many different websites. In emergencies, inconvenient access to information might as well be no access at all.

What it does

To solve this problem, we designed VitalTimes, a service that conveniently directs patients to hospitals with the smallest combined wait time and drive time from their current locations. We also direct patients to urgent care facilities, which can handle lower priority cases that might normally clog up lines at the ER. This way, patients can quickly and easily identify which facilities to choose without having to look up them up information. The total time to treatment is conveniently displayed on a side bar right next to the map.

How we built it

We identified databases with accurate ER and urgent care live waiting times. We then wrote python scripts to scrape these websites and parse the data. This data was then pushed onto Firebase, which served as our back-end. We then utilized a variety of Google APIs—including Maps, Places, and Distance Matrix—to build an interactive map that displays hospitals near patients, ranked with a sorting algorithm based on total expected time from their current location to an emergency or urgent care facility.

Challenges we ran into

The main challenges involved understanding the transition from assignments in the classroom, which often rely on sample data made specifically for the purpose of the homework, to utilizing live, dynamic, data samples often built for a completely different purpose. The challenge is in learning how to best integrate and consolidate all the available resources, varying from new languages and frameworks to novel APIs, that best suit our goal.

In our case, this specifically involved learning how to use a variety of python libraries to scrape data and integrate this with the Firebase API. We then utilized Google APIs to parse this data and display it in an interactive and easy to understand format for the user. The main challenge was learning how to consolidate these various resources.

Accomplishments that we're proud of

The first moment when we saw the interactive map populated with actual, live ER waiting data was a very rewarding experience. Being challenged to learn and pick up so many new frameworks and resources helped develop our abilities as not only coders but also as problem solvers. We chose to work within the Health and Wellness track so that we could ensure that our product would make a tangible improvement in people's lives.

What we learned

We learned how to use Python to scrape websites and use XPath database querying commands to extract key information. We also learned how to work with a variety of APIs and tie them all together. Finally, we learned how to divide work and accomplish goals under stress and time constraints.

What's next for VitalTimes

While what we currently have is a proof of concept, we hope to continue expanding our project. We will work to accrue more live wait time data from emergency and urgent care facilities in order to ease hospital traffic and improve patient outcomes across the country. We also recognize that VitalTimes is more effective as part of a larger navigation tool. We hope to partner with an existing navigation service, allowing VitalTimes to become more convenient for the average person to access and use.

Share this project: