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

Tracker Android Capture program rules - Visit incrementation

$
0
0

Hi,

For a tracker program we had running on DIHIS2 Version 2.38 with older Android capture version (prior to version 3.0), whe were using a program rules variable and program rules to increment the visit number Data element for each new event in a repetition stage (Follow-up stage).

We were using the following program rule variables and data elements for the “Follow-Up stage” (repeatable):

Data Element = Test Visit Number

  • List item value Type = POSITIVE INTEGER, domain TRACKER)

Program Rule variable: = “Session Number Previous”

  • Source Type = Data element from previous event
  • Date element = Test Visit Number

Program rules:
"Assign Session number for first follow-up visit
Condition = !d2:hasValue(#{Session Number Previous})
Action = Assign Value “1” to DE “Test Visit Number”

Asign Session Number visit > 1
Condition = d2:hasValue(#{Session Number Previous})
Action Assign Value “#{Session Number Previous}+1” to DE “Test Visit Number”

The rule was working well previsously, but we are facing the errror message “There is a loop in your program rules, please contact ytour administrator”. on Android Capture 3.0.1.

On play, it seems to work ok for the first and second event in follow up stage. But for the third event, after changing the event date (in the past after the second event date), I have the “loop” error message, and the visit numer is random number.

If I close the event, and open it again the visit numer is back to 3 (expected value for third event).

We used to have the same program rule on 2.38 and never faced this issue.
Was there any change in the Android rule engine which could explain this behaviour?

I did set up a test program on Play to reproduce the issue, it is available here:
DHIS 2 Maintenance

I also add screenshot from Android Caputr Training 3.0.1

Thanks in advance for your help.


2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1903

Trending Articles