Quantcast
Channel: DHIS2 Community - Latest topics
Viewing all articles
Browse latest Browse all 1519

Program Rules with V{enrollment_date} and V{event_date} return undefined

$
0
0

Hi

Recently I came to a situation where I’m creating a Program Rule to check the if the patient date_of_birth happens before the registration date on Tracker.
The Program Rule condition is something like these:

1- with V{enrollment_date}
d2:daysBetween(A{date_of_birth}, V{enrollment_date}) < 0
And in the action is Show warning with the value of V{enrollment_date} on a tracked entity attribute, and the result is as follows
Screenshot from 2024-08-22 10-57-07

2- With V{event_date}
d2:daysBetween(A{date_of_birth}, V{event_date}) < 0
And in the action is Show warning with the value of V{event_date} on a tracked entity attribute, and the result is as follows
Screenshot from 2024-08-22 11-06-20

This happens during the enrollment stage of the Tracker Program
Is there a reason why the Built In Variables are returning undefined values?

Is there any other alternative to check if the patient date of birth happens before the registration date in Tracker Program?

This was verified using DHIS2 versions 2.37.9, 2.39.5, 2.39.6

Best regards

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1519

Trending Articles