A modern, medical-grade web application designed for Radiation Oncologists to assess, visualize, and monitor the risk of Radiation Proctitis (RadPro) in patients undergoing radiation therapy.
This project upgrades a legacy Streamlit prototype into a full-featured, responsive React application integrated with Google's Gemini 2.5 Flash AI for intelligent clinical decision support.
A high-level overview of department statistics, recent critical cases, and risk distribution.

Structured clinical intake form integrating demographics, dosimetry, and AI-analyzed clinical notes.

Comprehensive risk report featuring multi-dimensional radar charts, population positioning, and AI-generated reasoning.

Mobile-responsive interface for patients to report symptoms and complete standardized questionnaires (QLQ-PRT20).

Integrated chatbot for real-time medical queries and data interpretation.

- AI-Powered Analysis: Utilizes Google Gemini 2.5 Flash to analyze structured data (Dosimetry, Demographics) and unstructured text (Clinical Notes, Genomic Markers).
- Dual-Risk Scoring: Calculates distinct probability scores for Acute Toxicity (0-3 months) and Late Toxicity (>6 months).
- Multi-Dimensional Radar: Visualizes risk contributions across 5 key axes: Genomics, Dosimetry, Age, Medications, and Comorbidities.
- Modern Dashboard: A clean, "Glassmorphism" inspired interface designed for clinical environments.
- Interactive Visualizations:
- Radial Gauges: Instant visual feedback on risk levels.
- Population Bell Curve: Places individual patient risk in the context of a 1,200-patient dataset.
- Animated Radar Charts: Clear visualization of multi-factorial risk drivers.
- Responsive Design: Built with Tailwind CSS for seamless use on desktops and tablets.
- Integrated Patient Portal: A dedicated interface for patients to report symptoms directly.
- Standardized Questionnaires: Fully integrated EORTC QLQ-PRT20 (European Organization for Research and Treatment of Cancer) module for standardized quality-of-life assessment.
- Symptom Scoring: Automatically calculates normalized Symptom Burden Scores (0-100) based on patient responses to the 21-item questionnaire.
- General Symptom Tracking: Tracks Rectal Bleeding status, Pain Index (0-10), Urgency, and Stool Frequency.
- Longitudinal History: Visualizes trends for both general symptoms and standardized QLQ-PRT20 scores to help clinicians identify progression early.
- Automated Reasoning: The AI generates human-readable reasoning for every risk score.
- Actionable Recommendations: Provides tailored clinical next steps (e.g., "Review anticoagulant therapy", "Schedule colonoscopy").
- Contraindication Checks: Automatically flags potential contraindications based on patient history.
- Frontend: React 19, TypeScript, Vite
- Styling: Tailwind CSS (Custom "Medical" color palette & Animations)
- AI Engine: Google GenAI SDK (
@google/genai) connecting to Gemini 2.5 Flash - State Management: React Hooks (
useState,useEffect,useRef) - Icons: Custom SVG Icons tailored for medical context
- Node.js (v18 or higher)
- A Google AI Studio API Key (for Gemini integration)
-
Clone the repository
git clone https://github.com/your-username/radshield-web-ui.git cd radshield-web-ui -
Install Dependencies
npm install
-
Configure API Key
- Create a
.envfile in the root directory. - Add your Gemini API Key:
API_KEY=your_google_ai_studio_api_key_here
- Note: In the current prototype setup via standard build tools, ensure the key is accessible to the process environment.
- Create a
-
Run Development Server
npm start
Open http://localhost:8080 to view the app.
App.tsx: Main application logic, routing (Dashboard/Assessment/History/ePRO), and view components.services.ts: Handles interaction with the Google Gemini API, including prompt engineering and JSON schema validation.types.ts: TypeScript definitions for Patient Data, Risk Models, and ePRO records.constants.ts: Mock data for history, dashboard statistics, questionnaires, and configuration options.index.html: Root HTML file containing Tailwind CSS CDN and font configurations.
Radiation Proctitis is a common side effect of pelvic radiation therapy (e.g., for prostate or cervical cancer). Early identification of high-risk patients allows for:
- Dose Optimization: Adjusting VMAT/IMRT plans for better sparing.
- Pre-habilitation: Managing comorbidities (diabetes, hypertension) before treatment.
- Early Intervention: Initiating symptom management protocols immediately upon report.
RadShield bridges the gap between complex dosimetric data and actionable clinical insight.
This application is a prototype for research and demonstration purposes. It is not an FDA-approved medical device. The risk scores and AI recommendations should be verified by a qualified medical professional before making clinical decisions.