dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #49258
Event data values are stored with option code which is not unique
Hello DHIS Devs,
In DHIS, event capture app while registering an event, we have noticed that the event dataValues (for the dataElements with optionSet) are posted with the selected option code. Similarly, in the event list the event data values are mapped with the option code to show the selected option.
We see a small problem with this approach, since, option code in option is not a unique value, which means there is a possibility of two options having the same option code leading to ambiguity in finding the selected option.
Instead, we think it should be either of these two:
- In Event capture, event data values should be saved with some unique option property (like option id) instead of option code. But, this would be a very huge migration, since, all the existing event data values should be changed from option code to option id.
- In Option, code should be made unique and there should be validations in option creation form to ensure option code is unique. This would be the simpler change to implement and our preferred solution to this issue.
Thanks,
Jhansi
Follow ups