RenalSight: AI-Powered Chronic Kidney Disease Risk Assessment System
Overview
RenalSight is a comprehensive AI-powered clinical decision support system developed by DiaSight for Chronic Kidney Disease (CKD) assessment in diabetic patients. The system provides two complementary analyses: current CKD stage prediction and disease progression trajectory forecasting, designed to assist healthcare professionals in making informed clinical decisions.
🔌 Frontend API Integration Guide
RenalSight is deployed as a headless FastAPI backend. This section provides the complete reference for integrating the API into the frontend of the kidney digital twin application.
Base URL
All API requests should be made to your Hugging Face Space URL:
https://yongnotgio12-renalsight.hf.space
(Note: If testing locally via Docker, the base URL is http://localhost:7860)
1. CKD Stage Assessment Endpoint
POST /predict/stage
Predicts the current CKD stage (1-5) and returns tailored clinical alerts/recommendations based on KDIGO guidelines.
Request Payload Schema
Headers: Content-Type: application/json
| Field | Type | Description |
|---|
age | float | Patient's age in years |
sex | int | 1 for Male, 2 for Female |
duration | float | Years since diabetes diagnosis |
hbp | int | High Blood Pressure: 1 for No, 2 for Yes |
sbp | float | Systolic Blood Pressure (mmHg) |
dbp | float | Diastolic Blood Pressure (mmHg) |
hba1c | float | HbA1c percentage |
bun | float | Blood Urea Nitrogen (mg/dL) |
urea | float | Serum Urea (mg/dL) |
ALB | float | Serum Albumin (g/dL) |
UACR | float | Urine Albumin-to-Creatinine Ratio (mg/g) |
Example Request Body:
1{
2 "age": 65.5,
3 "sex": 1,
4 "duration": 12.0,
5 "hbp": 2,
6 "sbp": 145.0,
7 "dbp": 90.0,
8 "hba1c": 8.2,
9 "bun": 25.0,
10 "urea": 50.0,
11 "ALB": 3.8,
12 "UACR": 45.0
13}
Response Schema
Example Response (200 OK):
1{
2 "prediction": 3,
3 "confidence": 85.5,
4 "probabilities": [0.05, 0.10, 0.85, 0.0, 0.0],
5 "warnings": [
6 "⚠️ Poor glycemic control increases CKD progression risk"
7 ],
8 "recommendations": [
9 "Intensify diabetes management"
10 ]
11}
2. Disease Trajectory Forecasting Endpoint
POST /predict/trajectory
Estimates whether the patient's kidney function will remain stable or decline progressively, calculating the estimated decline rate and years to dialysis.
Request Payload Schema
Requires all the exact same fields as the Stage Assessment, plus eGFR:
| Field | Type | Description |
|---|
eGFR | float | Estimated Glomerular Filtration Rate (mL/min/1.73m²) |
| (Include all 11 fields from the stage payload above as well) | | |
Example Request Body:
1{
2 "age": 65.5,
3 "sex": 1,
4 "duration": 12.0,
5 "hbp": 2,
6 "sbp": 145.0,
7 "dbp": 90.0,
8 "hba1c": 8.2,
9 "bun": 25.0,
10 "urea": 50.0,
11 "ALB": 3.8,
12 "UACR": 45.0,
13 "eGFR": 42.5
14}
Response Schema
prediction: 0 (Stable) or 1 (Progressive Decline)
decline_rate: Estimated drop in eGFR per year.
years_to_dialysis: Estimated years until eGFR hits 15 (returns null if patient is stable or already ≤15).
Example Response (200 OK):
1{
2 "prediction": 1,
3 "confidence": 92.3,
4 "probabilities": [0.077, 0.923],
5 "decline_rate": 3.5,
6 "years_to_dialysis": 7.85,
7 "current_egfr": 42.5,
8 "baseline_egfr": 99.5
9}
⚠️ Error Handling
When consuming this API, ensure your frontend catches standard HTTP errors:
422 Unprocessable Entity: Thrown automatically by FastAPI if your frontend sends missing fields or incorrect data types (e.g., sending a string instead of a float). The response body will contain a detail array explaining exactly which field failed validation.
503 Service Unavailable: Thrown if the machine learning models fail to load into memory correctly on the Hugging Face Space.
500 Internal Server Error: Thrown if an unexpected calculation error occurs during prediction.
For interactive testing and auto-generated OpenApi schemas, you can always visit the https://yongnotgio12-renalsight.hf.space/docs route directly in your browser.
Features
🏥 Patient Risk Assessment
- Stage Assessment: Predicts current CKD stage (1-5) using Neuro-Symbolic AI that combines machine learning with clinical rule integration
- Trajectory Prediction: Forecasts disease progression using Neural ODE technology to predict stable vs. progressive trajectories
- Clinical Rule Integration: Incorporates KDIGO guidelines and clinical best practices
- Explainable AI: SHAP-based feature importance analysis for transparency
🏥 Referral Directory
- Comprehensive YAKAP clinics database with 2300+ verified facilities
- Advanced search and filtering capabilities
- Direct email referral generation
- Pagination for optimal performance
📊 Model Performance Analytics
- Real-time model performance metrics
- Comparative analysis of different AI approaches
- Visual performance dashboards
Technical Architecture
Stage Prediction Model
- Algorithm: XGBoost classifier with Optuna optimization
- Symbolic Component: Clinical rules for BUN, UACR, and Albumin thresholds
- Features: 11 clinical parameters (age, sex, diabetes duration, vitals, lab values)
- Approach: Soft rule guidance for improved accuracy
Trajectory Prediction Model
- Algorithm: Neural ODE Classifier
- ODE Solver: DOPRI5 adaptive integration
- Features: 12 parameters including current eGFR
- Output: Binary classification (Stable vs. Progressive trajectory)
Clinical Applications
Stage Assessment Answers:
- What is the patient's current CKD stage?
- Are there any clinical rule violations?
- Which biomarkers are concerning?
Trajectory Prediction Answers:
- Will the patient's kidney function decline rapidly?
- When might the patient need dialysis?
- What is the expected rate of eGFR decline?
- Is urgent intervention needed?
About DiaSight
DiaSight is a pioneering healthcare AI company focused on making advanced medical screening accessible through innovative technology. Founded as a student-led startup, DiaSight has rapidly gained recognition in the Philippine startup ecosystem:
- 🥈 1st Runner-Up - National AI Fest 2025
- 🏆 Champion - AI.DEAS for Impact 2025
- 🏆 Triple Crown Winner - PSC X Regional Pitching Competition
- 🏆 National Champion - Philippine Startup Challenge X 2025
- 📄 Top 5% Research Publication - International Symposium on Advanced Intelligent Systems
DiaSight specializes in diabetic retinopathy screening and has expanded into comprehensive diabetic care solutions, including RenalSight for CKD risk assessment.
Clinical Disclaimer
Important: This tool is designed to assist healthcare professionals and should NOT replace clinical judgment. All predictions should be validated with comprehensive patient assessment and appropriate diagnostic tests.
- Always correlate with clinical presentation
- Consider additional diagnostic tests
- Follow local guidelines and protocols
- Document appropriately in medical records
Dataset Information
- Sample Size: 503 diabetic patients with CKD stages 1-5
- Validation: 60/20/20 train/validation/test split
- Class Balancing: SMOTE-ENC technique
- Performance: Test accuracy ~95% for stage prediction, 97.8% for trajectory prediction
Contact
For more information about DiaSight and our healthcare AI solutions, visit our website or contact us through official channels.
RenalSight v2.0 - Integrated Stage & Trajectory Assessment by DiaSight
For educational and research purposes only