Inspiration

In late December, a father died in a local hospital in Alberta after waiting for hours to receive treatment. His main symptom was severe chest pain. Sadly, this is not an isolated incident, but rather a repetition of a tragic pattern. A similar case occurred in Ontario at the end of the summer, when a teenager died because his diagnosis was made too late. Deaths caused by excessive waiting times in hospitals are unacceptable.

A few months ago, François Legault, the Premier of Quebec, suggested paying doctors based on the number of patients they consult as a way to address long wait times. However, as students, we believe this is not the most effective solution to the problem.

We observed that the registration process and the time nurses spend filling out forms are not optimized for rapid diagnosis. **This led us to ask: what if a website could handle this process before the patient even arrives at the hospital?* Such a system could help prevent hospital overcrowding by alerting staff in advance, since the approximate number of incoming patients would be known ahead of time.

What it does

Our website functions as a pre-registration form that collects essential information such as the patient’s name, medical card number, and other relevant details. The interface is designed to be user-friendly, recognizing that individuals seeking hospital care for non-immediate emergencies may be injured, stressed, or unwell, and therefore not in a condition to type long responses or think critically about what information to provide.

For this reason, most questions are answered by selecting the appropriate bullet points, making the process faster and easier. An optional text box is also available for users who wish to provide additional details.

We acknowledge that ethical concerns may arise from locating a user’s current position or allowing photos to document their condition (a feature available only when external conditions are selected). To address this, explicit user consent is required, and all permissions can be withdrawn at any time.

Finally, a dashboard is created explicitly for the CHUM hospital (since we have chosen this hospital) that collects and concise summary of all critical patient information in real time who registered through the form and displays it appropriately for hospital workers to know who to expect in the ER.

How we built it

We built our project using a full-stack approach that combines web development, machine learning, and cloud services. The frontend was developed using HTML, CSS, Python and Java to create an intuitive form and dashboard for user input and data visualization.

The backend was built using Flask, which handles form submissions, processes data, and communicates with the machine learning model. We trained a custom machine learning model to assess wound severity by creating a dataset scraped from the internet using the Bing Image Downloader. The trained model was saved and loaded into the backend for real-time predictions when the user takes pictures of their external injury through the form.

When a patient submits the pre-registration form, the raw data is saved in MongoDB. The backend then calls OpenRouter, which cleans the data, standardizes entries, and classifies injury severity. The processed triage data is stored separately in MongoDB and displayed in real time on the hospital dashboard, letting staff see who’s coming, how urgent their condition is, and what resources are needed.

APIs, such as Google Maps (to enable current location for their ETA) and OpenRouter (as mentioned before), to enhance functionality, including location-based services and intelligent assistance that evaluate each patient's case.

Challenges we ran into

We faced significant challenges integrating machine learning (ML) to evaluate wound severity. If we had more time, we would have liked to scraped more data images form the internet to suggest more accurately the person if the wound is worthy a visit to ER. Again, ML that we used is suggesting the person if a visit to ER is worhty and it is not making the decision for the person. It is not remplcacing a professional's opinion. By doing so, the accuracy of the ML decision would have been higher. Additionally, finding and properly integrating APIs, particularly Google Maps, proved difficult and time-consuming.

Another major challenge was linking multiple websites and services together. We wanted our dashboard to display all the information collected from the form, stored in MongoDB Atlas, and then pass that data seamlessly between different parts of the application. Storing the data correctly and transferring it between services was extremely challenging.

Finally, connecting the backend to the frontend was more complex than expected, especially while ensuring real-time data flow and consistency across the system.

Accomplishments that we're proud of

We’re proud to have successfully built an end-to-end system that integrates machine learning, a full-stack web application, and cloud services within a limited time frame. Despite challenges with data availability and complex integrations, we created a working solution that processes real-world inputs and delivers meaningful results for an important cause. We believe in sustainable technology, which means creating solutions for today's generation without compromising future key elements. We acknowledge that many websites and applications can contribute to environmental issues, but we believe our website is worthy of the resources we have on Earth.

We’re especially proud of training a custom machine learning model since in the past it was a big challenge for us, as well as connecting the frontend, backend, database, and external APIs into a cohesive platform. Additionally, we’re proud of our teamwork, persistence, and ability to problem-solve under pressure, which allowed us to overcome technical obstacles and bring our idea to life.

What we learned

Through this project, we learned how to build and integrate a full-stack application that combines machine learning, backend development, and cloud services. We gained hands-on experience creating and training a machine learning model using a custom dataset and deploying it within a real-world application.

We also learned how to use Flask for backend logic, integrate it with a frontend interface, and manage data flow between components. Using MongoDB Atlas taught us how to efficiently store, retrieve, and manage data in a cloud database. Thank you MongoDB.

Additionally, we developed a deeper understanding of API integration, particularly with services such as Google Maps and OpenRouter, and learned to troubleshoot integration issues. Most importantly, we learned how to collaborate under time constraints, debug complex systems, and adapt quickly when initial approaches did not work.

What's next for OnMyWay ER

Next, it would be impressive to improve the accuracy of our machine learning model by expanding the dataset with more diverse and real-world examples. We also aim to enhance the user interface and dashboard to provide a smoother, more intuitive experience for both patients and healthcare professionals. We also want to strengthen data security and privacy measures to ensure compliance with healthcare standards. Ultimately, we envision CareFlow becoming a reliable, scalable platform that helps emergency departments prepare in advance and improve patient care outcomes. In addition, we would have liked the website to notify the hospital if a patient is delayed, using Gemini tracking with the patient’s consent. This feature would be especially valuable for individuals living alone: if someone becomes unconscious or is unable to call for help, the application could automatically alert the hospital to unusual tracking delays.

Built With

Share this project:

Updates