In our openmrs implementation, we have three major programs (PMTCT, ART and HTS). Each of the these programs has forms that relate to them. We want a situation where patient is enrolled on a particular program, and only forms that relate to the program should be displayed.
Similar with what we have in the link below: Conditionally displaying Apps and Extensions but for program areas.
You can put a blank line after this one: https://github.com/openmrs/openmrs-module-coreapps/blob/master/omod/src/main/java/org/openmrs/module/coreapps/page/controller/clinicianfacing/PatientPageController.java#L96
Then put code like below:
Remember to put another blank line after this code.
Then one should be able to for instance configure a form for patients on the ART program with the show if condition below:
After this code has been merged, update the above wiki documentation by adding how one can conditionally show forms based on patient program enrolment.
Just in case you are not aware of these pull request tips: https://wiki.openmrs.org/display/docs/Pull+Request+Tips