# databeli/caresync_azure_project architecture

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

- Interactive diagram: https://gitdiagram.com/databeli/caresync_azure_project
- Repository: https://github.com/databeli/caresync_azure_project

## Overview

CareSync is a metadata-driven healthcare data platform. Hospital PostgreSQL tables and partner CSV feeds are ingested through Azure Data Factory, transformed in Databricks across Bronze, Silver, and Gold, then exposed through reporting tables and consumption tools. SQL control and audit tables support orchestration and run tracking; the README also documents email alerting and governed storage access. The repository includes the Gold notebooks and their Silver inputs, but the ADF and ingestion notebook implementations were not sampled, so those links rely on README-level documentation.

Main entry points: [`04_Azure Data Factory Repository/pipeline/PL_MASTER.json`](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_MASTER.json) (Master Pipeline), [`05_Databricks_Repository/Gold`](https://github.com/databeli/caresync_azure_project/tree/main/05_Databricks_Repository/Gold) (Gold Reporting Tables), [`05_Databricks_Repository/Bronze_to_Silver.ipynb`](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Bronze_to_Silver.ipynb) (Silver Tables), [`04_Azure Data Factory Repository/pipeline/PL_SOURCE_TO_SILVER_MAIN.json`](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_SOURCE_TO_SILVER_MAIN.json) (Source-to-Silver Pipelines)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sources["Source Systems"]
  node_postgres[("Hospital PostgreSQL")]
  node_partner_csv["Partner CSV Feeds"]
end

subgraph group_orchestration["Ingestion &amp; Governance"]
  node_adf_master["Master Pipeline<br/>[PL_MASTER.json]"]
  node_adf_ingest["Source-to-Silver Pipelines"]
  node_control_tables[("Control &amp; Audit Tables")]
  node_adls[("Azure Data Lake<br/>[LS_ADLS.json]")]
  node_key_vault["Azure Key Vault"]
  node_email_pipeline["Email Notifications<br/>[PL_SEND_EMAIL.json]"]
end

subgraph group_transform["Databricks Transformations"]
  node_landing_bronze["Landing to Bronze"]
  node_bronze_silver["Bronze to Silver"]
  node_calendar["Calendar Dimension"]
  node_silver[("Silver Tables")]
end

subgraph group_consume["Gold &amp; Consumption"]
  node_patient360["Patient 360<br/>[NB_patient_360.py]"]
  node_hospital_summary["Hospital Daily Summary"]
  node_lab_trends["Lab Test Trends"]
  node_gold_tables[("Gold Reporting Tables")]
  node_dashboards["Databricks Dashboards"]
  node_genie["Genie Interfaces"]
end

node_logic_apps["Azure Logic Apps"]

node_adf_master -->|"reads metadata"| node_control_tables
node_adf_master -->|"orchestrates ingestion"| node_adf_ingest
node_adf_ingest -->|"ingests relational data"| node_postgres
node_adf_ingest -->|"ingests file feeds"| node_partner_csv
node_adf_ingest -->|"lands data"| node_adls
node_adf_master -->|"audits runs"| node_control_tables
node_adf_master -->|"triggers reporting"| node_email_pipeline
node_email_pipeline -->|"sends status email"| node_logic_apps
node_adf_master -.->|"uses credentials"| node_key_vault
node_landing_bronze -->|"reads landed data"| node_adls
node_landing_bronze -->|"feeds transformation"| node_bronze_silver
node_bronze_silver -->|"writes standardized data"| node_silver
node_calendar -->|"builds calendar dimension"| node_silver
node_patient360 -->|"reads Silver tables"| node_silver
node_hospital_summary -->|"reads lab, hospital, calendar"| node_silver
node_lab_trends -->|"reads lab and calendar"| node_silver
node_patient360 -->|"writes patient view"| node_gold_tables
node_hospital_summary -->|"writes daily summary"| node_gold_tables
node_lab_trends -->|"writes trend table"| node_gold_tables
node_gold_tables -->|"supports reporting"| node_dashboards
node_gold_tables -->|"supports queries"| node_genie

click node_postgres "https://github.com/databeli/caresync_azure_project/blob/main/01_Sources%20Data/01_postgres/create_source_tables.sql"
click node_partner_csv "https://github.com/databeli/caresync_azure_project/tree/main/01_Sources%20Data/02_adls_csv"
click node_adf_master "https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_MASTER.json"
click node_adf_ingest "https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_SOURCE_TO_SILVER_MAIN.json"
click node_control_tables "https://github.com/databeli/caresync_azure_project/blob/main/02_Metadata%20Table%20Queries/create_control_tables.sql"
click node_adls "https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/linkedService/LS_ADLS.json"
click node_key_vault "https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/linkedService/LS_AzureKeyVault.json"
click node_email_pipeline "https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_SEND_EMAIL.json"
click node_landing_bronze "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Landing_to_Bronze.ipynb"
click node_bronze_silver "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Bronze_to_Silver.ipynb"
click node_calendar "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Prepare%20calendar%20table.ipynb"
click node_silver "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Bronze_to_Silver.ipynb"
click node_patient360 "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Gold/NB_patient_360.py"
click node_hospital_summary "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Gold/NB_hospital_daily_summary.py"
click node_lab_trends "https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Gold/NB_lab_test_trends.py"
click node_gold_tables "https://github.com/databeli/caresync_azure_project/tree/main/05_Databricks_Repository/Gold"

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_postgres,node_partner_csv toneBlue
class node_adf_master,node_adf_ingest,node_control_tables,node_adls,node_key_vault,node_email_pipeline toneAmber
class node_landing_bronze,node_bronze_silver,node_calendar,node_silver toneMint
class node_patient360,node_hospital_summary,node_lab_trends,node_gold_tables,node_dashboards,node_genie toneRose
class node_logic_apps toneIndigo
```

## Components

### Source Systems

- [Hospital PostgreSQL](https://github.com/databeli/caresync_azure_project/blob/main/01_Sources%20Data/01_postgres/create_source_tables.sql): `01_Sources Data/01_postgres/create_source_tables.sql`
- [Partner CSV Feeds](https://github.com/databeli/caresync_azure_project/tree/main/01_Sources%20Data/02_adls_csv): `01_Sources Data/02_adls_csv`

### Ingestion & Governance

- [Master Pipeline](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_MASTER.json): `04_Azure Data Factory Repository/pipeline/PL_MASTER.json`
- [Source-to-Silver Pipelines](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_SOURCE_TO_SILVER_MAIN.json): `04_Azure Data Factory Repository/pipeline/PL_SOURCE_TO_SILVER_MAIN.json`
- [Control & Audit Tables](https://github.com/databeli/caresync_azure_project/blob/main/02_Metadata%20Table%20Queries/create_control_tables.sql): `02_Metadata Table Queries/create_control_tables.sql`
- [Azure Data Lake](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/linkedService/LS_ADLS.json): `04_Azure Data Factory Repository/linkedService/LS_ADLS.json`
- [Azure Key Vault](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/linkedService/LS_AzureKeyVault.json): `04_Azure Data Factory Repository/linkedService/LS_AzureKeyVault.json`
- [Email Notifications](https://github.com/databeli/caresync_azure_project/blob/main/04_Azure%20Data%20Factory%20Repository/pipeline/PL_SEND_EMAIL.json): `04_Azure Data Factory Repository/pipeline/PL_SEND_EMAIL.json`

### Databricks Transformations

- [Landing to Bronze](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Landing_to_Bronze.ipynb): `05_Databricks_Repository/Landing_to_Bronze.ipynb`
- [Bronze to Silver](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Bronze_to_Silver.ipynb): `05_Databricks_Repository/Bronze_to_Silver.ipynb`
- [Calendar Dimension](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Prepare%20calendar%20table.ipynb): `05_Databricks_Repository/Prepare calendar table.ipynb`
- [Silver Tables](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Bronze_to_Silver.ipynb): `05_Databricks_Repository/Bronze_to_Silver.ipynb`

### Gold & Consumption

- [Patient 360](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Gold/NB_patient_360.py): `05_Databricks_Repository/Gold/NB_patient_360.py`
- [Hospital Daily Summary](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Gold/NB_hospital_daily_summary.py): `05_Databricks_Repository/Gold/NB_hospital_daily_summary.py`
- [Lab Test Trends](https://github.com/databeli/caresync_azure_project/blob/main/05_Databricks_Repository/Gold/NB_lab_test_trends.py): `05_Databricks_Repository/Gold/NB_lab_test_trends.py`
- [Gold Reporting Tables](https://github.com/databeli/caresync_azure_project/tree/main/05_Databricks_Repository/Gold): `05_Databricks_Repository/Gold`
- **Databricks Dashboards**
- **Genie Interfaces**

### Other components

- **Azure Logic Apps**

## Connections

- Master Pipeline → Control & Audit Tables: reads metadata (evidence: `README.md`)
- Master Pipeline → Source-to-Silver Pipelines: orchestrates ingestion (evidence: `README.md`)
- Source-to-Silver Pipelines → Hospital PostgreSQL: ingests relational data (evidence: `README.md`)
- Source-to-Silver Pipelines → Partner CSV Feeds: ingests file feeds (evidence: `README.md`)
- Source-to-Silver Pipelines → Azure Data Lake: lands data (evidence: `README.md`)
- Master Pipeline → Control & Audit Tables: audits runs (evidence: `README.md`)
- Master Pipeline → Email Notifications: triggers reporting (evidence: `README.md`)
- Email Notifications → Azure Logic Apps: sends status email (evidence: `README.md`)
- Master Pipeline → Azure Key Vault: uses credentials (evidence: `README.md`)
- Landing to Bronze → Azure Data Lake: reads landed data (evidence: `README.md`)
- Landing to Bronze → Bronze to Silver: feeds transformation (evidence: `README.md`)
- Bronze to Silver → Silver Tables: writes standardized data (evidence: `README.md`)
- Calendar Dimension → Silver Tables: builds calendar dimension (evidence: `README.md`)
- Patient 360 → Silver Tables: reads Silver tables (evidence: `05_Databricks_Repository/Gold/NB_patient_360.py`)
- Hospital Daily Summary → Silver Tables: reads lab, hospital, calendar (evidence: `05_Databricks_Repository/Gold/NB_hospital_daily_summary.py`)
- Lab Test Trends → Silver Tables: reads lab and calendar (evidence: `05_Databricks_Repository/Gold/NB_lab_test_trends.py`)
- Patient 360 → Gold Reporting Tables: writes patient view (evidence: `05_Databricks_Repository/Gold/NB_patient_360.py`)
- Hospital Daily Summary → Gold Reporting Tables: writes daily summary (evidence: `05_Databricks_Repository/Gold/NB_hospital_daily_summary.py`)
- Lab Test Trends → Gold Reporting Tables: writes trend table (evidence: `05_Databricks_Repository/Gold/NB_lab_test_trends.py`)
- Gold Reporting Tables → Databricks Dashboards: supports reporting (evidence: `README.md`)
- Gold Reporting Tables → Genie Interfaces: supports queries (evidence: `README.md`)
