Skip to main content
Docs/The architecture
On this page ⌄
Concept

The architecture

How reference components connect through the gateway to un-forked FHIR stores and analytics pipelines.

The end-to-end architecture​

OHS Player end-to-end architecture diagram showing Client App and Web Admin Portal reaching HAPI FHIR through Info Gateway with Keycloak authentication, FHIR Data Pipes streaming into PostgreSQL, and reference dashboards

The diagram illustrates three primary layers within the reference environment.

  • Client layer includes the multiplatform Frontline Client Application and the browser Web Admin Portal.
  • Backend services include Info Gateway with custom extension plugins, Keycloak for identity, and an un-forked HAPI FHIR server.
  • Analytics layer includes FHIR Data Pipes and PostgreSQL powering live Apache Superset dashboards.

Foundational building blocks​

Open Health Stack provides unbundled open source building blocks that can be imported independently into any digital health project.

The FHIR Foundations stack showing how Kotlin FHIR Data Capture and Kotlin FHIR Engine layer on top of Kotlin FHIRPath and Kotlin FHIR data model.

Foundational componentCapability providedConsumed by
kotlin-fhirType-safe FHIR data models and JSON serializationClient App
kotlin-fhirpathFHIRPath expression evaluation engineClient App
kotlin-fhir-engineOn-device SQLite persistence and syncClient App
kotlin-fhir-data-captureStructured Data Capture (SDC) questionnaire renderingClient App
Info GatewayAuthentication proxy and custom extension frameworkReference Backend
FHIR Data PipesSQL-on-FHIR extraction pipelines for analyticsReference Analytics

What the Player reference toolkit adds​

Reference componentWhat it adds
Player ClientRenders dynamic screens from declarative FHIR configuration
Configuration IGStandard FHIR implementation guide defining screen layouts and views
Reference BackendCustom gateway endpoints and role-based access rules
Reference AnalyticsSQL-on-FHIR view definitions, queries, and Superset dashboard definitions
Reference InfrastructureTurnkey Docker Compose topology linking all services

Gateway routing and security​

Neither client application connects directly to the underlying FHIR server. All network requests route through the Info Gateway reverse proxy.

  • Un-forked FHIR store allows swapping HAPI FHIR for any standard FHIR server without altering client applications.
  • Centralized access control validates OpenID Connect tokens from Keycloak and enforces role-based permissions at the gateway.
  • Decoupled administration enables custom web portals to manage users, locations, and care teams purely through gateway APIs.

How data flows​

  1. Frontline data entry occurs on mobile devices using Kotlin FHIR Engine for on-device SQLite storage and offline operation.
  2. Synchronization transmits FHIR resource bundles through the gateway to the central FHIR server upon network connectivity.
  3. Administrative management in the Web Admin Portal stores organisation, facility, and practitioner records directly as FHIR resources.
  4. Analytical transformation reads transactional FHIR resources and applies SQL-on-FHIR view definitions via FHIR Data Pipes, writing flattened relational tables into PostgreSQL.
  5. Reporting executes standard SQL queries against the analytical schema to populate dashboard metrics.

Where to go next​