Inspiration

Our inspiration came from the critical issue of delayed response times for at-risk patients (like the elderly or those with chronic conditions) living independently. In a medical emergency at home, every minute counts. We realized that existing home monitoring systems are often expensive, complex, or only record data, failing to provide proactive, instant alerts to caregivers when a patient's vital signs cross a life-threatening threshold. We set out to build a cost-effective, real-time solution focused entirely on speed and intervention.

What it does

Med-Alert Connect is a Minimum Viable Product (MVP) for Remote Patient Monitoring (RPM) designed to save lives by instantly notifying a caregiver when a patient enters a critical health zone. Real-Time Monitoring: It continuously tracks a simulated vital sign (Heart Rate) via a simulated IoT device. Critical Alert Logic: The core of the backend checks if the Heart Rate is outside the safe range (e.g., $< 50$ or $> 110$ BPM).Visual Intervention: The Caregiver Dashboard immediately changes to a flashing, bright red alert state when a critical event is detected. Simple Interface: Provides a dynamic, easy-to-read interface for non-technical caregivers to monitor a patient's status without needing complex clinical software.

How we built it

We used a modern, fast, and lightweight Python stack to prioritize rapid prototyping and technical soundness. Data Simulation: We created sensor_simulator.py using Python's requests library to act as a simulated IoT device, sending JSON data payloads to the backend every five seconds. Backend & Alert Logic: We built a Flask application (app.py) to serve as the central API. It receives data via a RESTful POST endpoint, applies the critical threshold logic, and stores the latest reading in an in-memory variable. Frontend: The Caregiver Dashboard (dashboard.html) is a single-page interface using plain HTML, CSS, and JavaScript. The JavaScript continuously calls a Flask GET API endpoint (/api/latest) to fetch the most recent data and updates the display dynamically. Instant Feedback: The CSS is dynamically changed via JavaScript to trigger the flashing red alert when the API reports is_alert: True.

Challenges we ran into

Real-Time Data Flow: Initially, handling the constant stream of data and ensuring the dashboard updated reliably without overwhelming the simple Python server was a technical hurdle. We successfully implemented a clean API structure to manage this high-frequency communication. Error Handling: We encountered the inevitable Internal Server Error (500) early on, primarily due to Flask's requirement for the template files to be in a specific templates folder. Fixing this allowed the entire system to connect and run stably. Scoping the MVP: Deciding which features to cut (like complex SQL databases or user authentication) was challenging, but we successfully focused on the core value proposition: real-time alert delivery.

Accomplishments that we're proud of

Functioning End-to-End Prototype: We delivered a complete, working solution that successfully simulates an IoT device, processes data in a backend, applies critical logic, and visualizes the results on a real-time web dashboard. Demonstrating Core HealthTech Functionality: We implemented the foundation for a life-saving system—the ability to turn passive vital sign data into proactive, actionable alerts. Simplicity and Speed: We built a fully operational web application using minimal dependencies in a short amount of time, demonstrating the technical feasibility and speed of our Python-based approach.

What we learned

The Power of Simplicity in IoT: We learned that for critical applications, a simple, lightweight RESTful API for data ingestion can be highly reliable and fast for an MVP. Frontend-Backend Sync: We gained hands-on experience in managing the client-server relationship, specifically using repeated client-side API calls (setInterval) to achieve a near-real-time user experience. The Importance of requirements.txt: We solidified the need for robust dependency management to ensure our project is easily reproducible by judges and collaborators.

What's next for Med-Alert Connect: Real-Time Home Patient Monitoring MVP

To evolve Med-Alert Connect into a deployable solution, we plan to focus on persistence and external alerting: Data Persistence (SQLite): Implement a simple SQLite database to log every vital sign reading for historical review and long-term trend analysis. Data Visualization (Chart.js): Integrate a charting library to display the patient's heart rate over the last 24 hours, giving clinicians the necessary context for the alert. External Alerting: Integrate Twilio to replace console messages with immediate, critical SMS or email notifications to a roster of emergency contacts and caregivers. Multiple Patient Scaling: Refactor the backend and dashboard to securely manage and display data for dozens of patients simultaneously.

Built With

  • api
  • backend
  • framework
  • frontend
  • networking
  • protocol
Share this project:

Updates