← Back to team overview

dhis2-users team mailing list archive

Re: Program rules - Hide program stages


Dear Lise,
thanks for the feedback :)

I think we might get this to work the way you want by an update of the rules. All the rules are executed on every stage. However, when the rules are using program rule variables that has source type "Data element in current event", then these variables will look different based on which event you have currently selected. I suspect this is the key to achieving the behavior you want here. If you make sure that the rule for hiding/unhiding the program stage is based on variables that uses source type "Data element in the newest event in program", it might behave the way you want. This makes the rule behave the same way across all the program stages.

Are you on 2.27, you have full access to view and change the program rule variables in the maintenance app. In 2.26 and earlier you can unfortunately not see and change this in the UI. You can either make a new source field, or change the existing ones in the database or through the API. Let me know if I can assist you further in this.


> 24. jul. 2017 kl. 08.43 skrev GROUT, Lise <groutl@xxxxxxx>:
> Dear DHIS2 team, 
> We use the program rule “hide program stages” for one of our tracker. Depending on the clinical suspicion in stage 1, several disease-specific stages are “unhidden” (stage 2, stage 3, stage4). We are very happy this has been implemented in 2.26. 
> Would it be possible to improve it a little bit? 
> Currently, if I have just completed the stage 2 and I want to “add” stage 3 to continue entering data, stage 3 et stage 4 do not show up, unless I click back on the stage 1 (where we have the program rule). Would it be difficult to allow for adding stage 3 and stage 4 from whichever stage as soon as the program rule in stage 1 is verified?
> Not sure if I make sense…
> Best
> Lise.
> Dr. Lise Grout
> Epidemiologist
> World Health Organization
> Department of Neglected Tropical Diseases (HTM/NTD/IDM)
> Innovative and Intensified Disease Management Unit
> 20, Avenue Appia; CH-1211 Geneva 27
> Tel. +41 22 791 2341
> Mobile +41 79 290 68 61
> Skype: tigrouveto
> http://www.who.int/neglected_diseases <http://www.who.int/neglected_diseases>