← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Help needed: Show/hide previous DE entry based on a selection

 

Dear Jean, 
which version og DHIS are you using?

On 2.27 you can do this with program rules. 
- The easiest way would be to make a rule that triggers a "Display text" or "Display key/value pair" to the user in case the user answers Yes on the designated data field. These texts can be shown in the "Feedback" or "Program indicators" widgets, but not in the data entry form itself. 
- It would also be possible to make a rule that assigns the value from visit 1 into a data element of visit 2. What makes this option less desirable compared to the "Display key/value" or "Display text" option above is that the assign-strategy will create a duplication of the data from visit 1 into another data element in visit 2.

Based on how your data is modelled it might be possible to achieve on older versions of dhis2 using program indicators.

Markus

> 27. jun. 2017 kl. 05.52 skrev Mugisha, Jean F. <jm4283@xxxxxxxxxxxxxxxxx>:
> 
> Dear all,
>  
> We have the following use case and your advice would be greatly appreciated.
>  
> Our use-case needs to show/hide a previous DE entry based on a current Yes/No selection. Below are the few requirements that are needed:
>  
> 1st visit: User enters data.
> 2nd visit: User enters data.
> IF user selects Yes on a data element THEN a text box (message) should show up with the previous (in this case 1st visit) data element information (as a FYI message to the user).  
> IF user selects No on a data element THEN the FYI message is hidden.
>  
> We have created tracker program to get the data, but unfortunately, we have been unable to implement 2.a. in DHIS2. I am sure that we are missing something but I can’t seem to figure it out.
>  
> Any help would be greatly appreciated.
>  
> Regards,
> Jean
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs <https://launchpad.net/~dhis2-devs>
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx <mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~dhis2-devs <https://launchpad.net/~dhis2-devs>
> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>


References