← Back to team overview

dhis2-devs team mailing list archive

Re: Raw data exporting based on facilities through web api

 

Thank you very much. I have written the same thing in JS as for web api:
<script>
var base = 'http://103.247.238.67:8080/mishealth';
Ext.onReady( function() {
  Ext.Ajax.request({
    url: base + "dhis-web-commons-security/login.action?authOnly=true",
    method: 'POST',
    crossDomain:true,
    params: { j_username: "julhas", j_password: "....." },
    success: extractValue
  });
});
function extractValue(){
    //var orgUnit = "NZlRtrITPDc";
    //var period = "201507";// June
    //var DEs = "SFbW0C3EjCu;dA0hYjveU1y;sIVGk7pJUqr,gzavYhQgzB7";// Data
element list
    $.get("
http://103.247.238.67:8080/mishealth/api/dataValueSets.json?dataSet=aglAzf2x2bF&period=201507&orgUnit=NZlRtrITPDc";,
function(json){
        json.rows.forEach(function(row){
         for(var i=1;i<=4;i++){
           var testData = row[i];console.log(testData);
         }

        });
    });
</script>

I am not getting data after running this script. I can not find the problem
in my script. Waiting for your review.

Thanks
Julhas

On Wed, Sep 2, 2015 at 8:57 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>
wrote:

>
> childrenWhether to include the children in the hierarchy of the
> organisation units.
>
> On Wed, Sep 2, 2015 at 4:56 PM, Julhas Sujan <julhaspustcse@xxxxxxxxx>
> wrote:
>
>> Hi Lars,
>>
>> Thank you very much. I have followed this link. I am getting values in a
>> single facility by month according to this link. But i want to get multiple
>> facilities data like:
>>
>> https://apps.dhis2.org/demo/api/dataValueSets.csv?
>> dataSet=pBOMPrpg1QX&period=201401&orgUnit=org1,org2,org3....,org100.
>>
>> How can i get?
>>
>> Thanks
>>
>> Julhas
>>
>>
>>
>> On Wed, Sep 2, 2015 at 8:47 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>
>> wrote:
>>
>>> Hi Julhas,
>>>
>>> have a look at the web api docs:
>>>
>>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s11.html#d5e1433
>>>
>>>
>>> Lars
>>>
>>>
>>>
>>> On Wed, Sep 2, 2015 at 4:24 PM, Julhas Sujan <julhaspustcse@xxxxxxxxx>
>>> wrote:
>>>
>>>> Hi Experts,
>>>>
>>>> I want to exports all the raw data that I am entering by facilities by
>>>> month. I have 175 data elements and 25 indicators in my data entry form.
>>>> How can i export all the data by month from external script?
>>>>
>>>> Waiting for your valuable opinion.
>>>>
>>>> Thanks
>>>> Julhas
>>>> Dhaka, Bangladesh
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> http://www.dhis2.org <https://www.dhis2.org>
>>>
>>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org <https://www.dhis2.org>
>
>

References