GSoC 2026 Week 5: Infant push is done — now pulling data and mapping clinical events
Week 4 delivered the most satisfying milestone so far. End-to-end infant push is working through the d2 SDK tracker module. All 22 Dart model attributes are being mapped into the DHIS2 tracker payload format correctly, and I wrote Dart unit tests for InfantSyncHelper to verify payload integrity before anything hits the platform channel. Catching mapping errors at the unit test level rather than on a live server is exactly the kind of safety net this project needs.
This week: making sync bidirectional
Right now the bridge can push records up. This week I am adding pullTrackedEntity so it can read tracker records back from the local d2 database. That completes the bidirectional loop and infant data can flow up to DHIS2 and back down into the app.
In parallel I am mapping clinical data elements for vitals and KMC sessions to DHIS2 program stage events using EventMapper.kt. This is the piece that makes the sync medically meaningful. It is not just demographic data anymore, it is actual clinical events like Kangaroo Mother Care sessions and vitals readings flowing through the same bridge.
I am also introducing native JUnit tests for EventMapperTest and InfantMapperTest on the Android side. These run without needing an emulator or network connection, which makes them fast and reliable in CI.
How DHIS2 tracker data actually works
Worth a quick explanation since this structure shapes every decision in the sync layer.
DHIS2 organises tracker data in three layers. At the top is the Tracked Entity Instance, which in NeoRoo's case is the infant. Each infant is then enrolled into a program containing all the rules and data elements for that clinical pathway. Within that enrollment, individual clinical interactions are stored as Events tied to specific program stages. A KMC session is one event, a vitals reading is another.
NeoRoo's Dart models map onto this hierarchy like this: the Infant model becomes a TEI with 22 tracked entity attributes. The care pathway becomes an enrollment. Each KMCSession and vitals entry becomes an event under its corresponding program stage.
Getting this mapping right is what makes the data readable to any other DHIS2 tool or dashboard, not just NeoRoo. That interoperability is the whole point of using DHIS2 in the first place.
More updates once pull is working end to end!
— Anurag (DevAnuragT)
