← Back to team overview

dhis2-devs team mailing list archive

[Bug 745473] Re: validation-rules-NULL-operands

 

This is not really a bug but yes its a tricky issue. DHIS by default
does not store zero values, this has some disadvantages like the the one
mentioned here, but also the big advantage that it reduces overall
database size by approx 70 %. This however is completely configurable
and if you want to save the zero values you can set all data elements to
"store significant zeros".

Regarding validation rules: in some cases it will make sense to treat
missing values as zero, like Suzuki points out above. If the user has
actually entered an (ignored) zero value, the validation rule should
report a violation. On the other hand, if the data is missing I don't
think it makes sense to report a violation as we simply don't know the
underlying situation.

So there are advantages about treating missing values as zeros, but
there are also disadvantages. First, consider when doing a "bulk"
validation of for instance a province for many months. In this case
there are typically large gaps in the data - many facilities have not
reported since they do not provide certain services, they haven't
bothered to enter, they had technical problems or whatever. In this case
the resulting list of violations would be "spammed" and rendered
effectively unusable - there would be thousands of violations as a
result of missing data since most validation rules are on the form A < B
and if there is no data this would return a violation.

Second, when doing validation directly in data entry forms, for the
usual, very large "integrated form" there are typically several sections
within that form which don't apply to all facilities. The validation
rules dealing with those irrelevant sections would then return
violations as there would be no data and potentially cause confusion for
users.

So there are benefits and drawbacks on both sides. This issue maybe
qualifies for an option - when doing "bulk" validation the user can
select whether to treat missing values as zeros or not (?).

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/745473

Title:
  validation-rules-NULL-operands

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  I defined a validation rule.. RDT positive cases <= RDT tested cases.
  When the user enters a zero or a blank for the RHS and a value for the
  LHS, the validation rule is passed, which in fact should not be the
  case. Setting the data elements to "Store significant zeroes" solves
  the problem when users enter a zero for the RHS, but it does not solve
  the problem when they leave the field blank.

  I think one possible fix would be that if the value is NULL then it
  should be treated as a zero. This seems to be more or less the
  behaviour elsewhere in DHIS 2.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/745473/+subscriptions


Follow ups

References