# ravadakaran/multiple-disease-prediction- architecture

> Architecture diagram of the GitHub repository ravadakaran/multiple-disease-prediction-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ravadakaran/multiple-disease-prediction-
- Repository: https://github.com/ravadakaran/multiple-disease-prediction-

## Overview

MediScan AI is a web-based, four-disease risk-screening platform. A patient submits biomarkers through the single-page dashboard; FastAPI routes the request to disease-specific model inference, returns a risk score and recommendations for visualization, and can generate a PDF report on demand. A separate training pipeline builds and serializes the models from local datasets. The README documents the SPA, benchmark analytics, and screening coverage; the excerpts show API and report behavior, but not all frontend or model-loading implementation details.

Main entry points: [`main.py`](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py) (FastAPI Routes), [`templates/index.html`](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/templates/index.html) (Screening Dashboard), [`train_models.py`](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/train_models.py) (Training Pipeline), [`chart_utils.py`](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/chart_utils.py) (Risk Analytics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Patient Experience"]
  node_dashboard["Screening Dashboard<br/>[index.html]"]
  node_analytics["Risk Analytics<br/>[chart_utils.py]"]
end

subgraph group_screening["Risk Screening"]
  node_api["FastAPI Routes<br/>[main.py]"]
  node_diabetes["Diabetes Screening<br/>[main.py]"]
  node_heart["Heart Screening<br/>[main.py]"]
  node_parkinsons["Parkinson's Screening<br/>[main.py]"]
  node_breast["Breast Screening<br/>[main.py]"]
  node_models["Saved Models"]
end

subgraph group_reporting["Clinical Reporting"]
  node_report_api["PDF Report Endpoint<br/>[main.py]"]
  node_pdf["PDF Generator"]
end

subgraph group_training["Model Training"]
  node_training["Training Pipeline<br/>[train_models.py]"]
  node_datasets["Clinical Datasets"]
  node_trained_models["Serialized Models"]
end

node_patient(("Patient"))

node_patient -->|"enters biomarkers"| node_dashboard
node_dashboard -->|"submits screening"| node_api
node_api -->|"routes request"| node_diabetes
node_api -->|"routes request"| node_heart
node_api -->|"routes request"| node_parkinsons
node_api -->|"routes request"| node_breast
node_dashboard -.->|"visualizes risk"| node_analytics
node_api -.->|"loads for inference"| node_models
node_dashboard -->|"requests PDF"| node_report_api
node_report_api -->|"generates report"| node_pdf
node_training -->|"reads data"| node_datasets
node_training -->|"serializes models"| node_trained_models

click node_dashboard "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/templates/index.html"
click node_api "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py"
click node_diabetes "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py"
click node_heart "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py"
click node_parkinsons "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py"
click node_breast "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py"
click node_models "https://github.com/ravadakaran/multiple-disease-prediction-/tree/master/saved_models"
click node_analytics "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/chart_utils.py"
click node_report_api "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py"
click node_pdf "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/report_generator.py"
click node_training "https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/train_models.py"
click node_datasets "https://github.com/ravadakaran/multiple-disease-prediction-/tree/master/dataset"
click node_trained_models "https://github.com/ravadakaran/multiple-disease-prediction-/tree/master/saved_models"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_analytics toneBlue
class node_api,node_diabetes,node_heart,node_parkinsons,node_breast,node_models toneAmber
class node_report_api,node_pdf toneMint
class node_training,node_datasets,node_trained_models toneRose
class node_patient toneIndigo
```

## Components

### Patient Experience

- [Screening Dashboard](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/templates/index.html): `templates/index.html`
- [Risk Analytics](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/chart_utils.py): `chart_utils.py`

### Risk Screening

- [FastAPI Routes](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py): `main.py`
- [Diabetes Screening](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py): `main.py`
- [Heart Screening](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py): `main.py`
- [Parkinson's Screening](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py): `main.py`
- [Breast Screening](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py): `main.py`
- [Saved Models](https://github.com/ravadakaran/multiple-disease-prediction-/tree/master/saved_models): `saved_models`

### Clinical Reporting

- [PDF Report Endpoint](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/main.py): `main.py`
- [PDF Generator](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/report_generator.py): `report_generator.py`

### Model Training

- [Training Pipeline](https://github.com/ravadakaran/multiple-disease-prediction-/blob/master/train_models.py): `train_models.py`
- [Clinical Datasets](https://github.com/ravadakaran/multiple-disease-prediction-/tree/master/dataset): `dataset`
- [Serialized Models](https://github.com/ravadakaran/multiple-disease-prediction-/tree/master/saved_models): `saved_models`

### Other components

- **Patient**

## Connections

- Patient → Screening Dashboard: enters biomarkers (evidence: `README.md`)
- Screening Dashboard → FastAPI Routes: submits screening (evidence: `README.md`)
- FastAPI Routes → Diabetes Screening: routes request (evidence: `main.py`)
- FastAPI Routes → Heart Screening: routes request (evidence: `main.py`)
- FastAPI Routes → Parkinson's Screening: routes request (evidence: `main.py`)
- FastAPI Routes → Breast Screening: routes request (evidence: `main.py`)
- Screening Dashboard → Risk Analytics: visualizes risk (evidence: `README.md`)
- FastAPI Routes → Saved Models: loads for inference
- Screening Dashboard → PDF Report Endpoint: requests PDF (evidence: `README.md`)
- PDF Report Endpoint → PDF Generator: generates report (evidence: `main.py`)
- Training Pipeline → Clinical Datasets: reads data (evidence: `train_models.py`)
- Training Pipeline → Serialized Models: serializes models (evidence: `train_models.py`)
