Repeatable Android Event Capture Error with Program Indicator

Good morning mobile team and other interested parties!

I have been able to replicate this error using the latest version of the Android mobile capture app and version 2.21 of DHIS2.

This is a real use case that needs to be resolved by the end of next week if we are to use calculated indicators in the field.

Mobile teams are optionally taking some patient measurements during the capture of an unregistered event … including weight and height. We want a simple BMI indicator to display.

The two fields height and weight are of type ‘NUMBER’. If we don’t have any program indicators on a simple test section, just weight and height, then we can capture values

image

If we go and create a BMI program indicator and add it to the section … and go back to the existing ‘encounter’ … a BMI field appears and displays the correct value.

image

As SOON as you try to change one of the values (weight or height), the App crashes. If it is a new encounter, and you try to add a value with a decimal, it crashes.

image

It seems to be a problem with how the ‘expression’ is handled for NUMBERS that include decimals (it doesn’t crash if you enter just integer weights and heights into the fields, but in this case doesn’t show the correct BMI value either).

The system information in the error report is:

image

Happy to provide a login if you want to troubleshoot the apparent bug. (I tested this on a whole fresh server install yesterday just to be sure it was repeatable).

Regards

David Hagan