Manage Forms: Using Show If to make Visit specific forms available only during the specified Visit Type

Hi all,

I am trying to configure an ANC Form to be displayed on the Patient Dashboard - Current Visit Actions only if the selected visit type is ANC.

So far I have tried setting the Show If configuration as follows but no luck in all these cases. Could anyone please help shed some light here?

visit.type=='0f8ed9ac-f40c-476c-a120-17e8113b2744'
visit.uuid:0f8ed9ac-f40c-476c-a120-17e8113b2744
visit.uuid=='0f8ed9ac-f40c-476c-a120-17e8113b2744'

Am using Reference Application Vs 2.9.0

Thanks.

Did you post a duplicate of this? Add a form to UI using Manage Form under configure metadata

The other one was a reply on another thread. Unfortunately it’s the one that got responses.

Can you share the answer here?

From the discussions below it was concluded that Show If does not support visit types (at least not yet) but, as a workaround one could use the Login location feature in the Reference Application.

According to Senkomago @ssmusoke

" I do not think VisitType is supported within the configurations, I am only aware of locations at this point which is what we use."

See this thread Displaying HTML entry forms based on login session in reference application

So I think that sheds some light, for example you can create some “child” login locations for the different visit areas for example MCH Clinic and then display only MCH forms for people logging in to that location.

Senkomago makes it clear here:

The UgandaEMR ANC form display is https://github.com/METS-Programme/openmrs-module-aijar/blob/master/omod/src/main/webapp/resources/htmlforms/071-IntegratedAntenatalRegister.xml#L10

The location e9bc61b5-69ff-414b-9cf0-0c22d6dfca2b is the MCH Clinic

You can look at the demo:

url: http://bit.ly/ugandaemr-demo Username: manager Password: Manager123