GSoC 2026 Week 4: From fragile string matching to UID-based sync
Week 3 went well and actually a bit beyond the plan. Metadata sync is working, org units are cached, and I built a small debug screen to inspect what the d2 SDK is pulling down locally. That debug screen has already saved me twice from chasing phantom issues, like being able to see the raw metadata in the app is genuinely useful.
This week: mapping the Infant model to DHIS2
This is the part I knew would be fiddly. NeoRoo's Infant model has 22 attributes — things like birth weight, gestational age, admission date, caregiver details and right now the existing code maps them through if-else string matching on displayName. That means if someone renames an attribute on the DHIS2 server, the app silently drops that field. No error, no warning, just missing data.
This week I am replacing all of that with UID-based mapping. Every tracked entity attribute in DHIS2 has a stable UID that doesn't change even if the display name does. Once the mapping is keyed on UIDs pulled from the metadata sync we did last week, the whole thing becomes much more resilient.
The actual work is going through all 22 fields, finding their corresponding UIDs in the program metadata, and building a clean bidirectional mapper — Infant model to TrackedEntityInstance on push, and TrackedEntityInstance back to Infant model on pull.
A note on being ahead of schedule
The metadata sync landing cleanly last week means I have a bit of breathing room. If the infant push implementation lands before Friday, I may start on clinical event mapping — KMC sessions and vitals — before the week is out. That's technically week 5 territory as I planned but I would rather get ahead now than scramble later when the offline queue work starts.
More updates once the first real infant record flows through the bridge!
— Anurag (DevAnuragT)

