# kryp71cgh057/hdvs architecture

> Architecture diagram of the GitHub repository kryp71cgh057/hdvs, 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/kryp71cgh057/hdvs
- Repository: https://github.com/kryp71cgh057/hdvs

## Overview

This repository is a Streamlit healthcare-insights dashboard with separate script-based analyses. The primary user workflow is to upload a CSV (or use a default dataset), clean and validate records, then choose dashboard analyses and inspect visualizations. The README highlights demographic, timeline, and treatment insights; sampled code also shows overview, medical-condition, and length-of-stay views. Several dashboard entry points overlap, so they are represented as distinct app variants. Edges are limited to relationships shown in excerpts or documented in the README; unsampled app wiring is not inferred.

Main entry points: [`app_2.py`](https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py) (Dashboard app), [`healthcare_dataset.csv`](https://github.com/kryp71cgh057/hdvs/blob/main/healthcare_dataset.csv) (Healthcare CSV), [`Data_Clening.py`](https://github.com/kryp71cgh057/hdvs/blob/main/Data_Clening.py) (CSV cleaning script), [`Demographic_Analysis.py`](https://github.com/kryp71cgh057/hdvs/blob/main/Demographic_Analysis.py) (Demographics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Interactive dashboard"]
  node_app2["Dashboard app<br/>[app_2.py]"]
  node_app["Styled dashboard<br/>[app.py]"]
  node_main["Extended dashboard<br/>[main.py]"]
  node_backup["Backup dashboard<br/>[backup_app_2.py]"]
  node_clean["Data validation<br/>[app_2.py]"]
end

subgraph group_insights["Analysis views"]
  node_demographics["Demographics"]
  node_timeline["Timeline trends"]
  node_treatment["Treatment patterns"]
  node_overview["Overview metrics<br/>[app_2.py]"]
  node_conditions["Condition analysis<br/>[app_2.py]"]
  node_stay["Length of stay<br/>[app_2.py]"]
end

subgraph group_scripts["Standalone analyses"]
end

subgraph group_data["Dataset preparation"]
  node_csv[("Healthcare CSV")]
  node_cleanedcsv[("Cleaned CSV")]
  node_cleaning_script["CSV cleaning script<br/>[Data_Clening.py]"]
  node_inspection["Dataset inspection"]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_app2
node_user -->|"uploads CSV"| node_app2
node_app2 -->|"validates and cleans"| node_clean
node_app2 -->|"loads default"| node_cleanedcsv
node_app2 -->|"renders"| node_overview
node_app2 -->|"renders view"| node_demographics
node_app2 -->|"renders view"| node_timeline
node_app2 -->|"renders view"| node_treatment
node_app2 -->|"renders"| node_conditions
node_app2 -->|"renders"| node_stay
node_csv -->|"reads"| node_cleaning_script
node_cleaning_script -->|"writes"| node_cleanedcsv
node_csv -->|"reads"| node_inspection
node_csv -->|"reads"| node_demographics
node_csv -->|"reads"| node_timeline
node_csv -->|"reads"| node_treatment

click node_app2 "https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py"
click node_app "https://github.com/kryp71cgh057/hdvs/blob/main/app.py"
click node_main "https://github.com/kryp71cgh057/hdvs/blob/main/main.py"
click node_backup "https://github.com/kryp71cgh057/hdvs/blob/main/backup_app_2.py"
click node_clean "https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py"
click node_csv "https://github.com/kryp71cgh057/hdvs/blob/main/healthcare_dataset.csv"
click node_cleanedcsv "https://github.com/kryp71cgh057/hdvs/blob/main/cleaned_healthcare_data.csv"
click node_demographics "https://github.com/kryp71cgh057/hdvs/blob/main/Demographic_Analysis.py"
click node_timeline "https://github.com/kryp71cgh057/hdvs/blob/main/Timeline_Analysis.py"
click node_treatment "https://github.com/kryp71cgh057/hdvs/blob/main/Treatment_Analysis.py"
click node_overview "https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py"
click node_conditions "https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py"
click node_stay "https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py"
click node_cleaning_script "https://github.com/kryp71cgh057/hdvs/blob/main/Data_Clening.py"
click node_inspection "https://github.com/kryp71cgh057/hdvs/blob/main/analyze_healthcare_data.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_app2,node_app,node_main,node_backup,node_clean,node_user toneBlue
class node_demographics,node_timeline,node_treatment,node_overview,node_conditions,node_stay toneAmber
class node_csv,node_cleanedcsv,node_cleaning_script,node_inspection toneRose
```

## Components

### Interactive dashboard

- [Dashboard app](https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py): `app_2.py`
- [Styled dashboard](https://github.com/kryp71cgh057/hdvs/blob/main/app.py): `app.py`
- [Extended dashboard](https://github.com/kryp71cgh057/hdvs/blob/main/main.py): `main.py`
- [Backup dashboard](https://github.com/kryp71cgh057/hdvs/blob/main/backup_app_2.py): `backup_app_2.py`
- [Data validation](https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py): `app_2.py`

### Analysis views

- [Demographics](https://github.com/kryp71cgh057/hdvs/blob/main/Demographic_Analysis.py): `Demographic_Analysis.py`
- [Timeline trends](https://github.com/kryp71cgh057/hdvs/blob/main/Timeline_Analysis.py): `Timeline_Analysis.py`
- [Treatment patterns](https://github.com/kryp71cgh057/hdvs/blob/main/Treatment_Analysis.py): `Treatment_Analysis.py`
- [Overview metrics](https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py): `app_2.py`
- [Condition analysis](https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py): `app_2.py`
- [Length of stay](https://github.com/kryp71cgh057/hdvs/blob/main/app_2.py): `app_2.py`

### Dataset preparation

- [Healthcare CSV](https://github.com/kryp71cgh057/hdvs/blob/main/healthcare_dataset.csv): `healthcare_dataset.csv`
- [Cleaned CSV](https://github.com/kryp71cgh057/hdvs/blob/main/cleaned_healthcare_data.csv): `cleaned_healthcare_data.csv`
- [CSV cleaning script](https://github.com/kryp71cgh057/hdvs/blob/main/Data_Clening.py): `Data_Clening.py`
- [Dataset inspection](https://github.com/kryp71cgh057/hdvs/blob/main/analyze_healthcare_data.py): `analyze_healthcare_data.py`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Dashboard app: uses (evidence: `Readme.md`)
- Dashboard user → Dashboard app: uploads CSV (evidence: `Readme.md`)
- Dashboard app → Data validation: validates and cleans (evidence: `app_2.py`)
- Dashboard app → Cleaned CSV: loads default (evidence: `app_2.py`)
- Dashboard app → Overview metrics: renders (evidence: `app_2.py`)
- Dashboard app → Demographics: renders view (evidence: `Readme.md`)
- Dashboard app → Timeline trends: renders view (evidence: `Readme.md`)
- Dashboard app → Treatment patterns: renders view (evidence: `Readme.md`)
- Dashboard app → Condition analysis: renders (evidence: `app_2.py`)
- Dashboard app → Length of stay: renders (evidence: `app_2.py`)
- Healthcare CSV → CSV cleaning script: reads (evidence: `Data_Clening.py`)
- CSV cleaning script → Cleaned CSV: writes (evidence: `Data_Clening.py`)
- Healthcare CSV → Dataset inspection: reads (evidence: `analyze_healthcare_data.py`)
- Healthcare CSV → Demographics: reads (evidence: `Demographic_Analysis.py`)
- Healthcare CSV → Timeline trends: reads (evidence: `Timeline_Analysis.py`)
- Healthcare CSV → Treatment patterns: reads (evidence: `Treatment_Analysis.py`)
