Data approval workflow for programs

Hi everyone,

I was wondering if the data approval workflow for programs has been implemented yet, I’ve seen in a past email (Re: [Dhis2-users] [Dhis2-devs] Data Approval for Programmes) that it was planned to be released for the current version (2.22) but it does not seem to work yet.

Thanks in advance!

Hi Eric,

We’re sorry, it didn’t make it into 2.22. But it should be there in 2.23. What did make it into 2.22 is the “workflow” object, upon which we will base approvals for programs, see https://blueprints.launchpad.net/dhis2/+spec/approval-workflows. In 2.22, rather than approving a dataset (for a given period, organization unit, etc.), approvals operate on a higher level object called a “workflow”. This has three advantages: (1) multiple datasets can reference the same workflow and be approved together if desired (or each dataset can have its own workflow), (2) each workflow can reference a subset of approval levels, if not all types of approvals should use all approval levels, and (3) in the future, we will use the workflows for approving programs as well. In fact, a single workflow will be able to approve a single program, or multiple programs, or a mix of programs and datasets, etc.

Something we are still working on is understanding best how, or even whether, to lock out program event entry for periods that have been approved. Event entry uses a date picker, and it doesn’t easily lend itself to locking out various approved periods. Date pickers generally can be constrained only to a single valid date range from a start date to an end date. Alternatives include that we could set start and/or end dates in the date picker according to what range of time has not been approved, and/or we could have some javascript validation logic to check against approved periods after the user has entered the date. We’re still discussing what would be best.

It would be helpful if you could share with us any anticipated use case you have for program data approval. Is it important to you that users not be able to enter event data for periods that have been approved? Is it important that event data be hidden from higher level users until approved? Do you expect past periods will be approved up until a point in time and future periods beyond that point will be unapproved – or might there sometimes be alternating periods that are approved and unapproved?

If you – and anyone else – can tell us about your anticipated use cases for program data approvals, it will increase the chance that we will finish this feature in a way that will work well for you. :slight_smile:

Cheers,

Jim

···

On Thu, Feb 11, 2016 at 6:51 AM, eric mourin ericmourin@hotmail.com wrote:

Hi everyone,

