Inspiration

Emergency rooms are often associated with high impact chaotic environments where one decision is the ultimate judge on life or death. These triage decisions must be executed rapidly and under pressure, but are humans able to effectively assess them without any emotional or bias impeding their decisions? It begs to question if these systems if operated on an objective measure would be a better system than relying on human decisions with implications of errors. In many real-life cases, the currrent triage system have resulted in overwhelmed staff, misjudged symptoms, and subjective decision-making where bias is involved. For example, in an Canadian article from TheStar recalls an incident that occured in 2025, where a woman waited over 40 hours and surrounded by sick patients due to the ineffectiveness to the system. Similarly, studies have shown that minority patients are often under-triaged due to prejudicial bias. The ER staff often spend excessive time on documentation and analysis that takes away the time needed for urgent care. These challenges inspired us to build the ER Triage System Gemini Assistant, a solutions that uses Agentic AI to automate and optmize triage classification. This revolutionary system removes bias, handles multiple input modes, integrating seamlessly with existing hospital systems, constructing a smoother workflow, and most importantly: significantly reduces time-to-care for critical cases; Ultimately saving lives.

What it does

The ER Triage System Gemini Assistant uses AI Agentic solutions operated on the Gemini API that is used to optimize the process of assessing incoming emergency room patients from order of severity in order to judge who to serve first. Within the user interface, It takes in the patients profile consisting of identifier details: name, age, gender, height, etc. The program then makes the user prompt in the details of the incident via voice, text, and/or image: cause of injury, symptoms, vital signs in order to formulate the emergency severity index which a unit of measurement or guideline in order to categorize severity. Each assessment done by the AI assistant provides a description explaining it’s reasoning for that order, allowing to observe the accurracy of the AI. This solution aims to save lives and improve patient outcomes by optimizing documentation processing time, expedient in noticing crtitical cases, and matching cases of severity with appropriate care. It integrates perfectly with the already existing hospital system allowing implementation of this tool without any remodeling of the pre-existing system saving costs, time, and effort. This approach reduces any human subjective bias that is involved with the decision making process reducing any unjust death’s caused my internal prejudice and internal orchestration.

How we built it

Our team developed a web application aimed towards efficiently categorizing patients being taking in to the emergency room, and developing a solidified list of patients in a hierarchy ranging from urgent care to less major. This implementation uses HTML, JavaScript, and CSS in order to customize the front end user experience. The prototype of the website was configured using Figma. For backend we used Python by using the backend framework Flask. It allowed input from the user with the implementation of Gemini in order to assess the patients. Gemini was the generative AI of choice that is customized as an AI agent to take on the roll as a triage system. It uses Agentic AI constructed from Vellum through detailed prompting that defines the agent’s purpose and tasks. It is specialized in the field of triage assessment It is able to take in input either: text or image, and categorize the patient through an already pre-existing metric called the emergency development index. It orders the patients by assessment needs. The data is then stored through the MongoDb database.

Challenges we ran into and what we learned

  • Figuring out how we would approach the front end and user interface with prompts or questions that gemini would use interpret in order to classify which patient would require top priority
    • Solution: A 5 level triage system is constructed to access patients in emergency departments with given resources. It is emerged through the emergency severity index that calculates significance through the numerical examination and accumulation of factors such as
      1. Identifies life threatening conditions:
        • The triage nurse assesses the patient's main reason for seeking care and identifies any immediate life-threatening conditions.
      2. Vital Signs
        •  Key vital signs like respiratory rate, heart rate, and oxygen saturation are measured.
      3. Patient Stability
        • Factors like level of consciousness, pain, and mobility are considered

Generative AI such as gemini are able to take in as much given information and come up with the most probable estimation to classify them. Then another problem arose from that implication: How would we be able to ensure that our AI model would be able to answer and organize information if it had no awareness of it’s role? Solution: We were able to customize our Gemini’s API in order to make it specialized in the role as an specialist in triage assessments. We implemented Agentic AI by using Vellum and prompting gemini to be given it’s specific role.The next problem that occurred was implementing Vellum into our system. The database uses a BSON formatting input and Vellum wanted a string. But because MongoDB has it’s own ObjectID class, we could not convert it to a string. The solution was looping through all the collections in order to not include the ObjectID class, and just the string with the ID. Since we did not go with a React/JS frontend, we ran into issues when manipulating the DOM. It was very rudimentary and could have been much easier using a dynamic framework like react and two servers, the front end and back end.

Accomplishments that we're proud of

Our team excelled at collaboratively brainstorming ideas for the project and coming up with multiple options and questioning each one in order to come with a final idea. We were able to manage time with the complexity of the project well, and the integration with both the mongo database and gemini’s API was a prominent strength. We were proud of the design for our prototype, and even though we did not have the chance to fully integrate it due to our project being developed in flask and most interactive features required react. Despite this, our team was able to stay resillient and work through these challenges and built a front end that is fully functional.

What's next for TriageAI

TriageAI will aim to progress through developing a more elaborated review of the patients, construct more features such as a voice assistant guide for the triage nurses, and a full implementation of our ui/ux design prototype.

Share this project:

Updates