← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] How to implement interoperability between 2 DHIS2 instance

 

It seems that david change is mail adress.

On Mon, Feb 27, 2017 at 9:22 PM, vunda limbe <vundalon@xxxxxxxxx> wrote:

> Hi David and Everybody,
>
> I begun to learn what you told me, but I'm stucked at the begining. Do you
> have an example of script that I can based on to build mine that work?
> Thanks for your support.
>
> On Tue, Apr 5, 2016 at 9:18 AM, David Huser <david.huser@xxxxxxxxxxxx>
> wrote:
>
>> Hi Vunda
>>
>> The nature of a Web API is its openness to be used by any software. As a
>> start, I would start in trying to understand how such an API works, which
>> is based on "HTTP REST" principles.
>> REST in layman's terms: http://www.looah.com/source/view/2284
>> REST basics (IBM developers): https://www.ibm.com/developerw
>> orks/library/ws-restful/index.html
>> Specification for DHIS2: https://dhis2.github.io/dhis2-
>> docs/master/en/developer/html/dhis2_developer_manual_full.html
>>
>> As an example, the programming language Python can be used, which is
>> installable on any system and is on Ubuntu by default. DHIS2 supports the
>> transportation format JSON. There's a new library on github (
>> https://github.com/dhis2/dhis2-python, but have not tried it yet) or you
>> can write your own.
>> So a basic procedure would be:
>>
>> myscript.py
>> 1. load a configuration of both APIs (username, url, passwords)
>> 2. make a GET request to a specific endpoint of MoH API
>> 3. validate, transform,... the received data
>> 4. make a POST request to another specific endpoint of your other
>> instance's API
>>
>> and then install a cronjob which calls this script with "* * * * * python
>> myscript.py"
>>
>> Further extensions could be logging to a file and a mail notification if
>> something goes wrong.
>>
>> I hope this can help a bit.
>>
>> Best regards
>> David
>>
>>
>>
>>
>> On 03.04.2016 08:34, vunda limbe wrote:
>>
>> Hi All,
>>
>>
>> I'm newbie on DHIS2. I implemented an instance that work for my
>> organisation and I need to Interoperate with MOH instance to retrieve data
>> each month for some health facilities.
>> I need guidance on how to set up interoperability by using web API and
>> how to create a cronjob that will fetch data from MOH instance to my
>> instance each month.
>>
>> Could you please help me to find ressources (course, tutorials, step by
>> step code, etc.) and advises on how to implement?
>>
>> Thank you all for your help.
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>>
>

Follow ups

References