I was wondering if the data approval workflow for programs has been implemented yet, I’ve seen in a past email (https://www.mail-archive.com/dhis2-users@lists.launchpad.net/msg08144.html) that it was planned to be released for the current version (2.22) but it does not seem to work yet.

Thanks in advance!


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jim Grace
Core developer, DHIS 2

HISP US Inc.

http://www.dhis2.org

Hi Jim,

We are in the process of migrating to v2.22 (and the data approval workflows) and are trying to understand the implications for the approvals API:

  • In v2.22 calls to the data approvals API will still be specified using an orgUnit, a period, and a dataset. The response will reflect however, the state of the approval for the orgUnit, period and associated workflow, not dataset. Similarly any POST calls will modify the approval for the workflow, not the dataset.
  • In v2.23 (or later) the data approvals API will be changed so that you specify a workflow directly. Referencing the dataset will be removed.
    Is the above correct?

Cheers,

···

On Thu, Feb 11, 2016 at 6:26 PM, Jim Grace jim@dhis2.org wrote:

Hi Eric,

We’re sorry, it didn’t make it into 2.22. But it should be there in 2.23. What did make it into 2.22 is the “workflow” object, upon which we will base approvals for programs, see https://blueprints.launchpad.net/dhis2/+spec/approval-workflows. In 2.22, rather than approving a dataset (for a given period, organization unit, etc.), approvals operate on a higher level object called a “workflow”. This has three advantages: (1) multiple datasets can reference the same workflow and be approved together if desired (or each dataset can have its own workflow), (2) each workflow can reference a subset of approval levels, if not all types of approvals should use all approval levels, and (3) in the future, we will use the workflows for approving programs as well. In fact, a single workflow will be able to approve a single program, or multiple programs, or a mix of programs and datasets, etc.

Something we are still working on is understanding best how, or even whether, to lock out program event entry for periods that have been approved. Event entry uses a date picker, and it doesn’t easily lend itself to locking out various approved periods. Date pickers generally can be constrained only to a single valid date range from a start date to an end date. Alternatives include that we could set start and/or end dates in the date picker according to what range of time has not been approved, and/or we could have some javascript validation logic to check against approved periods after the user has entered the date. We’re still discussing what would be best.

It would be helpful if you could share with us any anticipated use case you have for program data approval. Is it important to you that users not be able to enter event data for periods that have been approved? Is it important that event data be hidden from higher level users until approved? Do you expect past periods will be approved up until a point in time and future periods beyond that point will be unapproved – or might there sometimes be alternating periods that are approved and unapproved?

If you – and anyone else – can tell us about your anticipated use cases for program data approvals, it will increase the chance that we will finish this feature in a way that will work well for you. :slight_smile:

Cheers,

Jim


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

-doh

On Thu, Feb 11, 2016 at 6:51 AM, eric mourin ericmourin@hotmail.com wrote:

Hi everyone,

I was wondering if the data approval workflow for programs has been implemented yet, I’ve seen in a past email (https://www.mail-archive.com/dhis2-users@lists.launchpad.net/msg08144.html) that it was planned to be released for the current version (2.22) but it does not seem to work yet.

Thanks in advance!


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jim Grace
Core developer, DHIS 2

HISP US Inc.

http://www.dhis2.org

Hi David,

Your understanding is correct. The 2.22 (and 2.23) API calls still refer to dataset instead of workflow.

  • When you “approve” a dataset, you are really approving the workflow connected to the dataset. (This also approves data in any other datasets that are also connected to the same workflow.)

  • When you get the approval status of a dataset, you are really getting the approval status of the workflow connected to the dataset.

We do intend to offer workflow-related API approval calls in the future, and we may at some point retire the dataset-related API approval calls. We were not quick to drop the dataset-related calls because we know there are applications out there that use them.

Cheers,

Jim

···

On Tue, Apr 12, 2016 at 1:58 PM, David Siang Fong Oh doh@thoughtworks.com wrote:

Hi Jim,

We are in the process of migrating to v2.22 (and the data approval workflows) and are trying to understand the implications for the approvals API:

  • In v2.22 calls to the data approvals API will still be specified using an orgUnit, a period, and a dataset. The response will reflect however, the state of the approval for the orgUnit, period and associated workflow, not dataset. Similarly any POST calls will modify the approval for the workflow, not the dataset.
  • In v2.23 (or later) the data approvals API will be changed so that you specify a workflow directly. Referencing the dataset will be removed.
    Is the above correct?

Cheers,

-doh

On Thu, Feb 11, 2016 at 6:26 PM, Jim Grace jim@dhis2.org wrote:

Hi Eric,

We’re sorry, it didn’t make it into 2.22. But it should be there in 2.23. What did make it into 2.22 is the “workflow” object, upon which we will base approvals for programs, see https://blueprints.launchpad.net/dhis2/+spec/approval-workflows. In 2.22, rather than approving a dataset (for a given period, organization unit, etc.), approvals operate on a higher level object called a “workflow”. This has three advantages: (1) multiple datasets can reference the same workflow and be approved together if desired (or each dataset can have its own workflow), (2) each workflow can reference a subset of approval levels, if not all types of approvals should use all approval levels, and (3) in the future, we will use the workflows for approving programs as well. In fact, a single workflow will be able to approve a single program, or multiple programs, or a mix of programs and datasets, etc.

Something we are still working on is understanding best how, or even whether, to lock out program event entry for periods that have been approved. Event entry uses a date picker, and it doesn’t easily lend itself to locking out various approved periods. Date pickers generally can be constrained only to a single valid date range from a start date to an end date. Alternatives include that we could set start and/or end dates in the date picker according to what range of time has not been approved, and/or we could have some javascript validation logic to check against approved periods after the user has entered the date. We’re still discussing what would be best.

It would be helpful if you could share with us any anticipated use case you have for program data approval. Is it important to you that users not be able to enter event data for periods that have been approved? Is it important that event data be hidden from higher level users until approved? Do you expect past periods will be approved up until a point in time and future periods beyond that point will be unapproved – or might there sometimes be alternating periods that are approved and unapproved?

If you – and anyone else – can tell us about your anticipated use cases for program data approvals, it will increase the chance that we will finish this feature in a way that will work well for you. :slight_smile:

Cheers,

Jim


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Thu, Feb 11, 2016 at 6:51 AM, eric mourin ericmourin@hotmail.com wrote:

Hi everyone,

I was wondering if the data approval workflow for programs has been implemented yet, I’ve seen in a past email (https://www.mail-archive.com/dhis2-users@lists.launchpad.net/msg08144.html) that it was planned to be released for the current version (2.22) but it does not seem to work yet.

Thanks in advance!


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jim Grace
Core developer, DHIS 2

HISP US Inc.

http://www.dhis2.org

Jim Grace
Core developer, DHIS 2

HISP US Inc.

http://www.dhis2.org