# nidanhis/nidan-docker architecture

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

- Interactive diagram: https://gitdiagram.com/nidanhis/nidan-docker
- Repository: https://github.com/nidanhis/nidan-docker
- Video tour (about a minute): https://gitdiagram.com/nidanhis/nidan-docker/video

## Overview

NidanEHR is a containerized hospital information system that brings clinical, laboratory, imaging, ERP, identity, and analytics services together behind an Nginx gateway. The main user workflow is browser access through the gateway to the relevant application; OpenMRS’s documented SPA/backend split serves clinical workflows. Superset adds cross-system reporting by connecting to OpenMRS, OpenELIS, and Odoo databases. The tree also documents DHIS2 mappings and extracts. Some subsystem wiring is inferred only from README descriptions; links without clear evidence are omitted.

Main entry points: [`proxy/nginx.conf`](https://github.com/nidanhis/nidan-docker/blob/main/proxy/nginx.conf) (Nginx gateway), [`superset/init_superset_metadata.py`](https://github.com/nidanhis/nidan-docker/blob/main/superset/init_superset_metadata.py) (Dataset and dashboard setup), [`openelis/volume`](https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume) (OpenELIS backend), [`openmrs`](https://github.com/nidanhis/nidan-docker/tree/main/openmrs) (OpenMRS API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and identity"]
  node_gateway["Nginx gateway<br/>[nginx.conf]"]
  node_keycloak["Keycloak identity<br/>[realm-export.json]"]
end

subgraph group_clinical["Clinical records"]
  node_openmrs_frontend["OpenMRS SPA"]
  node_openmrs_backend["OpenMRS API"]
  node_openmrs_db[("OpenMRS database")]
  node_openelis_frontend["OpenELIS frontend"]
  node_openelis_backend["OpenELIS backend"]
  node_openelis_fhir["OpenELIS FHIR"]
  node_orthanc["Orthanc PACS<br/>[orthanc.json]"]
end

subgraph group_operations["Hospital operations"]
  node_odoo["Odoo ERP"]
  node_odoo_db[("Odoo database")]
end

subgraph group_insights["Reporting and exchange"]
  node_superset["Superset analytics"]
  node_analytics_setup["Dataset and dashboard setup"]
  node_dhis2["DHIS2 exchange"]
end

node_user(("Hospital user"))
node_browser(("Browser"))

node_user -->|"uses"| node_browser
node_browser -->|"requests"| node_gateway
node_gateway -->|"routes"| node_openmrs_frontend
node_gateway -->|"routes API"| node_openmrs_backend
node_gateway -->|"routes"| node_openelis_frontend
node_gateway -->|"routes"| node_openelis_backend
node_gateway -->|"routes"| node_openelis_fhir
node_gateway -->|"routes"| node_orthanc
node_gateway -->|"routes"| node_odoo
node_gateway -->|"routes auth"| node_keycloak
node_gateway -->|"routes"| node_superset
node_openmrs_frontend -->|"calls API"| node_openmrs_backend
node_openmrs_backend -->|"reads and writes"| node_openmrs_db
node_openelis_frontend -->|"uses"| node_openelis_backend
node_openelis_backend -->|"exposes API"| node_openelis_fhir
node_odoo -->|"reads and writes"| node_odoo_db
node_analytics_setup -->|"configures"| node_superset
node_analytics_setup -->|"queries"| node_openmrs_db
node_analytics_setup -->|"queries"| node_odoo_db
node_analytics_setup -->|"queries"| node_openelis_backend

click node_gateway "https://github.com/nidanhis/nidan-docker/blob/main/proxy/nginx.conf"
click node_keycloak "https://github.com/nidanhis/nidan-docker/blob/main/keycloak/imports/realm-export.json"
click node_openmrs_frontend "https://github.com/nidanhis/nidan-docker/tree/main/openmrs/frontend"
click node_openmrs_backend "https://github.com/nidanhis/nidan-docker/tree/main/openmrs"
click node_openmrs_db "https://github.com/nidanhis/nidan-docker/tree/main/openmrs-db"
click node_openelis_frontend "https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume"
click node_openelis_backend "https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume"
click node_openelis_fhir "https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume"
click node_orthanc "https://github.com/nidanhis/nidan-docker/blob/main/orthanc/orthanc.json"
click node_odoo "https://github.com/nidanhis/nidan-docker/tree/main/odoo"
click node_odoo_db "https://github.com/nidanhis/nidan-docker/tree/main/odoo/db"
click node_superset "https://github.com/nidanhis/nidan-docker/tree/main/superset"
click node_analytics_setup "https://github.com/nidanhis/nidan-docker/blob/main/superset/init_superset_metadata.py"
click node_dhis2 "https://github.com/nidanhis/nidan-docker/tree/main/dhis2"

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_gateway,node_keycloak,node_user,node_browser toneBlue
class node_openmrs_frontend,node_openmrs_backend,node_openmrs_db,node_openelis_frontend,node_openelis_backend,node_openelis_fhir,node_orthanc toneAmber
class node_odoo,node_odoo_db toneMint
class node_superset,node_analytics_setup,node_dhis2 toneRose
```

## Components

### Access and identity

- [Nginx gateway](https://github.com/nidanhis/nidan-docker/blob/main/proxy/nginx.conf): `proxy/nginx.conf`
- [Keycloak identity](https://github.com/nidanhis/nidan-docker/blob/main/keycloak/imports/realm-export.json): `keycloak/imports/realm-export.json`

### Clinical records

- [OpenMRS SPA](https://github.com/nidanhis/nidan-docker/tree/main/openmrs/frontend): `openmrs/frontend`
- [OpenMRS API](https://github.com/nidanhis/nidan-docker/tree/main/openmrs): `openmrs`
- [OpenMRS database](https://github.com/nidanhis/nidan-docker/tree/main/openmrs-db): `openmrs-db`
- [OpenELIS frontend](https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume): `openelis/volume`
- [OpenELIS backend](https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume): `openelis/volume`
- [OpenELIS FHIR](https://github.com/nidanhis/nidan-docker/tree/main/openelis/volume): `openelis/volume`
- [Orthanc PACS](https://github.com/nidanhis/nidan-docker/blob/main/orthanc/orthanc.json): `orthanc/orthanc.json`

### Hospital operations

- [Odoo ERP](https://github.com/nidanhis/nidan-docker/tree/main/odoo): `odoo`
- [Odoo database](https://github.com/nidanhis/nidan-docker/tree/main/odoo/db): `odoo/db`

### Reporting and exchange

- [Superset analytics](https://github.com/nidanhis/nidan-docker/tree/main/superset): `superset`
- [Dataset and dashboard setup](https://github.com/nidanhis/nidan-docker/blob/main/superset/init_superset_metadata.py): `superset/init_superset_metadata.py`
- [DHIS2 exchange](https://github.com/nidanhis/nidan-docker/tree/main/dhis2): `dhis2`

### Other components

- **Hospital user**
- **Browser**

## Connections

- Hospital user → Browser: uses
- Browser → Nginx gateway: requests
- Nginx gateway → OpenMRS SPA: routes
- Nginx gateway → OpenMRS API: routes API
- Nginx gateway → OpenELIS frontend: routes
- Nginx gateway → OpenELIS backend: routes
- Nginx gateway → OpenELIS FHIR: routes
- Nginx gateway → Orthanc PACS: routes
- Nginx gateway → Odoo ERP: routes
- Nginx gateway → Keycloak identity: routes auth
- Nginx gateway → Superset analytics: routes
- OpenMRS SPA → OpenMRS API: calls API
- OpenMRS API → OpenMRS database: reads and writes
- OpenELIS frontend → OpenELIS backend: uses
- OpenELIS backend → OpenELIS FHIR: exposes API
- Odoo ERP → Odoo database: reads and writes
- Dataset and dashboard setup → Superset analytics: configures
- Dataset and dashboard setup → OpenMRS database: queries
- Dataset and dashboard setup → Odoo database: queries
- Dataset and dashboard setup → OpenELIS backend: queries
