Sharing Dataset in Two Separate DHIS2 Instances

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks

···

Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!

···

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Hi Stephen

As Em says, this requires a few manual steps. If you want to sync all metadata, you would use the /api/metadata endpoint, but if you are using a fairly recent version of DHIS 2, and want to sync data sets only (I assume metadata here, not data values) you could get the data set + all deps using the endpoint /api/dataSets//metadata

https://docs.dhis2.org/master/en/developer/html/webapi_metadata_export.html#webapi_dataset_program_export_dependencies

···

On Wed, Jul 5, 2017 at 6:17 AM, Em Le Hong em.hispvietnam@gmail.com wrote:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks

···

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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 Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Derek Kahongo Mukenge

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

···

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

···

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Derek Kahongo Mukenge

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

···

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

···

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Derek Kahongo Mukenge

Hi Dung,

Just a remember,

Thanks,

···

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Derek Kahongo Mukenge

Hi Derek,

Sorry for the late response, I’ve been chased by some other works. Here is the script.

  1. Go to this github address: https://github.com/hispvn/data-integration

  2. You will see a green button with label “Clone or download”. click “download zip”

  3. Extract the ZIP file you will get “data-integration-master” folder.

  4. Now go to that folder and follow the instructions in “readme.md” or in github.

Please tell me if anything is unclear.

Thanks,

Dzung

···

2017-07-19 22:16 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Dung,

Just a remember,

Thanks,

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

Derek Kahongo Mukenge

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

Hi Dung,

Thank you for sharing, I’ll come back to you if anything is unclear.

Thanks.

···

On Tue, Jul 25, 2017 at 7:44 AM, Dung Nguyen Anh nguyenanhdung191@gmail.com wrote:

Hi Derek,

Sorry for the late response, I’ve been chased by some other works. Here is the script.

  1. Go to this github address: https://github.com/hispvn/data-integration
  1. You will see a green button with label “Clone or download”. click “download zip”
  1. Extract the ZIP file you will get “data-integration-master” folder.
  1. Now go to that folder and follow the instructions in “readme.md” or in github.

Please tell me if anything is unclear.

Thanks,

Dzung


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

2017-07-19 22:16 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Dung,

Just a remember,

Thanks,


Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

Derek Kahongo Mukenge

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Hi Dung,

Thank you for the script. Before me go further, I need to know How this will deal Org Unit matching. Suppose that the instance B some Orgunit as part of instance A and I need to sync each Orgunit from A with its correspondant to B.

What change is needed to be done in the config file and index.js to make its work?

Or do I need to clone or have the same OrgUnit in the both instance?

Thanks.

···

On Tue, Jul 25, 2017 at 7:44 AM, Dung Nguyen Anh nguyenanhdung191@gmail.com wrote:

Hi Derek,

Sorry for the late response, I’ve been chased by some other works. Here is the script.

  1. Go to this github address: https://github.com/hispvn/data-integration
  1. You will see a green button with label “Clone or download”. click “download zip”
  1. Extract the ZIP file you will get “data-integration-master” folder.
  1. Now go to that folder and follow the instructions in “readme.md” or in github.

Please tell me if anything is unclear.

Thanks,

Dzung

2017-07-19 22:16 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Dung,

Just a remember,

Thanks,


Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

Derek Kahongo Mukenge

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Derek Kahongo Mukenge

Hi Dung,

I have the same problem with Derek, but I tried to creat a list of all organisation unit and call its here : in var rootOrgunit2 = rootOrgnitld + listofOrgunit ;

