Inspiration

In emergency rooms every second matters. A person with high fever, sudden chills, dehydration, or infection-related complications may need immediate treatment, but hospitals often receive many patients at the same time especially during seasonal outbreaks like dengue, flu, or viral fevers. Doctors and nurses must quickly decide who needs urgent care and who can wait. This process is called triage.

One real example that inspired us is mass fever outbreaks during monsoon seasons, where diseases like dengue, malaria, typhoid, and influenza affect large populations. In such cases, patients arrive together with symptoms like high fever, low platelet count, difficulty breathing, or dehydration. Medical teams have very little time to evaluate everyone. Misjudging a single patient’s severity especially a child or elderly person can lead to serious complications.

Another example is during the COVID-19 pandemic, where fever was one of the most common symptoms. Hospitals were overloaded, wards were full, and nurses had to manage hundreds of fever patients every day. Many had low oxygen levels or early signs of pneumonia. Doctors had to prioritize ICU beds and ventilators. Some hospitals used pulse oximeters and scoring systems because there wasn’t enough time to manually check every patient. We realized that even a small digital system that analyzes fever-related vitals quickly could save critical minutes.

These experiences showed us one clear thing is that if fever triage becomes faster and more accurate, more lives can be saved. That became the inspiration behind the Emergency Fever Management and Triage System.

To improve this further, we integrated an AI-based diagnostic tool. The system doesn’t just categorize patients; it also analyzes patterns in symptoms and vitals to predict possible risks, such as infection severity, sepsis warning, dehydration risk, or oxygen drop probability. By comparing the patient’s data with trained clinical patterns, the AI can suggest whether the fever is mild, needs delayed care, or requires immediate medical attention.

What it does and how we built it

We built the system in two major parts: an AI-assisted diagnostic tool and a triage agent.

The diagnostic assistant uses Gemini to understand patient symptoms (like fever, body pain, breathlessness, fatigue) and generate a preliminary assessment. This gives doctors or nurses a quick starting point instead of reviewing every symptom manually.

To classify patients based on urgency, we built a triage agent powered by a trained XGBoost model. The model uses clinical features such as heart rate, oxygen saturation, respiratory rate, blood pressure, shock index, and fever symptoms. It predicts whether the patient falls into:

✅ Green (stable) ⚠ Yellow (needs medical attention) 🔴 Red (critical / needs immediate care)

We deployed this model through a FastAPI backend, which makes real-time predictions through REST APIs. The backend accepts patient data as JSON, processes it, and returns the risk level and suggested intervention. For faster testing and development, we started with in-memory storage instead of a full database.

On the frontend, we used React + Vite to build a simple triage dashboard. The UI allows staff to enter patient vitals, submit them, and see the predicted category in seconds. We also planned WebSocket support to show live status updates when many patients are being triaged at once.

Challenges we ran into

• Converting medical logic into machine logic: Doctors think in clinical terms, but software needs numbers and thresholds. Translating concepts like shock index, oxygen levels, fever severity, chest pain, and confusion into measurable digital rules required detailed research and continuous testing.

• Getting meaningful predictions from early models: Our first versions of the XGBoost model did not perform well because some vital signs were missing or out of realistic range. We had to clean the data, add new features, and tune the model parameters before we obtained reliable predictions.

• Ensuring the system never fails: We didn’t want the entire system to stop working if the AI model crashed or was unavailable. To prevent this, we implemented a rule-based fallback system so triage results are still generated even without the machine learning model.

• Frontend to backend communication: Connecting the React frontend to the FastAPI backend was challenging because of CORS errors, JSON formatting issues, and inconsistent data types. We solved these problems by adding CORS middleware, validating inputs properly, and maintaining a consistent API structure.

• Real-time response: In emergency care, even a short delay can affect a patient. We optimized the FastAPI server, removed unnecessary processing steps, and improved our request flow so predictions return almost instantly.

• Making the interface easy to use: Medical staff do not have time to learn complicated software, especially during emergencies. We designed a clean and minimal UI that works smoothly on both desktop and mobile, allowing triage input and results to appear within seconds.

Accomplishments that we're proud of

• Successfully built an end-to-end AI triage system, from model training to frontend deployment

• Integrated Gemini (partially) for intelligent symptom interpretation

• Developed a real-time FastAPI backend with REST API support

• Built a React + Vite dashboard for quick triage decision-making

• Implemented XGBoost-based urgency classification using clinical vitals

• Achieved smooth communication between the AI assistant and triage agent

• Designed the workflow to be lightweight and scalable for hospitals

• Created a working prototype ready for further testing and enhancement

What we learned

• Time management under pressure, scoping features realistically for a 5-hour sprint

• Effective team collaboration and task parallelization

• Building and deploying machine learning models in real workflows

• Integrating AI models with modern web technologies

What's next for AI-ASSISTED DIAGNOSTICS AND TRIAGE

We plan to enhance the system with:

• EMR database integration for secure patient data management

• Expanded diagnostic capabilities with more symptoms and disease predictions

• Patient history tracking for better clinical decision-making

• WebSocket support for live updates in busy triage environments

• Continuous model retraining with real hospital data for improved accuracy

• UI enhancements for faster entry and batch triage

• HIPAA-compliant data privacy and role-based access control

Built With

Share this project:

Updates