# databricks-industry-solutions/care-manager architecture

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

- Interactive diagram: https://gitdiagram.com/databricks-industry-solutions/care-manager
- Repository: https://github.com/databricks-industry-solutions/care-manager

## Overview

Care Manager is a Databricks outpatient care-management app. A nurse manager opens a ranked worklist, reviews a patient’s risk and care gaps, uses AI-generated outreach guidance or patient messaging, then records the interaction; activity and panel views summarize outreach. The React client calls FastAPI routes, which coordinate patient data, per-user outreach state, and Foundation Model API features backed by Lakebase Postgres. The README also describes synthetic-data seeding and separate Genie and AI/BI analytics. Those analytics are documented capabilities; their runtime wiring is not shown in the sampled source.

Main entry points: [`frontend/src/api.ts`](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/api.ts) (API Client), [`frontend/src/App.tsx`](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/App.tsx) (App Navigation), [`server/routes/api.py`](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/routes/api.py) (HTTP Routes), [`server/store.py`](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/store.py) (Outreach State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Care Manager UI"]
  node_app_shell["App Navigation<br/>[App.tsx]"]
  node_worklist["Prioritized Worklist<br/>[Worklist.tsx]"]
  node_patient_detail["Patient Detail<br/>[PatientDetail.tsx]"]
  node_outreach_form["Outreach Logging<br/>[LogOutreach.tsx]"]
  node_activity_ui["Activity Feed<br/>[Activity.tsx]"]
  node_panel_ui["Population Panel<br/>[Panel.tsx]"]
  node_ask_ai["Patient Copilot<br/>[AskAI.tsx]"]
  node_api_client["API Client<br/>[api.ts]"]
end

subgraph group_service["Application API"]
  node_api_routes["HTTP Routes<br/>[api.py]"]
  node_auth_config["User Context<br/>[config.py]"]
end

subgraph group_data["Patient Data"]
  node_patient_data["Patient Queries<br/>[data.py]"]
  node_outreach_store["Outreach State<br/>[store.py]"]
  node_lakebase[("Lakebase Postgres")]
  node_db_pool["Database Pool<br/>[db.py]"]
end

subgraph group_ai["AI Outreach"]
  node_llm_features["AI Features<br/>[llm.py]"]
  node_model_api["Foundation Model API"]
end

subgraph group_analytics["Population Analytics"]
  node_data_generation["Synthetic Data Generation"]
  node_clinical_notes["Clinical Note Generation"]
  node_lakebase_seed["Lakebase Seeding<br/>[load_lakebase.py]"]
  node_genie["Genie Space"]
  node_bi_dashboard["AI/BI Dashboard"]
end

node_manager(("Care Manager"))

node_manager -->|"uses"| node_app_shell
node_app_shell -->|"routes to"| node_worklist
node_app_shell -->|"routes to"| node_patient_detail
node_app_shell -->|"routes to"| node_outreach_form
node_app_shell -->|"routes to"| node_activity_ui
node_app_shell -->|"routes to"| node_panel_ui
node_worklist -->|"requests data"| node_api_client
node_patient_detail -->|"requests data"| node_api_client
node_patient_detail -->|"renders"| node_ask_ai
node_ask_ai -->|"sends questions"| node_api_client
node_outreach_form -->|"submits log"| node_api_client
node_activity_ui -->|"requests activity"| node_api_client
node_panel_ui -->|"requests metrics"| node_api_client
node_api_client -->|"calls endpoints"| node_api_routes
node_api_routes -->|"resolves user"| node_auth_config
node_api_routes -->|"requests patient data"| node_patient_data
node_api_routes -->|"manages outreach"| node_outreach_store
node_api_routes -->|"requests AI features"| node_llm_features
node_patient_data -->|"queries"| node_db_pool
node_patient_data -->|"loads user state"| node_outreach_store
node_outreach_store -->|"persists state"| node_db_pool
node_db_pool -->|"connects"| node_lakebase
node_llm_features -->|"caches drafts"| node_outreach_store
node_llm_features -->|"generates responses"| node_model_api
node_data_generation -.->|"provides seed data"| node_lakebase_seed
node_clinical_notes -.->|"provides generated notes"| node_lakebase_seed
node_lakebase_seed -->|"loads dataset"| node_lakebase
node_genie -.->|"shares population data"| node_lakebase
node_bi_dashboard -.->|"shares population data"| node_lakebase

click node_app_shell "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/App.tsx"
click node_worklist "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/Worklist.tsx"
click node_patient_detail "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/PatientDetail.tsx"
click node_outreach_form "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/LogOutreach.tsx"
click node_activity_ui "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/Activity.tsx"
click node_panel_ui "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/Panel.tsx"
click node_ask_ai "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/components/AskAI.tsx"
click node_api_client "https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/api.ts"
click node_api_routes "https://github.com/databricks-industry-solutions/care-manager/blob/main/server/routes/api.py"
click node_auth_config "https://github.com/databricks-industry-solutions/care-manager/blob/main/server/config.py"
click node_patient_data "https://github.com/databricks-industry-solutions/care-manager/blob/main/server/data.py"
click node_outreach_store "https://github.com/databricks-industry-solutions/care-manager/blob/main/server/store.py"
click node_db_pool "https://github.com/databricks-industry-solutions/care-manager/blob/main/server/db.py"
click node_llm_features "https://github.com/databricks-industry-solutions/care-manager/blob/main/server/llm.py"
click node_data_generation "https://github.com/databricks-industry-solutions/care-manager/blob/main/scripts/generate_hls_provider.py"
click node_clinical_notes "https://github.com/databricks-industry-solutions/care-manager/blob/main/scripts/generate_clinical_notes.py"
click node_lakebase_seed "https://github.com/databricks-industry-solutions/care-manager/blob/main/scripts/load_lakebase.py"
click node_genie "https://github.com/databricks-industry-solutions/care-manager/blob/main/analytics/genie_population_health.json"
click node_bi_dashboard "https://github.com/databricks-industry-solutions/care-manager/blob/main/analytics/dashboard_population_health.json"

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_app_shell,node_worklist,node_patient_detail,node_outreach_form,node_activity_ui,node_panel_ui,node_ask_ai,node_api_client toneBlue
class node_api_routes,node_auth_config toneAmber
class node_patient_data,node_outreach_store,node_lakebase,node_db_pool toneMint
class node_llm_features,node_model_api toneRose
class node_data_generation,node_clinical_notes,node_lakebase_seed,node_genie,node_bi_dashboard,node_manager toneIndigo
```

## Components

### Care Manager UI

- [App Navigation](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Prioritized Worklist](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/Worklist.tsx): `frontend/src/screens/Worklist.tsx`
- [Patient Detail](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/PatientDetail.tsx): `frontend/src/screens/PatientDetail.tsx`
- [Outreach Logging](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/LogOutreach.tsx): `frontend/src/screens/LogOutreach.tsx`
- [Activity Feed](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/Activity.tsx): `frontend/src/screens/Activity.tsx`
- [Population Panel](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/screens/Panel.tsx): `frontend/src/screens/Panel.tsx`
- [Patient Copilot](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/components/AskAI.tsx): `frontend/src/components/AskAI.tsx`
- [API Client](https://github.com/databricks-industry-solutions/care-manager/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### Application API

- [HTTP Routes](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/routes/api.py): `server/routes/api.py`
- [User Context](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/config.py): `server/config.py`

### Patient Data

- [Patient Queries](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/data.py): `server/data.py`
- [Outreach State](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/store.py): `server/store.py`
- **Lakebase Postgres**
- [Database Pool](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/db.py): `server/db.py`

### AI Outreach

- [AI Features](https://github.com/databricks-industry-solutions/care-manager/blob/main/server/llm.py): `server/llm.py`
- **Foundation Model API**

### Population Analytics

- [Synthetic Data Generation](https://github.com/databricks-industry-solutions/care-manager/blob/main/scripts/generate_hls_provider.py): `scripts/generate_hls_provider.py`
- [Clinical Note Generation](https://github.com/databricks-industry-solutions/care-manager/blob/main/scripts/generate_clinical_notes.py): `scripts/generate_clinical_notes.py`
- [Lakebase Seeding](https://github.com/databricks-industry-solutions/care-manager/blob/main/scripts/load_lakebase.py): `scripts/load_lakebase.py`
- [Genie Space](https://github.com/databricks-industry-solutions/care-manager/blob/main/analytics/genie_population_health.json): `analytics/genie_population_health.json`
- [AI/BI Dashboard](https://github.com/databricks-industry-solutions/care-manager/blob/main/analytics/dashboard_population_health.json): `analytics/dashboard_population_health.json`

### Other components

- **Care Manager**

## Connections

- Care Manager → App Navigation: uses (evidence: `README.md`)
- App Navigation → Prioritized Worklist: routes to (evidence: `frontend/src/App.tsx`)
- App Navigation → Patient Detail: routes to (evidence: `frontend/src/App.tsx`)
- App Navigation → Outreach Logging: routes to (evidence: `frontend/src/App.tsx`)
- App Navigation → Activity Feed: routes to (evidence: `frontend/src/App.tsx`)
- App Navigation → Population Panel: routes to (evidence: `frontend/src/App.tsx`)
- Prioritized Worklist → API Client: requests data (evidence: `frontend/src/screens/Worklist.tsx`)
- Patient Detail → API Client: requests data (evidence: `frontend/src/screens/PatientDetail.tsx`)
- Patient Detail → Patient Copilot: renders (evidence: `frontend/src/screens/PatientDetail.tsx`)
- Patient Copilot → API Client: sends questions (evidence: `frontend/src/components/AskAI.tsx`)
- Outreach Logging → API Client: submits log (evidence: `frontend/src/screens/LogOutreach.tsx`)
- Activity Feed → API Client: requests activity (evidence: `frontend/src/screens/Activity.tsx`)
- Population Panel → API Client: requests metrics (evidence: `frontend/src/screens/Panel.tsx`)
- API Client → HTTP Routes: calls endpoints (evidence: `README.md`)
- HTTP Routes → User Context: resolves user (evidence: `server/routes/api.py`)
- HTTP Routes → Patient Queries: requests patient data (evidence: `server/routes/api.py`)
- HTTP Routes → Outreach State: manages outreach (evidence: `server/routes/api.py`)
- HTTP Routes → AI Features: requests AI features (evidence: `server/routes/api.py`)
- Patient Queries → Database Pool: queries (evidence: `server/data.py`)
- Patient Queries → Outreach State: loads user state (evidence: `server/data.py`)
- Outreach State → Database Pool: persists state (evidence: `server/store.py`)
- Database Pool → Lakebase Postgres: connects (evidence: `server/db.py`)
- AI Features → Outreach State: caches drafts (evidence: `server/llm.py`)
- AI Features → Foundation Model API: generates responses (evidence: `README.md`)
- Synthetic Data Generation → Lakebase Seeding: provides seed data
- Clinical Note Generation → Lakebase Seeding: provides generated notes
- Lakebase Seeding → Lakebase Postgres: loads dataset (evidence: `README.md`)
- Genie Space → Lakebase Postgres: shares population data (evidence: `README.md`)
- AI/BI Dashboard → Lakebase Postgres: shares population data (evidence: `README.md`)
