[Dhis2-devs] Automating DHIS2

It certainly is time to consider some of the basics of what is needed urgently. I started this discussion really because I need to regularly trigger the refresh of the datamart and am too lazy to login and do this, and figure a cron job with a script would be more suited to such a task. Ola indicated that scheduled data mart refreshes had been scheduled for the next release. I started playing with curl to refresh the data mart and it or course is trivial to do this. What is not so simple is how I can alter parameters, namely the time periods of the data mart. For instance at the end of October 2010 I would like to add this period automatically to the available periods of the datamart and some report tables . I suppose I could do this with a script that inserts the appropriate period into the datamartexportperiods table but it seems to start to get scary already. Would be good though to map out a few basic functions that are needed but it does seem already to be challenging to replicate all the functions of the GUI through simple URLs.

···

Sent from my HTC

----- Reply message -----
From: “Ime Asangansi” asangansi@yahoo.com
Date: Fri, Nov 12, 2010 2:39 am
Subject: [Dhis2-devs] [Dhis2-users] Automating DHIS2
To: “Jo Størset” storset@gmail.com, “Lars Helge Øverland” larshelge@gmail.com
Cc: dhis2-users@lists.launchpad.net, “Ola Hodne Titlestad” olati@ifi.uio.no, “dhis2-devs” dhis2-devs@lists.launchpad.net

Hi everyone in the discussion,

Thanks for this.
Yes, interesting to begin to look at the Data as a Service (DAAS) capabilities of the DHIS. Would be really useful to be able to have different clients handling data off DHIS, esp with this current ‘enterprise architecture’ craze.

But Lars, how does your expoze webservice fit into this?

Ime

— On Mon, 11/8/10, Lars Helge Øverland larshelge@gmail.com wrote:

From: Lars Helge Øverland larshelge@gmail.com
Subject: Re: [Dhis2-devs] [Dhis2-users] Automating DHIS2
To: “Jo Størset” storset@gmail.com
Cc: dhis2-users@lists.launchpad.net, “Ola Hodne Titlestad” olati@ifi.uio.no, “dhis2-devs” dhis2-devs@lists.launchpad.net
Date: Monday, November 8, 2010, 7:13 PM

Required note: As long as we don’t call it REST :slight_smile: REST imples a hypermedia-driven application, so let’s stick to calling it what it would probably be: a simple web api.

Hey be a bit more visionary:) I think this is a great thought. We are getting more and more requests from people who want to use their own presentation layer (Ifakara folks in Tanzania will “make a web-based query tool on top of dhis2”, Uganda folks are integrating dhis2 with a CMS etc). I’m envisioning methods for:

  • getting all data elements/indicators with (a bit extended) DXF and HTML format responses with embedded links to URLs pointing to a method giving you the full details for each as HTML or PDF.
  • getting all indicators with DXF/HTML responses with links to URLs pointing to a PNG chart giving the aggregated vales for the 12 last months.- getting all report tables as DXF/HTML with links to URLs pointing to SDMX-HD/HTML/PDF/Excel representations of the table.
  • getting all orgunits for a given parent as DXF/HTML with links to URLs pointing to GIS PNG images, and so on…
    There you have your hypermedia-driven application that moves from one state to the next by examining and choosing from among the alternative state transitions in the current set of representations.

This kind of stuff will give potential users an elegant way of integrating dhis2 data into whatever tool they prefer and avoid hacking into the database or fumbling with the source code. If don’t want your users to leave, make it easy for them to do so:)

Lars

-----Inline Attachment Follows-----


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

Jason,

Have a look at the various relative periods that are available in the datamart export definitions. When doing routinely and automated exports we will use these relative periods to avoid having to make any changes to the export specifications. It works the same way for manual exports, no need to go an modify periods any more if you are using the relative periods.

Ola

···

On 12 November 2010 05:15, jason.p.pickering@gmail.com jason.p.pickering@gmail.com wrote:

It certainly is time to consider some of the basics of what is needed urgently. I started this discussion really because I need to regularly trigger the refresh of the datamart and am too lazy to login and do this, and figure a cron job with a script would be more suited to such a task. Ola indicated that scheduled data mart refreshes had been scheduled for the next release. I started playing with curl to refresh the data mart and it or course is trivial to do this. What is not so simple is how I can alter parameters, namely the time periods of the data mart. For instance at the end of October 2010 I would like to add this period automatically to the available periods of the datamart and some report tables .


I suppose I could do this with a script that inserts the appropriate period into the datamartexportperiods table but it seems to start to get scary already. Would be good though to map out a few basic functions that are needed but it does seem already to be challenging to replicate all the functions of the GUI through simple URLs.

Sent from my HTC

