Digital Health Architecture for SMART Guidelines
Overview
┌──────────────────────────── Point of service ────────────────────────────┐
│ Pregnancy app (mothers) Health-worker app (FCHV / ANM) Call centre │
└───────────────┬───────────────────────────┬──────────────────────────────┘
│ FHIR R5 (JSON, REST) │
┌───────────────▼───────────────────────────▼──────────────────────────────┐
│ Integration layer — auth, routing, transformation, audit │
└───────────────┬───────────────────────────┬──────────────────────────────┘
│ │
┌───────────────▼─────────────┐ ┌─────────▼──────────────────────────────┐
│ HAPI FHIR server (R5) │ │ Terminology │
│ api.amakomaya.com/fhir │◀─▶│ CodeSystem / ValueSet / ConceptMap │
│ validated against the │ │ $expand · $validate-code · $translate │
│ Amakomaya Nepal FHIR IG │ │ National HMIS terminology (OCL) │
└───────────────┬─────────────┘ └─────────────────────────────────────────┘
│ aggregate / tracker mapping
┌───────────────▼──────────────────────────────────────────────────────────┐
│ DHIS2 · national HMIS — indicators and reporting │
└──────────────────────────────────────────────────────────────────────────┘
FHIR implementation guide
Our IG sits alongside Nepal's national specification, the Nepal HMIS FHIR
Implementation Guide (draft, FHIR R5) published under MoHP's integrated HMIS
work at fhir.hmis.gov.np. Because both target R5,
alignment between them is practical. The R4 and R4B packages help integrators
whose systems still run R4. The national guide's source is kept in the IHIMS
GitHub organisation as ihims/fhir-ig
(package hl7.fhir.hmis, version 0.0.1-ballot, canonical
https://fhir.hmis.gov.np), forked from Amakomaya's
ig-dhis2ehmis repository. See
HL7 FHIR in Nepal for the national guide and
national open-source repositories
below.
HAPI FHIR infrastructure and APIs
Read the capability statement before anything else. It is public, while all clinical data requires credentials issued per integration:
curl -H "Accept: application/fhir+json" \
https://api.amakomaya.com/fhir/metadata
The IG's API usage guide recommends conditional create, so the same person is never registered twice:
POST /fhir/Person?identifier=https://api.amakomaya.com/NamingSystem/nepal-telecom-subscriber|98XXXXXXXX
Content-Type: application/fhir+json
Authorization: <issued per integration>
Expand a value set, for example to fill a vaccine picker from the IG's SNOMED CT vaccine value set:
GET /fhir/ValueSet/$expand?url=<canonical URL of the vaccine value set>
Identity
Guideline logic depends on knowing whose record it is evaluating. The IG
defines NamingSystems for the Nepal Health ID, National Identity Number,
Nepal Health Facility Registry ID, municipal identifiers (for example the
Tokha Municipality Basic Health Services ID), counselling-service IDs and
telecom subscriber numbers. A master Person record ties a person's
identifiers together. On the DHIS2 side, the
ID Registry Enrollment plugin
connects tracker enrolment to a FHIR Person registry. Background:
FHIR identifiers.
Terminology services and Open Concept Lab
Codes must mean the same thing in the app, the FHIR server and the HMIS report.
- FHIR terminology on the HAPI server: Nepal code systems such as administrative locations (province, district, local body); value sets bound to SNOMED CT (vaccines, dietary supplements); and concept maps such as HL7 administrative gender → SNOMED CT.
- International code systems: SNOMED CT, LOINC and ICD, as bound in the IG.
- Open Concept Lab (OCL): Nepal's national HMIS terminology and indicator definitions are published on OCL under the IHIMS organisation. Amakomaya's HMIS OCL integration keeps data definitions consistent between HMIS, DHIS2 and national reporting.
DHIS2 and HMIS integration
For SMART Guidelines work, DAK indicators are the bridge to DHIS2. An indicator defined once (numerator, denominator, disaggregation) should give the same number whether it is computed from FHIR data or reported through DHIS2. In our experience, aggregate DHIS2 data elements do not map cleanly onto FHIR resources. The useful mapping is at tracker level, done by an integration engine rather than inside either system (see the FHIR case study).
The first such mapping is published for immunization. The
DHIS2 FHIR adapter takes FHIR
Immunization resources coded with SNOMED CT vaccines, uses FHIRPath
expressions to select the vaccine code, date and patient, and writes them as
DHIS2 Tracker events. A FHIR Patient becomes a tracked entity instance (name,
gender, date of birth and identifiers as attributes):
Immunization.vaccineCode.coding.where(system='http://snomed.info/sct').code
National open-source repositories (IHIMS)
The Integrated Health Information Management Section (IHIMS) of MoHP keeps the software for the national HMIS in its GitHub organisation, github.com/ihims. Most repositories are forks of Amakomaya repositories or of upstream DHIS2. Mapped to the SMART Guidelines layers, they form the national L3 and L4 stack:
| SMART layer | Repository | Role |
|---|---|---|
| L3 — machine-readable | fhir-ig | Source of the Nepal HMIS FHIR Implementation Guide (FHIR R5, draft 0.0.1-ballot) |
| L4 — interoperability | dhis2-fhir-adapter | FHIR Immunization → DHIS2 Tracker mapping (SNOMED CT, FHIRPath) |
| L4 — identity | ID-Registry-Enrollment-Plugin-using-FHIR-Person | DHIS2 plugin for enrolment against a FHIR Person registry |
| L4 — point of service | capture-app · dhis2-android-capture-app | DHIS2 web capture app (Amakomaya version) and Android capture app for facility and field data entry |
| L4 — client records | service-card-plugin · hmis-report-builder | Printable health service card with QR code (OPD, family planning, reproductive health) and the eCard builder |
| L4 — reporting | line-listing-app · data-exchange-app | DHIS2 line lists and aggregate data exchange for HMIS reporting |
| L4 — platform | dhis2-core | Fork of DHIS2 core (service layer and Web API) |
| Governance | dhis2ehmis-health-toolkit | Configuration as code: system settings, branding and reviewed metadata, changed only through pull requests with HMIS owner approval |
| Documentation | hmis-docs | HMIS guides, manuals and technical references (ihims.github.io/hmis-docs) |
The configuration toolkit matters for SMART Guidelines work beyond its own content. It keeps DHIS2 metadata — the data elements and indicators an adapted DAK feeds — under review and version control, which is what component 7 (indicators) needs to stay consistent between FHIR and DHIS2.
Related
- FHIR Platform: environments and the v6 upgrade
- Digital health architecture for Nepal: the national reference architecture
- OpenHIE: the architecture pattern behind the integration layer
Sources
- Amakomaya. Amakomaya Nepal FHIR Implementation Guide, v1.0.1 and v2.0.0. fhir.amakomaya.com · fhir.amakomaya.com/v6
- Amakomaya. FHIR API capability statement.
https://api.amakomaya.com/fhir/metadata - Ministry of Health and Population, Nepal. Nepal HMIS FHIR Implementation Guide (draft). fhir.hmis.gov.np
- Open Concept Lab. Nepal HMIS (IHIMS) organisation. ocl.hmis.gov.np
- HL7 International. FHIR R5. hl7.org/fhir/R5
- Integrated Health Information Management Section, MoHP. IHIMS GitHub organisation. github.com/ihims