How openhie/openhim-mediator-timr-dhis2-tz works
This is an OpenHIM mediator synchronizing Tanzania Immunization Registry (TImR) data with DHIS2. The visible workflow starts at HTTP sync routes in index.js, which coordinate DHIS2 mapping, TImR warehouse queries, facility lookups, and data submission. Separate clients implement TImR API and OpenInfoMan access; the excerpts do not show how those clients are wired into the routes. Mapping files and age-group translation support the synchronization. The graph follows shown calls and requests; unsampled subsystem connections are omitted or marked unverified.
Main entry points: index.js HTTP sync routes · dhis2.js DHIS2 client · timr.js TImR API client · utils.js Request orchestration records
Components 20
Sync orchestration
- HTTP sync routes
index.js
External connectors
- Warehouse queries
middleware.js - TImR API client
timr.js - DHIS2 client
dhis2.js - FHIR facility lookup
fhir.js - OpenInfoMan lookup
openinfoman.js
Mapping and translation
- Age translation
mixin.js - Sync mappings
config - Terminology maps
terminologies
Operations
- Request orchestration records
utils.js - Email notifications
send_email.js - Process monitor
start.js
Other components
- Sync caller
- TImR PostgreSQL
- TImR service
- DHIS2 service
- FHIR server
- OpenInfoMan service
- MongoDB
- SMTP service
Connections 24
- Sync caller → HTTP sync routes: calls sync
- HTTP sync routes → Warehouse queries: queries data
index.js - HTTP sync routes → DHIS2 client: gets mappings
index.js - HTTP sync routes → FHIR facility lookup: looks up facilities
index.js - HTTP sync routes → Age translation: translates ages
index.js - Warehouse queries → TImR PostgreSQL: queries
middleware.js - TImR API client → TImR service: requests data
timr.js - DHIS2 client → DHIS2 service: reads and submits
dhis2.js - FHIR facility lookup → FHIR server: fetches facilities
fhir.js - OpenInfoMan lookup → OpenInfoMan service: requests facility data
openinfoman.js - DHIS2 client → Sync mappings: loads operations
dhis2.js - DHIS2 client → Terminology maps: uses concept maps
dhis2.js - TImR API client → Sync mappings: loads operations
timr.js - TImR API client → Terminology maps: uses concept maps
timr.js - DHIS2 client → Request orchestration records: builds records
dhis2.js - FHIR facility lookup → Request orchestration records: builds records
fhir.js - OpenInfoMan lookup → Request orchestration records: builds records
openinfoman.js - TImR API client → Request orchestration records: builds records
timr.js - Request orchestration records → Email notifications: alerts on empty response
utils.js - Process monitor → Email notifications: sends restart alerts
start.js - Email notifications → MongoDB: reads settings
send_email.js - Email notifications → SMTP service: sends mail
send_email.js - HTTP sync routes → TImR API client: may use client
- HTTP sync routes → OpenInfoMan lookup: may use lookup