----- Reply message -----
From: “Ime Asangansi” asangansi@yahoo.com
Date: Fri, Nov 12, 2010 2:39 am
Subject: [Dhis2-devs] [Dhis2-users] Automating DHIS2

To: “Jo Størset” storset@gmail.com, “Lars Helge Øverland” larshelge@gmail.com

Cc: dhis2-users@lists.launchpad.net, “Ola Hodne Titlestad” olati@ifi.uio.no, “dhis2-devs” dhis2-devs@lists.launchpad.net

Hi everyone in the discussion,

Thanks for this.
Yes, interesting to begin to look at the Data as a Service (DAAS) capabilities of the DHIS. Would be really useful to be able to have different clients handling data off DHIS, esp with this current ‘enterprise architecture’ craze.

But Lars, how does your expoze webservice fit into this?

Ime

— On Mon, 11/8/10, Lars Helge Øverland larshelge@gmail.com wrote:

From: Lars Helge Øverland larshelge@gmail.com
Subject: Re: [Dhis2-devs] [Dhis2-users] Automating DHIS2
To: “Jo Størset” storset@gmail.com

Cc: dhis2-users@lists.launchpad.net, “Ola Hodne Titlestad” olati@ifi.uio.no, “dhis2-devs” dhis2-devs@lists.launchpad.net

Date: Monday, November 8, 2010, 7:13 PM

Required note: As long as we don’t call it REST :slight_smile: REST imples a hypermedia-driven application, so let’s stick to calling it what it would probably be: a simple web api.

Hey be a bit more visionary:) I think this is a great thought. We are getting more and more requests from people who want to use their own presentation layer (Ifakara folks in Tanzania will “make a web-based query tool on top of dhis2”, Uganda folks are integrating dhis2 with a CMS etc). I’m envisioning methods for:

  • getting all data elements/indicators with (a bit extended) DXF and HTML format responses with embedded links to URLs pointing to a method giving you the full details for each as HTML or PDF.

  • getting all indicators with DXF/HTML responses with links to URLs pointing to a PNG chart giving the aggregated vales for the 12 last months.- getting all report tables as DXF/HTML with links to URLs pointing to SDMX-HD/HTML/PDF/Excel representations of the table.

  • getting all orgunits for a given parent as DXF/HTML with links to URLs pointing to GIS PNG images, and so on…
    There you have your hypermedia-driven application that moves from one state to the next by examining and choosing from among the alternative state transitions in the current set of representations.

This kind of stuff will give potential users an elegant way of integrating dhis2 data into whatever tool they prefer and avoid hacking into the database or fumbling with the source code. If don’t want your users to leave, make it easy for them to do so:)

Lars

-----Inline Attachment Follows-----


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

1 Like

I simplified my map per Jason’s instructions, converted it to GeoJSON, put it in the GeoJSON directory and registered it. However, when I go to assign polygons to org units, I see the org units but no map. When I click assign all, the program hangs. When I try to do a map, I get a message that no org units have been assigned.

I took the simplified map and using EpiMap produced a new shapefile containing only the districts from one region. I converted the map to GeoJSON and put it in the GeoJSON directory, but I could not register it, it did not appear in the file dropdown.

Jason, the name missing from the org unit table is [[Ashanti]] (the [[]] indicates a dummy org unit containing facilities and project sites belonging to the region). I am attaching some relevant maps.

CLNDIST375.DBF (122 KB)

clndist375.shp (129 KB)

clndist375.shx (1.43 KB)

clndist375.prj (423 Bytes)

ashanti375.dbf (19.7 KB)

ashanti375.shx (316 Bytes)

ashanti375.shp (17.4 KB)

clndist375.prj (423 Bytes)

Roger,

Have you considered importing the coordinates to the orgunit table
instead of having them as GeoJSON files?

Jan has indicated recently that he would like to remove the support
for GeoJSON for the thematic mapping.

Knut

···

On Tue, Nov 16, 2010 at 11:39 AM, Friedman, Roger (CDC/CGH/DGHA) (CTR) <rdf4@cdc.gov> wrote:

I simplified my map per Jason's instructions, converted it to GeoJSON, put
it in the GeoJSON directory and registered it. However, when I go to assign
polygons to org units, I see the org units but no map. When I click assign
all, the program hangs. When I try to do a map, I get a message that no org
units have been assigned.

I took the simplified map and using EpiMap produced a new shapefile
containing only the districts from one region. I converted the map to
GeoJSON and put it in the GeoJSON directory, but I could not register it, it
did not appear in the file dropdown.

Jason, the name missing from the org unit table is [[Ashanti]] (the [[]]
indicates a dummy org unit containing facilities and project sites belonging
to the region). I am attaching some relevant maps.
_______________________________________________
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

--
Cheers,
Knut Staring