# miduna-varshini/multi-disease-diagnostic-app architecture

> Architecture diagram of the GitHub repository miduna-varshini/multi-disease-diagnostic-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/miduna-varshini/multi-disease-diagnostic-app
- Repository: https://github.com/miduna-varshini/multi-disease-diagnostic-app

## Overview

This is a Streamlit multi-disease diagnostic app. Users sign up or log in, choose a condition, provide clinical inputs or an MRI, and receive a prediction; the app also documents PDF reports, appointment links, hospital search, speech transcription, and a Gemini health chatbot. The central workflow and several support features live in app.py, while pages/ contains separate standalone disease pages and the chatbot. Edges reflect shown code or README statements; the brain-model artifact is mentioned in the README but is absent from the provided tree.

Main entry points: [`app.py`](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py) (Shared disease workflow), [`pages/Brain.py`](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Brain.py) (MRI tumor page), [`pages/AI_Chatbot.py`](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/AI_Chatbot.py) (AI health chatbot), [`pages/Heart.py`](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Heart.py) (Heart prediction page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Main app"]
  node_auth["Signup and login<br/>[app.py]"]
  node_dashboard["Disease dashboard<br/>[app.py]"]
end

subgraph group_clinical["Disease prediction"]
  node_clinical_entry["Shared disease workflow<br/>[app.py]"]
  node_clinical_inputs["Clinical input forms<br/>[app.py]"]
  node_model_loader["Model loader<br/>[app.py]"]
  node_heart_page["Heart prediction page<br/>[Heart.py]"]
  node_diabetes_page["Diabetes prediction page<br/>[Diabetes.py]"]
  node_kidney_page["Kidney prediction page<br/>[Kidney.py]"]
  node_liver_page["Liver prediction page<br/>[Liver.py]"]
  node_brain_page["MRI tumor page<br/>[Brain.py]"]
end

subgraph group_support["Care and assistance"]
  node_pdf_report["PDF report generation<br/>[app.py]"]
  node_appointments["Appointment booking<br/>[app.py]"]
  node_hospital_search["Hospital search<br/>[app.py]"]
  node_speech["WAV transcription<br/>[app.py]"]
  node_chatbot["AI health chatbot<br/>[AI_Chatbot.py]"]
  node_gemini["Gemini service"]
  node_apollo["Apollo 247"]
  node_maps["Google Maps"]
  node_speech_service["Speech recognition"]
end

subgraph group_artifacts["Model artifacts"]
  node_heart_model["Heart model<br/>[heart_model.pkl]"]
  node_diabetes_model["Diabetes model<br/>[diabetes_model.pkl]"]
  node_kidney_model["Kidney model"]
  node_liver_model["Liver model<br/>[liver_model.pkl]"]
end

node_user(("Patient"))

node_user -->|"signs in"| node_auth
node_auth -->|"opens"| node_dashboard
node_user -->|"selects condition"| node_dashboard
node_dashboard -->|"dispatches"| node_clinical_entry
node_clinical_entry -->|"collects"| node_clinical_inputs
node_clinical_entry -->|"loads model"| node_model_loader
node_model_loader -->|"reads"| node_heart_model
node_model_loader -->|"reads"| node_diabetes_model
node_model_loader -->|"reads"| node_kidney_model
node_model_loader -->|"reads"| node_liver_model
node_user -->|"enters details"| node_heart_page
node_user -->|"enters details"| node_diabetes_page
node_user -->|"enters details"| node_kidney_page
node_user -->|"enters details"| node_liver_page
node_user -->|"uploads MRI"| node_brain_page
node_brain_page -.-> node_gemini
node_clinical_entry -->|"generates report"| node_pdf_report
node_pdf_report -->|"offers download"| node_user
node_clinical_entry -->|"offers booking"| node_appointments
node_appointments -->|"links to"| node_apollo
node_clinical_entry -->|"offers search"| node_hospital_search
node_hospital_search -->|"links to"| node_maps
node_user -->|"uploads WAV"| node_speech
node_speech -->|"transcribes"| node_speech_service
node_user -->|"asks question"| node_chatbot
node_chatbot -->|"sends message"| node_gemini

click node_auth "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_dashboard "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_clinical_entry "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_clinical_inputs "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_model_loader "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_heart_page "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Heart.py"
click node_diabetes_page "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Diabetes.py"
click node_kidney_page "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Kidney.py"
click node_liver_page "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Liver.py"
click node_brain_page "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Brain.py"
click node_heart_model "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/heart_model.pkl"
click node_diabetes_model "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/diabetes_model.pkl"
click node_kidney_model "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/kidney_10f_model.pkl"
click node_liver_model "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/liver_model.pkl"
click node_pdf_report "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_appointments "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_hospital_search "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_speech "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py"
click node_chatbot "https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/AI_Chatbot.py"

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_auth,node_dashboard toneBlue
class node_clinical_entry,node_clinical_inputs,node_model_loader,node_heart_page,node_diabetes_page,node_kidney_page,node_liver_page,node_brain_page toneAmber
class node_pdf_report,node_appointments,node_hospital_search,node_speech,node_chatbot,node_gemini,node_apollo,node_maps,node_speech_service toneMint
class node_heart_model,node_diabetes_model,node_kidney_model,node_liver_model toneRose
class node_user toneIndigo
```

## Components

### Main app

- [Signup and login](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [Disease dashboard](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`

### Disease prediction

- [Shared disease workflow](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [Clinical input forms](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [Model loader](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [Heart prediction page](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Heart.py): `pages/Heart.py`
- [Diabetes prediction page](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Diabetes.py): `pages/Diabetes.py`
- [Kidney prediction page](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Kidney.py): `pages/Kidney.py`
- [Liver prediction page](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Liver.py): `pages/Liver.py`
- [MRI tumor page](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/Brain.py): `pages/Brain.py`

### Care and assistance

- [PDF report generation](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [Appointment booking](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [Hospital search](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [WAV transcription](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/app.py): `app.py`
- [AI health chatbot](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/pages/AI_Chatbot.py): `pages/AI_Chatbot.py`
- **Gemini service**
- **Apollo 247**
- **Google Maps**
- **Speech recognition**

### Model artifacts

- [Heart model](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/heart_model.pkl): `models/heart_model.pkl`
- [Diabetes model](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/diabetes_model.pkl): `models/diabetes_model.pkl`
- [Kidney model](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/kidney_10f_model.pkl): `models/kidney_10f_model.pkl`
- [Liver model](https://github.com/miduna-varshini/multi-disease-diagnostic-app/blob/main/models/liver_model.pkl): `models/liver_model.pkl`

### Other components

- **Patient**

## Connections

- Patient → Signup and login: signs in (evidence: `app.py`)
- Signup and login → Disease dashboard: opens (evidence: `app.py`)
- Patient → Disease dashboard: selects condition (evidence: `app.py`)
- Disease dashboard → Shared disease workflow: dispatches (evidence: `app.py`)
- Shared disease workflow → Clinical input forms: collects (evidence: `app.py`)
- Shared disease workflow → Model loader: loads model (evidence: `app.py`)
- Model loader → Heart model: reads (evidence: `app.py`)
- Model loader → Diabetes model: reads (evidence: `app.py`)
- Model loader → Kidney model: reads (evidence: `app.py`)
- Model loader → Liver model: reads (evidence: `app.py`)
- Patient → Heart prediction page: enters details (evidence: `pages/Heart.py`)
- Patient → Diabetes prediction page: enters details (evidence: `pages/Diabetes.py`)
- Patient → Kidney prediction page: enters details (evidence: `pages/Kidney.py`)
- Patient → Liver prediction page: enters details (evidence: `pages/Liver.py`)
- Patient → MRI tumor page: uploads MRI (evidence: `pages/Brain.py`)
- MRI tumor page → Gemini service
- Shared disease workflow → PDF report generation: generates report (evidence: `app.py`)
- PDF report generation → Patient: offers download (evidence: `README.md`)
- Shared disease workflow → Appointment booking: offers booking (evidence: `app.py`)
- Appointment booking → Apollo 247: links to (evidence: `app.py`)
- Shared disease workflow → Hospital search: offers search (evidence: `app.py`)
- Hospital search → Google Maps: links to (evidence: `app.py`)
- Patient → WAV transcription: uploads WAV (evidence: `app.py`)
- WAV transcription → Speech recognition: transcribes (evidence: `app.py`)
- Patient → AI health chatbot: asks question (evidence: `pages/AI_Chatbot.py`)
- AI health chatbot → Gemini service: sends message (evidence: `pages/AI_Chatbot.py`)
