How mekomsolutions/ozone-distro-cambodia works
Project type and purpose
• This is a multi-module Maven “assembler” project that bundles:
– An OpenMRS distribution (EMR) pre-configured for NCD/Cervical Cancer screening.
– A Superset analytics/reporting platform pre-loaded with dashboards, charts, datasets.
– Docker-compose files for backing up data and redirecting reports.
• In short, it’s a healthcare information system distribution (“Ozone Kh”) combining a web-based EMR + analytics.
File structure
• Top-level modules:
– base/ — common assembly rules, OpenMRS initializer configurations, Superset assets (charts/dashboards/datasets), shared POM.
– prod/ — production assembly overrides.
– scripts/ — wrappers, build scripts, Docker-Compose files.
• base/configs/openmrs/initializer_config — CSV/XML definitions of concepts, encounter types, forms, roles, location hierarchy, etc.
• base/configs/superset/assets — the YAML definitions for charts, dashboards, datasets pre-packed into Superset.
• Assembly descriptors (assembly.xml) in each module define how to produce ZIP/TAR distributions.
• pom.xml hierarchy (root + sub-modules) orchestrates multi-module build.
• .github/workflows + .gitpod.yml + .ocd3.yml handle CI checks, dependency validation, cloud IDE support.
README for additional insights
• Purpose: “download and package all the software artefacts that make Ozone for Cambodia.”
• Two runtime environments: OpenMRS SPA login (frontend) and Superset (analytics).
a. Main components:
1. Developer & CI/CD pipeline:
• GitHub repo → GitHub Actions (.github/workflows)
• Maven multi-module build → artifacts (ZIP/TAR)
• Optional publishing to Nexus/public repo
2. Runtime orchestration:
• Docker-Compose orchestration (OpenMRS + DB + Superset + Analytics DB + Redis? as needed)
3. OpenMRS EMR service:
• Tomcat (or embedded container) hosting the Ozone Kh frontend SPA and REST back-end
• Connected to primary relational database (PostgreSQL/MySQL) with initializer data
4. Superset analytics service:
• Flask-based Superset web server
• Metadata DB (PostgreSQL) for user/dashboards
• Analytics DB (could be same or separate PostgreSQL) containing clinical data exported from OpenMRS
5. Configuration & initializer:
• CSV/XML loader that imports concepts, forms, global properties, roles, locations into the EMR DB at startup
• Superset import scripts that load YAML assets into the Superset service at startup
b. Relationships and interactions:
– CI triggers Maven build → produces two distribution bundles (base + prod)
– Ops runs docker-compose-reports-redirect.yml + backup.docker-compose.yml to start services
– On OpenMRS startup, initializer reads base/configs/openmrs/initializer_config → populates DB
– Users interact with the OpenMRS SPA via browser → CRUD patient data
– ETL or direct BI views expose the OpenMRS clinical DB to Superset analytics DB (could be via views or periodic dump)
– Superset connects to analytics DB → users view dashboards and charts loaded from base/configs/superset/assets
c. Architectural patterns & design principles:
– Multi-module Maven for modular builds and dependency isolation
– Separation of concerns: EMR vs. analytics
– Infrastructure as code: Docker-Compose for local/dev setups and scripts for production overrides
– Convention over configuration: assembly.xml descriptors + folder layout
– Idempotent configuration: initializer config files drive reproducible DB setup
d. Key technologies & frameworks:
– Build: Maven, Groovy scripts (build-openmrs-frontend.groovy), GitHub Actions
– Backend: OpenMRS (Java/Spring on Tomcat), CSV/XML Initializer Module
– Frontend: Single Page App (Ozone SPA, React-based ESM modules)
– Analytics: Apache Superset (Python/Flask)
– Data stores: PostgreSQL (or MySQL), possibly Redis or other caches
– Containerization: Docker-Compose, docker files in scripts/
Detail is key
– Show external dependencies (Nexus, public repo) if relevant to the deployment.
– Don’t overthink—simply break the project into: Build pipeline, Deployment orchestration, EMR service + initializer, Analytics service, Data stores, and User UIs.