How to get the value of a data element from the oldest event for a program stage

This might be a vague question but i was wondering if anyone has tried to get the value of a data element from the oldest event from a program stage using a program rule or program rule variable.

Thanks

1 Like

Hi there @paleu256,
Some have a baseline program stage, where the first value is collected. If this is the case, you can use the source type “Data element for the newest event for a program stage”, and selecting the first program stage.

Otherwise you would have to create a rule that stores the first value in a separate helper field when it is first entered.

You could also send us a jira ticket on jira.dhis2.org and describe your use case - and we can look into building either a function or source type to accomodate the use case.

Best regards,
Markus

1 Like