Complete DataSets after bulk data values import

Hi all,

After Sending large bulks of data values how do you think is the best way to mark data sets as complete?

Regards,

Paulo Grácio

Any one out there for this query? Data imported from 1.4 and how to auto press the complete button?

Thanks.

Amanzi

···

Sent from my BlackBerry® smartphone provided by Patwaters® group

-----Original Message-----
From: Paulo Grácio <pgracio@criticalsoftware.com>
Sender: "Dhis2-users"
  <dhis2-users-bounces+amanzipatrick=gmail.com@lists.launchpad.net>Date: Mon, 5 Aug 2013 20:15:54
To: <dhis2-users@lists.launchpad.net>
Subject: [Dhis2-users] Complete DataSets after bulk data values import

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

Hello Paulo,

sorry to say we don’t support bulk complete data set registrations yet.

We plan to fix this by including it directly in the XML/JSON export files. Its on the plan for 2.13:

https://blueprints.launchpad.net/dhis2/+spec/complete-registrations-datavalue-exchange

regards,

Lars

···

On Mon, Aug 5, 2013 at 8:15 PM, Paulo Grácio pgracio@criticalsoftware.com wrote:

Hi all,

After Sending large bulks of data values how do you think is the best way to mark data sets as complete?

Regards,

Paulo Grácio


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

While waiting for the new feature a workaround would be to do some sql statements directly on the database and insert new records into the completedatasetregistration table for the orgunit, period, dataset combinations where you have “complete data”. How you define “complete” would then be an objective evaluation based on the data values you have imported, e.g. where a specific data element is present or where there is at least one value for any of the data elements in the dataset.

Ola

···

On Mon, Aug 5, 2013 at 8:15 PM, Paulo Grácio pgracio@criticalsoftware.com wrote:

Hi all,

After Sending large bulks of data values how do you think is the best way to mark data sets as complete?

Regards,

Paulo Grácio


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

I think you will also need the “date” which the dataset was completed. Again, this is fairly subjective about when the data would have been completed, but you could set it to some date after the end date of the period.

Here is some SQL for Postgres which I have used for this type of operation which may help you get started. This will delete all existing records for a given dataset, which you may or may not want.

–Change this to the datasetID you wish to update.

DELETE FROM completedatasetregistration where datasetid = 3438;

–Set to 15 days after the end date of the period

INSERT INTO completedatasetregistration

SELECT DISTINCT 3438::integer as datasetid,a.periodid, a.sourceid, (b.enddate+‘15 days’::interval)::date as date,‘admin’::character varying(255) as storedby from datavalue a

INNER JOIN period b on a.periodid = b.periodid

where a.dataelementid

IN (SELECT DISTINCT dataelementid from datasetmembers where datasetid =3438);

Of course, you could create some procedural code/SQL to loop over a number of datasets if you need to.

Regards,

Jason

···

On Wed, Aug 7, 2013 at 9:50 PM, Ola Hodne Titlestad olati@ifi.uio.no wrote:

While waiting for the new feature a workaround would be to do some sql statements directly on the database and insert new records into the completedatasetregistration table for the orgunit, period, dataset combinations where you have “complete data”. How you define “complete” would then be an objective evaluation based on the data values you have imported, e.g. where a specific data element is present or where there is at least one value for any of the data elements in the dataset.

Ola


On 7 Aug 2013 20:41, “Lars Helge Øverland” larshelge@gmail.com wrote:

Hello Paulo,

sorry to say we don’t support bulk complete data set registrations yet.

We plan to fix this by including it directly in the XML/JSON export files. Its on the plan for 2.13:

https://blueprints.launchpad.net/dhis2/+spec/complete-registrations-datavalue-exchange

regards,

Lars


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


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 Mon, Aug 5, 2013 at 8:15 PM, Paulo Grácio pgracio@criticalsoftware.com wrote:

Hi all,

After Sending large bulks of data values how do you think is the best way to mark data sets as complete?

Regards,

Paulo Grácio


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

Hi thanks for the advice.

This SQL solution works for me once I’m importing historical data and all datasets will be marked as complete for past periods.

Regards,

Paulo Grácio

···

From: Dhis2-users [mailto:dhis2-users-bounces+pgracio=criticalsoftware.com@lists.launchpad.net] On Behalf Of Jason Pickering
Sent: quinta-feira, 8 de Agosto de 2013 07:45
To: Ola Hodne Titlestad
Cc: dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Complete DataSets after bulk data values import

I think you will also need the “date” which the dataset was completed. Again, this is fairly subjective about when the data would have been completed, but you could set it to some date after the end date of the period.

Here is some SQL for Postgres which I have used for this type of operation which may help you get started. This will delete all existing records for a given dataset, which you may or may not want.

–Change this to the datasetID you wish to update.

DELETE FROM completedatasetregistration where datasetid = 3438;

–Set to 15 days after the end date of the period

INSERT INTO completedatasetregistration

SELECT DISTINCT 3438::integer as datasetid,a.periodid, a.sourceid, (b.enddate+‘15 days’::interval)::date as date,‘admin’::character varying(255) as storedby from datavalue a

INNER JOIN period b on a.periodid = b.periodid

where a.dataelementid

IN (SELECT DISTINCT dataelementid from datasetmembers where datasetid =3438);

Of course, you could create some procedural code/SQL to loop over a number of datasets if you need to.

Regards,

Jason

On Wed, Aug 7, 2013 at 9:50 PM, Ola Hodne Titlestad olati@ifi.uio.no wrote:

While waiting for the new feature a workaround would be to do some sql statements directly on the database and insert new records into the completedatasetregistration table for the orgunit, period, dataset combinations where you have “complete data”. How you define “complete” would then be an objective evaluation based on the data values you have imported, e.g. where a specific data element is present or where there is at least one value for any of the data elements in the dataset.

Ola

On 7 Aug 2013 20:41, “Lars Helge Øverland” larshelge@gmail.com wrote:

Hello Paulo,

sorry to say we don’t support bulk complete data set registrations yet.

We plan to fix this by including it directly in the XML/JSON export files. Its on the plan for 2.13:

https://blueprints.launchpad.net/dhis2/+spec/complete-registrations-datavalue-exchange

regards,

Lars

On Mon, Aug 5, 2013 at 8:15 PM, Paulo Grácio pgracio@criticalsoftware.com wrote:

Hi all,

After Sending large bulks of data values how do you think is the best way to mark data sets as complete?

Regards,

Paulo Grácio


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


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


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