AI-Powered Dispatch & Resource Management
Intelligent Dispatch. Faster Response.
Created on 17th August 2025
•
AI-Powered Dispatch & Resource Management
Intelligent Dispatch. Faster Response.
The problem AI-Powered Dispatch & Resource Management solves
For a Witness or Person in an Emergency
This tool empowers individuals at the scene of an emergency to provide high-quality information to responders quickly and accurately.
Report Emergencies Faster and More Accurately
Problem: During a crisis, it's hard to remember your exact address or describe an unfamiliar location over the phone.
How it helps: Instead of typing, a user can click the "Detect" button, which uses their device's GPS to automatically find and fill in their precise location. This is faster and far more accurate than a verbal description.
Problem: A caller might be too panicked to provide all the necessary details.
How it helps: The structured form guides the user to provide the most critical information—like the type of emergency, the number of people involved, and the severity level—ensuring responders get a complete picture instantly.
Overcome Language Barriers
Problem: A person who doesn't speak the local language may struggle to communicate the details of an emergency.
How it helps: The "Additional Notes" field includes a microphone button. A user can speak in their native language, and the system will automatically transcribe and translate their words into English, ensuring no vital details are lost due to a language barrier.
Reduce Anxiety with Real-Time Updates
Problem: The period after calling for help is often filled with anxiety and uncertainty.
How it helps: After submitting a report, the user is taken to a live monitoring screen. They can watch a simulated ambulance move towards their location on a map and see a real-time ETA (Estimated Time of Arrival). This provides immediate reassurance that help is truly on the way.
Simplify Official Processes
Problem: For incidents like traffic accidents, a user needs to report to both medical and police services, often requiring multiple phone calls.
How it helps: The system allows the user to file a "Medical Emergency + Police Complaint" in one seamless process, creating linked reports for both services. Later, the user can download a formal PDF summary of the incident, which simplifies tasks like filing insurance claims.
For Individuals Seeking Medical Care
Quickly Find the Best Hospital Option
Problem: When you need to get to a hospital, you don't just want the closest one—you want the one you can get to the fastest.
How it helps: The "Maps" page shows nearby hospitals on a map and also calculates the current driving distance and estimated travel time to each one. This helps users make an informed decision to get the quickest possible care.
For Emergency Service Providers (Dispatchers)
Receive Better, More Actionable Data
Problem: Dispatchers often deal with frantic callers and incomplete or inaccurate information.
How it helps: The digital reports from this system are structured, legible, and contain precise GPS coordinates, which are far more reliable than verbal descriptions. This high-quality data allows for more efficient resource allocation.
Get Instant Support from an AI Assistant
Problem: Users may have questions or need guidance during the reporting process.
How it helps: The built-in AI Assistant, powered by Google's Gemini, can answer user questions and guide them through the form. This acts as an initial support layer, helping users provide better information and freeing up human dispatchers to focus on critical dispatch tasks.
Challenges we ran into
Challenge 1: Unreliable Geolocation and Preventing Duplicate Reports
The Hurdle: Relying solely on the browser's geolocation can be problematic. It can be slow, inaccurate, or the user might deny the permission request. A more significant challenge was handling a real-world scenario where multiple people might report the same large accident, potentially causing multiple, unnecessary ambulance dispatches.
How I Overcame It: I implemented a multi-layered solution in the report.html file.
Graceful Fallback: The location detection code includes error handling. If navigator.geolocation fails or is denied, it displays an error message and ensures the user can still manually type their address, so the core functionality is never blocked.
Duplicate Incident Check: To prevent redundant reports, I built a system that activates upon successful location detection. It queries the Firestore database (hospital_incidents) for any other reports filed in the last 30 minutes within a 100-meter radius of the current location.
User-Friendly Warning: If a potential duplicate is found, the system doesn't block the report. Instead, it changes the "Detect" button to a yellow "Report Anyway" button and displays a clear warning: "Warning: An incident was recently reported here. Proceed if this is a new emergency.". This prevents accidental duplicates while empowering the user to override if the situation is different, striking a balance between efficiency and safety.
Challenge 2: Creating a Realistic and Robust Ambulance Simulation
The Hurdle: For the monitoring page, simply drawing a straight line for the ambulance's path would look unrealistic and provide an inaccurate ETA. The simulation needed to follow actual roads. Furthermore, the external routing API could occasionally fail or be unable to find a route, which could crash the page.
How I Overcame It:
Real-World Routing: Instead of a simple animation, I used the Open Source Routing Machine (OSRM) API to fetch a real driving route from a simulated starting point to the incident's coordinates.
Path Animation: The code then animates the ambulance marker along the precise path provided by the OSRM route data using a setInterval function. This ensures the ambulance realistically follows the twists and turns of the road network.
Error Handling: The entire simulation logic is wrapped in a try...catch block. If the OSRM API fails to return a route, the catch block prevents the script from crashing. It gracefully updates the ETA field to "Unavailable" and logs the error, ensuring a robust user experience even when external services fail.
Challenge 3: Secure API Key Management and Graceful Error Handling
The Hurdle: In the Python chatbot server, hardcoding the Google Gemini API key directly into the chatbot_server.py script would be a major security vulnerability. Additionally, if the external API request failed (due to an invalid key, quota limits, etc.), the chatbot would simply break without giving the user any feedback.
How I Overcame It:
Secure Key Loading: The API key is not present in the main script. Instead, it is securely loaded from a separate, untracked file named api_key.txt. In a real-world project, this file would be added to .gitignore to prevent the secret key from ever being exposed in a code repository.
Specific API Error Forwarding: I implemented detailed error handling for the Gemini API call. The code checks if the response status is not successful (if response.status_code != 200). If it's an error, it extracts the specific error message from Google's JSON response and forwards it to the frontend chatbot window. This means the user sees a helpful message like "API Error: API key not valid" instead of a generic "failed to fetch" error, making debugging significantly easier.
Tracks Applied (1)
Ethereum Track
ETHIndia
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
