Hi all, I’m working on testing a server, and found for DV_PROPORTION a constraint for “is_integral” ends up in the OPT: https://github.com/ehrbase/ehrbase/blob/develop/tests/robot/_resources/test_data_sets/valid_templates/minimal/minimal_action_2.opt#L247-L273

By the spec, “is_integral” is a function, not a field, so that constraint looks strange there. Is that a bug of the modeling tools?

Looking at the spec definition for is_integral(), the description is a little confusing: “True if the `numerator`

and `denominator`

values are integers, i.e. if `precision`

is 0.”

For that to make sense, I think when ‘precision’ is mentioned, is the precision of each numerator and denominator, not the precision of the DV_PROPORTION. But if that’s referring to the DV_PROPORTION.precision, for that function definition, we need to consider numerator, denominator, precision, type and the validation rules, because are all related. The way I think that should be wirtten is:

if precision is 0, then numerator, denominator and type should be integer, integer, [fraction or integer fraction] to comply with the validation rules (I didn’t include ‘percentage’ because I think we could have values like 33.5%).

What do you think?

And everything is interlinked because of the validation rules:

`precision = 0 implies is_integral`

`is_integral implies (numerator.floor = numerator and denominator.floor = denominator)`

`(type = pk_fraction or type = pk_integer_fraction) implies is_integral`