Need your assistance
Created a program rule to calculate the total hunger score from three (3) different DE (dropdown list). Namely: B3, B4 and B5
Each DE has three dropdown options, (Never, Sometimes and Often).
Where Never =0, Sometimes=1, and Often=2
Created DE called Total hunger score
Created 9 Program variables (B3_score0, B3_Score1, B3_Score2, same apply for B4 and B5
Created 9 Program rule for each program variable Condition: d2:hasValue(‘Screen_B3_score0’) && #{Screen_B3_score0} == 'Never ’ Assign “0” to it’s program variable. This process was repeated to all 8 variables with respective scores
Created another PR that sums up all the 9 Program Rule Variables Condition:d2:hasValue(#{B3}) && d2:hasValue(#{B4}) && d2:hasValue(#{B5}) Expression: #{B3_score0} +#{B3_score1} +#{B3_score2} + #{B4_score0} +#{B4_score1} +#{B4_score2} +#{B5_score0} +#{B5_score1} +#{B5_score2}
4(a). Assigned to DE in step 1
Can you check if this post helps you? It describes more or less what you wanted to achieve and I included a metadata.json file in case you want to import it.
Probably follow the recommendation from the @dhis2-tracker and fill a bug in JIRA. Unfortunately I didn’t have the time to test and report it myself. But considering that you already have the program I think you could even export a JSON of your program and attach it to the issue in JIRA.