How do I use age on skip logic on xforms

Hi everyone? I am using openmrs 2.2.1 and xforms 4.3.14.

I want to use skip logic with age i.e to skip some question when patient age<15 years old. From the form I can only see birthdate.

Add a new form field to the schema which has a patient getage functuon. Then let this turn into a numeric field on the form which you can use for that skip logic.

1 Like

Thanks for the idea. I have tried to implement but it does not seem to capture the age. I even try to display past observation with weight and failed. Maybe there are some settings I am missing. Attached are the settings I did just first to see if I capture the age.

Which openmrs platform version are you running?

openmrs 2.2.1 and xforms 4.3.14.