# hemanthsai456/sparcs-healthcare-bi-platform architecture

> Architecture diagram of the GitHub repository hemanthsai456/sparcs-healthcare-bi-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hemanthsai456/sparcs-healthcare-bi-platform
- Repository: https://github.com/hemanthsai456/sparcs-healthcare-bi-platform

## Overview

This repository is a PostgreSQL and Power BI healthcare analytics platform for integrating seven years of NYS SPARCS inpatient discharge data into a governed warehouse and dashboards. Its documented workflow runs from source files through staging, validation, ETL, and a dimensional warehouse, then exposes analytics and monitoring for Power BI reporting. The README documents these relationships; source excerpts were unavailable, so the graph does not infer finer-grained SQL calls or dependencies.

Main entry points: [`SQL/04_fact`](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/04_fact) (Discharge Fact), [`SQL/05_views`](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/05_views) (Analytics Views), [`SQL/02_staging`](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging) (ETL and Audit), [`SQL/03_dimensions`](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/03_dimensions) (Dimensions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data Ingestion"]
  node_staging["Staging Layer"]
  node_quality["Data Quality"]
  node_etl["ETL and Audit"]
end

subgraph group_warehouse["Warehouse"]
  node_dimensions["Dimensions"]
  node_fact["Discharge Fact"]
end

subgraph group_analytics["Analytics"]
  node_views["Analytics Views"]
  node_business_queries["Business Analytics"]
  node_materialized_views[("Materialized Views")]
  node_optimization["Query Optimization"]
  node_monitoring["Warehouse Monitoring"]
end

subgraph group_consumption["Reporting"]
  node_powerbi["Power BI Dashboards"]
end

node_sparcs(("SPARCS Data"))

node_sparcs -->|"loads into"| node_staging
node_staging -->|"validates"| node_quality
node_quality -->|"precedes"| node_etl
node_etl -->|"transforms for"| node_dimensions
node_etl -->|"loads"| node_fact
node_dimensions -->|"models with"| node_fact
node_fact -->|"feeds"| node_views
node_fact -->|"feeds"| node_materialized_views
node_fact -->|"monitors"| node_monitoring
node_views -->|"reports through"| node_powerbi
node_materialized_views -->|"reports through"| node_powerbi
node_views -.->|"supports analysis"| node_business_queries
node_views -->|"tunes queries"| node_optimization

click node_staging "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging"
click node_quality "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging"
click node_etl "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging"
click node_dimensions "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/03_dimensions"
click node_fact "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/04_fact"
click node_views "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/05_views"
click node_business_queries "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/06_analytical_queries"
click node_materialized_views "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/08_reporting_layer"
click node_optimization "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/07_optimization"
click node_monitoring "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/09_monitoring"
click node_powerbi "https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/POWERBI"

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_staging,node_quality,node_etl toneBlue
class node_dimensions,node_fact toneAmber
class node_views,node_business_queries,node_materialized_views,node_optimization,node_monitoring toneMint
class node_powerbi toneRose
class node_sparcs toneIndigo
```

## Components

### Data Ingestion

- [Staging Layer](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging): `SQL/02_staging`
- [Data Quality](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging): `SQL/02_staging`
- [ETL and Audit](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/02_staging): `SQL/02_staging`

### Warehouse

- [Dimensions](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/03_dimensions): `SQL/03_dimensions`
- [Discharge Fact](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/04_fact): `SQL/04_fact`

### Analytics

- [Analytics Views](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/05_views): `SQL/05_views`
- [Business Analytics](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/06_analytical_queries): `SQL/06_analytical_queries`
- [Materialized Views](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/08_reporting_layer): `SQL/08_reporting_layer`
- [Query Optimization](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/07_optimization): `SQL/07_optimization`
- [Warehouse Monitoring](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/SQL/09_monitoring): `SQL/09_monitoring`

### Reporting

- [Power BI Dashboards](https://github.com/hemanthsai456/sparcs-healthcare-bi-platform/tree/main/POWERBI): `POWERBI`

### Other components

- **SPARCS Data**

## Connections

- SPARCS Data → Staging Layer: loads into (evidence: `README.md`)
- Staging Layer → Data Quality: validates (evidence: `README.md`)
- Data Quality → ETL and Audit: precedes (evidence: `README.md`)
- ETL and Audit → Dimensions: transforms for (evidence: `README.md`)
- ETL and Audit → Discharge Fact: loads (evidence: `README.md`)
- Dimensions → Discharge Fact: models with (evidence: `README.md`)
- Discharge Fact → Analytics Views: feeds (evidence: `README.md`)
- Discharge Fact → Materialized Views: feeds (evidence: `README.md`)
- Discharge Fact → Warehouse Monitoring: monitors (evidence: `README.md`)
- Analytics Views → Power BI Dashboards: reports through (evidence: `README.md`)
- Materialized Views → Power BI Dashboards: reports through (evidence: `README.md`)
- Analytics Views → Business Analytics: supports analysis
- Analytics Views → Query Optimization: tunes queries (evidence: `README.md`)
