🧠 AGENT PARKINSON


Inspiration

Parkinson's disease affects over 10 million people worldwide, yet early diagnosis and continuous monitoring remain major clinical challenges.

Neurologists rely on in-clinic motor assessments — observations of hand tremors, posture, and gait — that are:

  • Subjective
  • Infrequent
  • Expensive
  • Highly dependent on specialist availability

Patients in rural areas or with limited mobility often wait months between appointments while their symptoms go unmonitored.

Clinically, motor severity is often represented on an ordinal scale:

$$ Score \in {0,1,2,3} $$

Where:

  • (0) = Normal
  • (1) = Mild
  • (2) = Moderate
  • (3) = Severe

However, these scores are typically assigned during short in-person visits, making longitudinal tracking inconsistent.

We asked:

What if a doctor could send a patient a link, the patient films themselves for 10 seconds, and AI performs structured clinical scoring — from anywhere, on any device, with no app to install?


What It Does

AGENT PARKINSON is an AI-powered remote motor assessment platform for Parkinson’s disease monitoring.

It operates in two distinct modes:


👋 Hand Scan (7 seconds)

The patient holds both hands in front of their webcam.

Gemini AI independently scores:

  • Tremor
  • Rigidity
  • Bradykinesia

For each hand:

$$ S_{hand} = {T, R, B}, \quad T,R,B \in {0,1,2,3} $$

The system avoids averaging left and right hands to preserve clinical asymmetry.

If needed, a derived global tremor index can be computed as:

$$ S_{global} = \frac{S_{left} + S_{right}}{2} $$

Output includes:

  • Independent left/right severity scoring
  • Structured JSON response
  • Voice summary
  • Longitudinal trend tracking

🧍 Full Body Scan (10 seconds)

The patient steps back and faces the camera.

Gemini AI evaluates six motor indicators:

  • Posture
  • Facial masking
  • Arm swing
  • Head tremor
  • Gait
  • Balance

Each indicator follows the same structured 0–3 severity model:

$$ S_{body} = \sum_{i=1}^{6} I_i $$

Where each ( I_i \in {0,1,2,3} ).

This allows consistent session-over-session progression analysis:

$$ \Delta S = S_{t} - S_{t-1} $$


👩‍⚕️ Doctor Dashboard

Neurologists can:

  • Create and search patients by code
  • Generate unique shareable links (no login required for patients)
  • View per-patient scan histories
  • Download auto-generated HTML clinical reports

Reports include:

  • Per-hand line charts
  • Body assessment panels
  • Severity doughnut charts
  • Session-over-session trend graphs

All reports are self-contained HTML (no external dependencies).


🏗 How We Built It

Layer Technology
Frontend React 18 + TypeScript + Vite + Tailwind CSS
AI Analysis Google Gemini Flash (multimodal video frames)
Agent Orchestration Google ADK (@google/adk)
Backend Node.js + Express
Auth Firebase Authentication (email/password for doctors)
Database Cloud Firestore (doctor → patient → analyses hierarchy)
Reports Self-contained HTML with Chart.js

The frontend captures video via MediaRecorder, converts it to base64, and sends it to the Express backend.

The backend sends structured prompts to Gemini and enforces strict JSON schemas — separate schemas for:

  • Hand Scan
  • Full Body Scan

Results are stored under:

doctors/{uid}/patients/{code}/analyses

Patient access uses a stateless token stored in:

patientTokens/{token}

No account creation. No cookies. Just a secure link.


Challenges We Ran Into

Per-hand independent scoring Ensuring Gemini scored left and right hands separately required strict schema enforcement and precise prompt engineering.

Patient auth without accounts Designing a zero-friction but secure stateless flow required careful Firestore attribution logic.

Body scan calibration Calibrating six motor indicators from a 10-second clip to be clinically meaningful (not overly generous) required multiple iterations.

Firestore indexing .orderBy() on subcollections returned empty results without composite indexes — solved via controlled in-memory sorting.


Accomplishments We’re Proud Of

  • Complete doctor–patient workflow built end-to-end within a hackathon timeframe
  • Two distinct AI assessment modes using a single multimodal model
  • Fully automated clinical reports with charts and trend tables
  • Zero-friction patient UX — open link → record → done

What We Learned

  • Structured, schema-enforced prompting dramatically improves clinical consistency
  • Gemini Flash performs strong multimodal motor observation when tightly constrained
  • Designing for neurologists and tremor-affected patients requires constant UX balance
  • Stateless token-based medical workflows are powerful and scalable

What’s Next for AGENT PARKINSON

  • 📈 Longitudinal trend alerts
  • 🔊 Voice-guided patient flow
  • 🌍 Full multi-language UI support
  • 🧾 UPDRS score mapping
  • 📱 Mobile PWA optimization
  • 📝 Clinician annotations and AI score override

Share this project:

Updates