and use that list in this line “”${config.instanceABaseUrl}/api/dataValueSets?orgUnit=${config.rootOrgunit2 }&lastUpdatedDuration=${lastUpdatedDuration}&dataSet=${config.dataSetId}&children=true, {",

but I get no data in the orgunit listed. Could you help or explain more your code.

Thanks.

···

On Tue, Jul 25, 2017 at 12:49 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thank you for the script. Before me go further, I need to know How this will deal Org Unit matching. Suppose that the instance B some Orgunit as part of instance A and I need to sync each Orgunit from A with its correspondant to B.

What change is needed to be done in the config file and index.js to make its work?

Or do I need to clone or have the same OrgUnit in the both instance?

Thanks.


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 Tue, Jul 25, 2017 at 7:44 AM, Dung Nguyen Anh nguyenanhdung191@gmail.com wrote:

Hi Derek,

Sorry for the late response, I’ve been chased by some other works. Here is the script.

  1. Go to this github address: https://github.com/hispvn/data-integration
  1. You will see a green button with label “Clone or download”. click “download zip”
  1. Extract the ZIP file you will get “data-integration-master” folder.
  1. Now go to that folder and follow the instructions in “readme.md” or in github.

Please tell me if anything is unclear.

Thanks,

Dzung

Derek Kahongo Mukenge

2017-07-19 22:16 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Dung,

Just a remember,

Thanks,


Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

Derek Kahongo Mukenge

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Hi Derek and Vunda,

The script will run in case that we have the same organisation unit tree between 2 intances (organisation unit id must be the same). So please sync the organisation units tree (also data elements, categories, data sets…) before running this script.

Please note that the script will take all the data from all org units (which are descentdants of the root org unit), not only root org unit, so you don’t have to create a list of all org unit.

Cheers,

Dzung

···

2017-07-25 19:02 GMT+07:00 vunda limbe vundalon@gmail.com:

Hi Dung,

I have the same problem with Derek, but I tried to creat a list of all organisation unit and call its here : in var rootOrgunit2 = rootOrgnitld + listofOrgunit ;

and use that list in this line “”${config.instanceABaseUrl}/api/dataValueSets?orgUnit=${ config.rootOrgunit2 }&lastUpdatedDuration=${lastUpdatedDuration}&dataSet=${config.dataSetId}&children= true, {",

but I get no data in the orgunit listed. Could you help or explain more your code.

Thanks.

On Tue, Jul 25, 2017 at 12:49 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thank you for the script. Before me go further, I need to know How this will deal Org Unit matching. Suppose that the instance B some Orgunit as part of instance A and I need to sync each Orgunit from A with its correspondant to B.

What change is needed to be done in the config file and index.js to make its work?

Or do I need to clone or have the same OrgUnit in the both instance?

Thanks.


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 Tue, Jul 25, 2017 at 7:44 AM, Dung Nguyen Anh nguyenanhdung191@gmail.com wrote:

Hi Derek,

Sorry for the late response, I’ve been chased by some other works. Here is the script.

  1. Go to this github address: https://github.com/hispvn/data-integration
  1. You will see a green button with label “Clone or download”. click “download zip”
  1. Extract the ZIP file you will get “data-integration-master” folder.
  1. Now go to that folder and follow the instructions in “readme.md” or in github.

Please tell me if anything is unclear.

Thanks,

Dzung

Derek Kahongo Mukenge

2017-07-19 22:16 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Dung,

Just a remember,

Thanks,


Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

Derek Kahongo Mukenge

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

Hi Dung,

Thank you for your help. I have one more question about OrgUnit. Is it possible to have just matching that with orgunit id corresponding to B instance and leave the other not corresponding when the script is executed?

···

On Jul 26, 2017 05:32, “Dung Nguyen Anh” nguyenanhdung191@gmail.com wrote:

Hi Derek and Vunda,

The script will run in case that we have the same organisation unit tree between 2 intances (organisation unit id must be the same). So please sync the organisation units tree (also data elements, categories, data sets…) before running this script.

Please note that the script will take all the data from all org units (which are descentdants of the root org unit), not only root org unit, so you don’t have to create a list of all org unit.

Cheers,

Dzung

2017-07-25 19:02 GMT+07:00 vunda limbe vundalon@gmail.com:

Hi Dung,

I have the same problem with Derek, but I tried to creat a list of all organisation unit and call its here : in var rootOrgunit2 = rootOrgnitld + listofOrgunit ;

and use that list in this line “”${config.instanceABaseUrl}/api/dataValueSets?orgUnit=${co nfig.rootOrgunit2 }&lastUpdatedDuration=${lastUpdatedDuration}&dataSet=${confi g.dataSetId}&children=true, {",

but I get no data in the orgunit listed. Could you help or explain more your code.

Thanks.


Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

On Tue, Jul 25, 2017 at 12:49 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thank you for the script. Before me go further, I need to know How this will deal Org Unit matching. Suppose that the instance B some Orgunit as part of instance A and I need to sync each Orgunit from A with its correspondant to B.

What change is needed to be done in the config file and index.js to make its work?

Or do I need to clone or have the same OrgUnit in the both instance?

Thanks.


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 Tue, Jul 25, 2017 at 7:44 AM, Dung Nguyen Anh nguyenanhdung191@gmail.com wrote:

Hi Derek,

Sorry for the late response, I’ve been chased by some other works. Here is the script.

  1. Go to this github address: https://github.com/hispvn/data-integration
  1. You will see a green button with label “Clone or download”. click “download zip”
  1. Extract the ZIP file you will get “data-integration-master” folder.
  1. Now go to that folder and follow the instructions in “readme.md” or in github.

Please tell me if anything is unclear.

Thanks,

Dzung

Derek Kahongo Mukenge

2017-07-19 22:16 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Dung,

Just a remember,

Thanks,


Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

On Mon, Jul 17, 2017 at 10:55 AM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Dung,

Thanks for the explanation, I also have two instance and I can clone. Provide me the next steps then I’ll trry to run.

Thanks.

Derek Kahongo Mukenge

2017-07-17 9:49 GMT+01:00 Dung Nguyen Anh nguyenanhdung191@gmail.com:

Hi Derek,

Ok, let assume we have instance A (have the data set), and****blank instance B (which need to be synced with instance A). What we’re going to do first is to clone the data set in instance A into instance B.“Clone” here mean we will export the data set (including data element, option sets, … but not the values ) on instance A to a file (json or xml) and then import to instance B. By this way, we will have the data set on instance B with the same “id” as in instance A in order to sync the values after. Next, we will create a script to get the values from instance A and put into instance B, this script can be run every day or month or year, it’s up to you.

You will have to understand these steps first for synchronization between 2 instances, then I can show you how to make it done.

Regards,

Dzung

Derek Kahongo Mukenge

2017-07-17 15:10 GMT+07:00 Derek Kahongo Mukenge derek.elijah@gmail.com:

Hi Em,

Sorry for the delay for responding to your mail. I need to sync data value. If Dzung can guide me It’ll be fine.

Thanks.

Nguyen Anh Dung - HISP Vietnam
Phone: (+084) 090 8686 274

2017-07-10 10:45 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Derek,

To make sure that we are on the same page, I would like you to confirm that you want to sync metadata or sync data.

If you only want to sync metadata, you can use DHIS2 feature, you can read on https://docs.dhis2.org/2.24/en/user/html/ch31s06.html and the instruction from Morten email.

If you want to sync data value, this mean when user enter data in instance A, the value also be sync to instance B. I mark my team mate (Dzung) in this email, he will guide you some steps how to use script and cronjob to sync data value, he did it for some projects.

Thanks,

Derek Kahongo Mukenge

On Sun, Jul 9, 2017 at 2:54 PM, Derek Kahongo Mukenge derek.elijah@gmail.com wrote:

Hi Em,

I was looking for longtime how to create script and cronjob to sync two dhis2 instance. could you have a example of script that sync dataelement from on server to the second?

Thanks


Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

2017-07-05 0:17 GMT+01:00 Em Le Hong em.hispvietnam@gmail.com:

Hi Stephen,

As I know, you can’t set up sharing between instances directly in DHIS2.

But you can do it with DHIS2 API + script on custom form or script and cronjob in background.

Good luck!


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

Derek Kahongo Mukenge

On Wed, Jul 5, 2017 at 3:50 AM, Stephen Gbanyan mambu9@gmail.com wrote:

Hi All,

Is it possible to share a dataset from one DHIS2 instance to another so that when the data is entered into one it synchronizes with the other?

Thanks


Stephen M. Gbanyan, Jr. - ASc. BA. (Hons.)
Director
Health Information System
Ministry of Health and Social Welfare
Republic of Liberia
+231-886-847-915
skype: mambu9


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

Em Le Hong
DHIS2 Implementation| **HISP Vietnam **

em.hispvietnam@gmail.com | Skype: em.hispvietnam@gmail.com

Hello Nguyen,

Thanks for sharing this script.
I’ve followed the instructions in the Readme file and tried to perform a data pull but I got the attached error.


1 Like