Interoperability - Export Tracker to JSON

Hi all,

At the recent Oslo Academy Lars showcased a new feature for exporting data values as JSON resembling raw data. Can someone remind me how to access this feature?

I’m trying to run a script to transfer data from a separate tracker server to main DHIS2 aggregate server with matching metadata.

Regards,

Chase Freeman

Hi Chase.

Are you talking about using the Web API or a feature within the interface? For the API solution, you can simply use an HTTP request with the corresponding required values (basically the ID of the tracker (event) program):

http://{yourDHIS2Instance}/api/events.json?program=${qd.programid}

This will return a json with all the data of that program. Note that there’s a pageSize parameter as well that you might find useful. For a full list check: Metadata - DHIS2 Documentation

If you want a more detailed example I can provide an example script for JS (node/express).

Best regards,

Antonio Solano-Roman

Data Visualization & User Experience Design

Sabeti Lab - Broad Institute

···

On Sep 15 2017, at 4:05 pm, Freeman, Chase Chase.Freeman@msi-inc.com wrote:

Hi all,

At the recent Oslo Academy Lars showcased a new feature for exporting data values as JSON resembling raw data. Can someone remind me how to access this feature?

I’m trying to run a script to transfer data from a separate tracker server to main DHIS2 aggregate server with matching metadata.

Regards,

Chase Freeman

_______________________________________________ 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 Chase

Are you talking about getting the event analytics as raw aggregate data? (for import into aggregate data model)

Lars will know the inner details, but there is an option now in “event reports” called “Download → Advanced → Data Value Set → Json” which might give you what you need?

···

On Sat, Sep 16, 2017 at 3:15 AM, Jesus Solano-Roman asolano@broadinstitute.org wrote:

Hi Chase.

Are you talking about using the Web API or a feature within the interface? For the API solution, you can simply use an HTTP request with the corresponding required values (basically the ID of the tracker (event) program):

http://{yourDHIS2Instance}/api/events.json?program=${qd.programid}

This will return a json with all the data of that program. Note that there’s a pageSize parameter as well that you might find useful. For a full list check: https://docs.dhis2.org/master/en/developer/html/dhis2_developer_manual_full.html#webapi_querying_reading_events

If you want a more detailed example I can provide an example script for JS (node/express).

Best regards,

Antonio Solano-Roman

Data Visualization & User Experience Design

Sabeti Lab - Broad Institute

        On Sep 15 2017, at 4:05 pm, Freeman, Chase <Chase.Freeman@msi-inc.com            > wrote:

Hi all,

At the recent Oslo Academy Lars showcased a new feature for exporting data values as JSON resembling raw data. Can someone remind me how to access this feature?

I’m trying to run a script to transfer data from a separate tracker server to main DHIS2 aggregate server with matching metadata.

Regards,

Chase Freeman

_______________________________________________ Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)


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

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

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

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

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Yes Morten, I think that’s exactly it. If you recall, we had a discussion at the Experts academy about how I would like to use this to sync two servers.

Thanks,

Chase

···

Hi Chase

Are you talking about getting the event analytics as raw aggregate data? (for import into aggregate data model)

Lars will know the inner details, but there is an option now in “event reports” called “Download → Advanced → Data Value Set → Json” which might give you what you need?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sat, Sep 16, 2017 at 3:15 AM, Jesus Solano-Roman asolano@broadinstitute.org wrote:

Hi Chase.

Are you talking about using the Web API or a feature within the interface? For the API solution, you can simply use an HTTP request with the corresponding required values (basically the ID of the tracker (event) program):

http://{yourDHIS2Instance}/api/events.json?program=${qd.programid}

This will return a json with all the data of that program. Note that there’s a pageSize parameter as well that you might find useful. For a full list check: https://docs.dhis2.org/master/en/developer/html/dhis2_developer_manual_full.html#webapi_querying_reading_events

If you want a more detailed example I can provide an example script for JS (node/express).

Best regards,

Antonio Solano-Roman

Data Visualization & User Experience Design

Sabeti Lab - Broad Institute

On Sep 15 2017, at 4:05 pm, Freeman, Chase Chase.Freeman@msi-inc.com wrote:

Hi all,

At the recent Oslo Academy Lars showcased a new feature for exporting data values as JSON resembling raw data. Can someone remind me how to access this feature?

I’m trying to run a script to transfer data from a separate tracker server to main DHIS2 aggregate server with matching metadata.

Regards,

Chase Freeman

_______________________________________________
Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
Post to     : dhis2-users@lists.launchpad.net
Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

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

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

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

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

Hi Jesus,

Thank you for the detailed guidance–This also seems like a great solution. Would you mind sending me an example script? I’d like to give a test J

Regards,

Chase Freeman

Jr. Web Developer

Management Systems International

A Tetra Tech Company

Arlington, VA USA

(Work) +1 703 979 7170 x219

chase.freeman@msi-inc.com

www.msiworldwide.com

···

Are you talking about using the Web API or a feature within the interface? For the API solution, you can simply use an HTTP request with the corresponding required values (basically the ID of the tracker (event) program):

http://{yourDHIS2Instance}/api/events.json?program=${qd.programid}

This will return a json with all the data of that program. Note that there’s a pageSize parameter as well that you might find useful. For a full list check: https://docs.dhis2.org/master/en/developer/html/dhis2_developer_manual_full.html#webapi_querying_reading_events

If you want a more detailed example I can provide an example script for JS (node/express).

Best regards,

Antonio Solano-Roman

Data Visualization & User Experience Design

Sabeti Lab - Broad Institute

On Sep 15 2017, at 4:05 pm, Freeman, Chase Chase.Freeman@msi-inc.com wrote:

Hi all,

At the recent Oslo Academy Lars showcased a new feature for exporting data values as JSON resembling raw data. Can someone remind me how to access this feature?

I’m trying to run a script to transfer data from a separate tracker server to main DHIS2 aggregate server with matching metadata.

Regards,

Chase Freeman

_______________________________________________
Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
Post to     : dhis2-users@lists.launchpad.net
Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)