In Nigeria implementation of openmrs, we want to enforce that some forms filling follows a correct order. In the current state, when a patient dashboard is accessed, the data enter clerk can start entering record from any of the forms and this not right.
For example, list of our forms includes Childbirth Registration Detail Form, Child Follow up form etc. The correct thing to do is to fill Childbirth registration form first before the child follow up form and provide the childbirth details as lookup on the follow up form.
Preferably, as you are saving the childbirth registration form, you should be prompted to redirect to the next form.
Similar with what we have in the link below: Conditionally displaying Apps and Extensions but for encounter types.
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:
hasMemberWithProperty (encounterTypes, 'name', 'INITIAL ENCOUNTER')
hasMemberWithProperty (encounterTypes, 'uuid', 'uuid-for-the-encounter-type')
After this code has been merged, update the above wiki documentation by adding how one can conditionally show forms based on previous encounter types.
Just in case you are not aware of these pull request tips: https://wiki.openmrs.org/display/docs/Pull+Request+Tips