We are developing an application that needs to know if some events (captured via event capture) were validated by an authorized user or not. I’ve seen that events have an “status” field which can have the values “ACTIVE, COMPLETED, VISITED, OVERDUE, SKIPPED” but I couldn’t get much information about what meant each field from the documentation so I was wondering if its possible to create a “VALIDATED” status for the events and then make a put with the status changed. If this is not possible (not accepted via Update by the web api) or can bring future problems with newer versions, would it be possible to reuse one of the status already listed there? I’ve seen the ACTIVE and COMPLETED status but I’ve never seen the rest used.
I understand your question. We do not plan to add additional enum options though which are not used by DHIS 2 internally as it will cause confusion for developers.
For app development purposes I would recommend that you instead create a data element which could be called “Validated”, have a particular code (e.g. “VALIDATION_STATUS”) and be of value type Yes/No (boolean). You can then in your app set a corresponding data value through the regular events resource of true or false, and then use this to keep the validation state. This of course creates a dependency on the configuration which should be documented.
We are developing an application that needs to know if some events (captured via event capture) were validated by an authorized user or not. I’ve seen that events have an “status” field which can have the values “ACTIVE, COMPLETED, VISITED, OVERDUE, SKIPPED” but I couldn’t get much information about what meant each field from the documentation so I was wondering if its possible to create a “VALIDATED” status for the events and then make a put with the status changed. If this is not possible (not accepted via Update by the web api) or can bring future problems with newer versions, would it be possible to reuse one of the status already listed there? I’ve seen the ACTIVE and COMPLETED status but I’ve never seen the rest used.
a question related to this: I’ve done something similar to what you suggest Lars (i.e. programatically updating a data element in an event), but as far as I could tell from the documentation and testing there is no way to add/update a single data value for an event without also downloading and then re-sending all other data values? In other words, if you send a single data value to and existing event (/api/events/uid), it will delete other data values not part of the payload. Have I missed something, or is that the case? If so, it would be nice with support for that over the API for these types of scenarios.
We are developing an application that needs to know if some events (captured via event capture) were validated by an authorized user or not. I’ve seen that events have an “status” field which can have the values “ACTIVE, COMPLETED, VISITED, OVERDUE, SKIPPED” but I couldn’t get much information about what meant each field from the documentation so I was wondering if its possible to create a “VALIDATED” status for the events and then make a put with the status changed. If this is not possible (not accepted via Update by the web api) or can bring future problems with newer versions, would it be possible to reuse one of the status already listed there? I’ve seen the ACTIVE and COMPLETED status but I’ve never seen the rest used.
Maybe the dry run option while importing data could help. just set to “new values only” or “update only”…
Henri
Hi Lars/devs,
a question related to this: I’ve done something similar to what you suggest Lars (i.e. programatically updating a data element in an event), but as far as I could tell from the documentation and testing there is no way to add/update a single data value for an event without also downloading and then re-sending all other data values? In other words, if you send a single data value to and existing event (/api/events/uid), it will delete other data values not part of the payload. Have I missed something, or is that the case? If so, it would be nice with support for that over the API for these types of scenarios.
mai 2016 kl. 15.47 skrev Lars Helge Øverland lars@dhis2.org:
Hi Eric,
I understand your question. We do not plan to add additional enum options though which are not used by DHIS 2 internally as it will cause confusion for developers.
For app development purposes I would recommend that you instead create a data element which could be called “Validated”, have a particular code (e.g. “VALIDATION_STATUS”) and be of value type Yes/No (boolean). You can then in your app set a corresponding data value through the regular events resource of true or false, and then use this to keep the validation state. This of course creates a dependency on the configuration which should be documented.
We are developing an application that needs to know if some events (captured via event capture) were validated by an authorized user or not. I’ve seen that events have an “status” field which can have the values “ACTIVE, COMPLETED, VISITED, OVERDUE, SKIPPED” but I couldn’t get much information about what meant each field from the documentation so I was wondering if its possible to create a “VALIDATED” status for the events and then make a put with the status changed. If this is not possible (not accepted via Update by the web api) or can bring future problems with newer versions, would it be possible to reuse one of the status already listed there? I’ve seen the ACTIVE and COMPLETED status but I’ve never seen the rest used.