Hi DHIS2 Community,
I’m implementing a tracker program for project management, with three stages: Planning, Implementation, and Completion. Each tracked entity instance (TEI, e.g., project) passes through these stages in sequence.
Methodology:
- I use a shared data element “Progress Status” (option set: planned/ongoing/completed) assigned to each stage.
- At each stage, a program rule sets the Progress Status to the correct value.
- I want to count projects by their current/latest status, so that each project is counted only under its most advanced stage (not multiple times).
The Problem:
- When I use event-based program indicators, the same project is counted in every stage/event it has passed—so projects that reached “Completion” are counted as both “Planned”, “Ongoing”, and “Completed”.
- When I use enrollment-based indicators, referencing a stage-specific data element (e.g.,
#{StageUID.DataElementUID}) does not always reflect the most recent value. - I want to count only the latest status per TEI (e.g., if a project is completed, it should be counted only as completed, not also as ongoing or planned).
Tried Solutions:
- Assigning the same Progress Status data element to all stages, updating it with program rules.
- Referencing the data element from the latest stage in the indicator.
- Using both event and enrollment analytics types, but each results in either double-counting or missing the latest value.
Desired Result:
- Each project (TEI) should be counted only once, according to its current/latest status, regardless of how many stages it has completed.
Questions:
- What is the best practice for achieving “latest status only” counting in DHIS2 tracker programs?
- Should I use a Tracked Entity Attribute (TEA) for status and update it in every stage with program rules?
- Is there a built-in DHIS2 way to get the “latest event” value for a data element across all stages at the enrollment level?
- How do others solve this for project, case, or workflow tracking?
Any advice, best-practice metadata examples, or references to official documentation would be much appreciated!
Thanks in advance,
Gees