Re: [Dhis2-users] Get Date Values

2018-08-16 Thread Vladimer Shioshvili
Walusiku,

Periodtype table contains the list of period types (weekly, daily, monthly,
quarterly, etc).

Period table has the actual period definitions: period type, start date,
and end date (e.g. quarterly type, start date january 1, 2018, end date
March 31, 2018).

period id in the data value table refers to the entry in the period table.

periodid is for the period that the data is reported for.

If you need to get when the data value was actually entered/last updated,
in datavalue table you have created (when data point was created) and
lastupdated (when the data point value was last update).

Best,
Vlad

On Thu, Aug 16, 2018 at 2:54 AM Walusiku Muyunda  wrote:

> Hello,
>
> We recently implemented DHIS2 for our data collection needs and are
> currently looking at the first data submitted. Am just getting used to the
> table structure and need help on where the Data Set data entry
> dates/periods are saved. In the datavalue table I have a field periodid but
> cant seem to find what table to link it to to get the actual dates. the
> period and periodtype tables dont seem to have the actual dates when the
> data was being reported. Please help.
>
> Thank you.
>
>
> *Walusiku J. Muyunda*
>
>
> *"We have heaven to win and hell to shun, our lives testify better!"
> *
> ___
> 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
>
___
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


Re: [Dhis2-users] DHIS2 2.30 - Metadata import App - File format feature

2018-08-06 Thread Vladimer Shioshvili
I think it's more than that - I was looking at the new metadata import app
as well, and it has bigger issues. It accepts json and xml, won't accept
zip (returns 415), but when you click on import it immediately logs you out
and there is no way to see if anything actually happened - logger console
on the bottom of the import app only has very limited info - there don't
seem to be any summaries.

Thanks,
Vlad

On Mon, Aug 6, 2018 at 8:08 AM Thomas Warichet 
wrote:

> Hi all,
>
> We've just set up a new system (2.30 - Build 0722ff4) and it looks that
> the metadata import file format feature isn't available anymore (e.g. I
> can't import metadata from a csv file).
>
> I don't find any info about this (but I may search the wrong way). Am I
> missing something or is it just a dev choice?
>
> Thx in advance for any info about that,
>
> Thomas
> [image: BLUESQUARE NEW FINAL VECT-01.png]
>
> Thomas Warichet
>
> www.bluesquarehub.com
>
> [image: twitter.png]  [image: facebook.png]
>  [image: linkedin.png]
> 
> ___
> 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
>
___
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


Re: [Dhis2-users] dataset not visible on data entry window

2018-07-12 Thread Vladimer Shioshvili
Shams,

Have you assigned org units to the data set?

https://docs.dhis2.org/2.28/en/user/html/manage_data_set.html

Vlad

On Thu, Jul 12, 2018 at 4:48 AM Shams-ur-Rehman 
wrote:

> Dear support team,
>
>
>
> We are using dhs2 2.29 version. After creating an organization unit,
> opened four level category, than created data element as well as dataset,
> when going to data entry window, dataset not visible on data entry window?
>
>
>
> Please help.
>
>
>
>
>
> Regards
>
> Shams
>
>
> ___
> 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
>
___
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


Re: [Dhis2-users] [Dhis2-devs] How to upload data values for data elements generated in custom forms

2018-07-09 Thread Vladimer Shioshvili
Leke,

Have a look at the documentation, it gives the example of the csv import
file format:
https://docs.dhis2.org/2.27/en/developer/html/dhis2_developer_manual_full.html#webapi_data_values_csv

You need to specify data element and category option combo in separate
columns.

Vlad

On Mon, Jul 9, 2018 at 12:36 PM Olaleke Seweje 
wrote:

> Hello all,
> Let me paint the scenario.
>
> I have data elements: Element A,  Element B. Category combination:
> CategoryCombo C
>
> CategoryCombo C is attached to both elements and the elements are attached
> to a custom form data set.
>
> So DHIS created 2 new elements
> Element A, CatCombo C,
> Element B, CatCombo C
>
> I was not able to get/access the generated elements under Data Elements in
> Maintenance app but I accessed through the indicator calculations and got
> the UIDs in format xxx.yyy
>
> Now the problem is if i copy that UID to a data values upload CSV, it
> never uploads the data. Rather, it gives error message that the data
> element not found or inaccessible.
>
> So can anyone please help me with making it accessible/usable in an upload
> csv?
>
> I have attached a sample of my data values file.
>
> Thanks.
>
> --
> Regards,
> Leke Seweje
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
___
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


Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Vladimer Shioshvili
Thanks Knut - but documentation doesn't specify the API endpoint, or how
you specify the metadata object type (it is a drop-down in import/export
app).

On Wed, Jul 4, 2018, 16:37 Knut Staring  wrote:

> It is possible:
> https://docs.dhis2.org/master/en/developer/html/webapi_csv_metadata_import.html
>
> Knut
>
> On Wed, Jul 4, 2018 at 2:31 PM Vladimer Shioshvili 
> wrote:
>
>> Leke,
>>
>> While it's good to use --data-binary, in your curl calls in both
>> examples, you are missing -H switch in front of the content type (look at
>> the example Knut provided), which makes it default to
>> application/x-www-form-urlencoded. Make sure you include -H;
>>
>> Knut (and others), Leke's original question mentioned dataElements, and
>> it got me looking too, and i noticed that while the documentation talks
>> about columns for the metadata csv content, it never gives the API
>> endpoints for importing metadata using CSV. Is that even possible? There
>> are classes to handle it in the code, and I know import/export app does it
>> (i've used it), but what about API?
>>
>> Vlad
>>
>> On Wed, Jul 4, 2018 at 5:45 AM Knut Staring  wrote:
>>
>>> Hi Leke, according to the link I sent you have to use --data-binary as
>>> in this request:
>>>
>>> curl --data-binary @datavalueset.csv 
>>> "https://play.dhis2.org/demo/24/api/dataValueSets;
>>>   -H "Content-Type:application/csv" -u admin:district -v
>>>
>>> Knut
>>>
>>> On Wed, Jul 4, 2018 at 11:35 AM Olaleke Seweje 
>>> wrote:
>>>
>>>> Thanks Knut, I tried with dataValueSets and got exactly the same
>>>> error. Below is what my curl request looked like.
>>>>
>>>> curl -d @file.name.csv "http://myHostName/api/26/dataValueSets; -X
>>>> POST "Content-Type: application/csv" -u username:password
>>>>
>>>>
>>>> *The result*
>>>>
>>>>
>>>> {"httpStatus":"Unsupported Media
>>>> Type","httpStatusCode":415,"status":"ERROR","message":"Content type
>>>> 'application/x-www-form-urlencoded' not supported"}curl: (6) Could not
>>>> resolve host: Content-Type
>>>>
>>>>
>>>> Please what do I need to look into again?
>>>>
>>>> Is the format of the curl request correct?
>>>>
>>>> Is there something I need to set on my DHIS instance to make it support
>>>> such operations?
>>>>
>>>>
>>>>
>>>> On Wed, Jul 4, 2018 at 8:21 AM Knut Staring  wrote:
>>>>
>>>>> Hi Leke, are you sending METADATA or DATA VALUES?
>>>>>
>>>>> If the latter, you need to use dataValueSets:
>>>>>
>>>>> https://docs.dhis2.org/master/en/developer/html/webapi_data_values.html#webapi_sending_data_values
>>>>>
>>>>> Knut
>>>>>
>>>>> On Wed, Jul 4, 2018 at 5:58 AM Olaleke Seweje 
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I am trying to upload data via CURL as specified in the dev docs - 
>>>>>> 1.9.2. Creating
>>>>>> and updating objects. My request is as follows:
>>>>>>
>>>>>>
>>>>>> curl -d @file._name.csv "http://myHostName/api/26/dataElements; -X
>>>>>> POST "Content-Type: application/csv" -u username:password
>>>>>>
>>>>>>
>>>>>>
>>>>>> *The response I got was *
>>>>>>
>>>>>>
>>>>>> {"httpStatus":"Unsupported Media
>>>>>> Type","httpStatusCode":415,"status":"ERROR","message":"Content type
>>>>>> 'application/x-www-form-urlencoded' not supported"}curl: (6) Could not
>>>>>> resolve host: Content-Type
>>>>>>
>>>>>> I have tried content type text/csv as well but got similar results.
>>>>>>
>>>>>> My questions
>>>>>> 1. Is my endpoint http://myHostName/api/26/dataElements the correct
>>>>>> one for uploading data values via API?
>>>>>>
>>>>>> 2. Is the request format correct?
>>>>>>
>>>>>> 3. Is there something I n

Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Vladimer Shioshvili
Leke,

While it's good to use --data-binary, in your curl calls in both examples,
you are missing -H switch in front of the content type (look at the example
Knut provided), which makes it default to application/x-www-form-urlencoded.
Make sure you include -H;

Knut (and others), Leke's original question mentioned dataElements, and it
got me looking too, and i noticed that while the documentation talks about
columns for the metadata csv content, it never gives the API endpoints for
importing metadata using CSV. Is that even possible? There are classes to
handle it in the code, and I know import/export app does it (i've used it),
but what about API?

Vlad

On Wed, Jul 4, 2018 at 5:45 AM Knut Staring  wrote:

> Hi Leke, according to the link I sent you have to use --data-binary as in
> this request:
>
> curl --data-binary @datavalueset.csv 
> "https://play.dhis2.org/demo/24/api/dataValueSets;
>   -H "Content-Type:application/csv" -u admin:district -v
>
> Knut
>
> On Wed, Jul 4, 2018 at 11:35 AM Olaleke Seweje 
> wrote:
>
>> Thanks Knut, I tried with dataValueSets and got exactly the same error.
>> Below is what my curl request looked like.
>>
>> curl -d @file.name.csv "http://myHostName/api/26/dataValueSets; -X POST
>> "Content-Type: application/csv" -u username:password
>>
>>
>> *The result*
>>
>>
>> {"httpStatus":"Unsupported Media
>> Type","httpStatusCode":415,"status":"ERROR","message":"Content type
>> 'application/x-www-form-urlencoded' not supported"}curl: (6) Could not
>> resolve host: Content-Type
>>
>>
>> Please what do I need to look into again?
>>
>> Is the format of the curl request correct?
>>
>> Is there something I need to set on my DHIS instance to make it support
>> such operations?
>>
>>
>>
>> On Wed, Jul 4, 2018 at 8:21 AM Knut Staring  wrote:
>>
>>> Hi Leke, are you sending METADATA or DATA VALUES?
>>>
>>> If the latter, you need to use dataValueSets:
>>>
>>> https://docs.dhis2.org/master/en/developer/html/webapi_data_values.html#webapi_sending_data_values
>>>
>>> Knut
>>>
>>> On Wed, Jul 4, 2018 at 5:58 AM Olaleke Seweje 
>>> wrote:
>>>
 Hi all,

 I am trying to upload data via CURL as specified in the dev docs - 1.9.2. 
 Creating
 and updating objects. My request is as follows:


 curl -d @file._name.csv "http://myHostName/api/26/dataElements; -X
 POST "Content-Type: application/csv" -u username:password



 *The response I got was *


 {"httpStatus":"Unsupported Media
 Type","httpStatusCode":415,"status":"ERROR","message":"Content type
 'application/x-www-form-urlencoded' not supported"}curl: (6) Could not
 resolve host: Content-Type

 I have tried content type text/csv as well but got similar results.

 My questions
 1. Is my endpoint http://myHostName/api/26/dataElements the correct
 one for uploading data values via API?

 2. Is the request format correct?

 3. Is there something I need to set on my DHIS instance to make it
 support such operations?

 Thanks for your help.


 --
 Regards,
 Leke Seweje
 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-d...@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp

>>>
>>>
>>> --
>>> Knut Staring
>>>
>>> Department of Information, Evidence and Research
>>> World Health Organization, Geneva, Switzerland
>>> Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
>>> Skype: knutstar
>>>
>>
>>
>> --
>> Regards,
>> Leke Seweje
>>
>
>
> --
> Knut Staring
>
> Department of Information, Evidence and Research
> World Health Organization, Geneva, Switzerland
> Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
> Skype: knutstar
> ___
> 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
>
___
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


Re: [Dhis2-users] Data Import

2017-10-05 Thread Vladimer Shioshvili
Felimone, are you sure it is not data element scheme, because if you are
logging in as a super user, you should not have permission issues. Does
your input file have UIDs? As Gerald mentioned, UID is the default coding
scheme.

On Thu, Oct 5, 2017 at 6:52 AM Amone Junior. Felimone <
amone.felim...@manhica.net> wrote:

> Hi Vlad,
>
> Thanks, yes im getting the error for all data elements, which permission
> exactly should i check? i'm logged as a superuser and im still getting the
> same errors
>
> On Tue, Oct 3, 2017 at 9:04 PM, Vladimer Shioshvili <vshioshv...@gmail.com
> > wrote:
>
>> Felimone,
>>
>> Are you getting it for all data elements, or just the header? Because, it
>> is expected for the header. Otherwise, make sure you are using data element
>> schema correctly - default is UID, if you are using code or name, make sure
>> to select it. Next thing would be to look at permissions.
>>
>> Best,
>> Vlad
>>
>> On Tue, Oct 3, 2017 at 5:36 AM Amone Junior. Felimone <
>> amone.felim...@manhica.net> wrote:
>>
>>> Dear all,
>>>
>>> Im trying to import data values to a DHIS2 instance, but i get the
>>> message "Data element not found or not accessible", i get this message
>>> trying to import using the import tool with a CSV file, and using the Web
>>> API.
>>> In another thread someone suggested to set the external access to view
>>> and edit, but the button ediit is disabled as shown in the picture
>>>
>>> --
>>>
>>> Felimone Amone Junior
>>>
>>> Data Manager
>>>
>>> Centro de Investigação em Saúde de Manhiça (CISM)
>>>
>>> Tel./Fax: (+258) 21 81 00 02/181
>>>
>>> CP 1929 Maputo - Moçambique
>>>
>>> Página Web: www.manhica.org
>>>
>>> E-mail: amone.felim...@manhica.net <em...@manhica.net>
>>>
>>>
>>> DISCLAIMER:
>>>
>>> Esta mensagem pode conter dados confidenciais e/ou privados. Se recebeu
>>> a mensagem por erro, queira informar-nos respondendo a este e-mail e
>>> elimina-lo de seguida do seu sistema. Muito obrigado pela sua cooperação.
>>>
>>> CISM - Centro de Investigação em Saúde de Manhiça
>>>
>>> This message may contain confidential and/or privileged information. If
>>> you have recived this message in error, please notify us immediatly by
>>> respondig to this e-mail and then delete it from your system. Thank for
>>> your cooperation.
>>>
>>> By CISM - Centro de Investigação em Saúde de Manhiça
>>>
>>> ___
>>> 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
>>>
>>
>
>
> --
>
> Felimone Amone Junior
>
> Data Manager
>
> Centro de Investigação em Saúde de Manhiça (CISM)
>
> Tel./Fax: (+258) 21 81 00 02/181
>
> CP 1929 Maputo - Moçambique
>
> Página Web: www.manhica.org
>
> E-mail: amone.felim...@manhica.net <em...@manhica.net>
>
>
> DISCLAIMER:
>
> Esta mensagem pode conter dados confidenciais e/ou privados. Se recebeu a
> mensagem por erro, queira informar-nos respondendo a este e-mail e
> elimina-lo de seguida do seu sistema. Muito obrigado pela sua cooperação.
>
> CISM - Centro de Investigação em Saúde de Manhiça
>
> This message may contain confidential and/or privileged information. If
> you have recived this message in error, please notify us immediatly by
> respondig to this e-mail and then delete it from your system. Thank for
> your cooperation.
>
> By CISM - Centro de Investigação em Saúde de Manhiça
>
>
___
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


Re: [Dhis2-users] Data Import

2017-10-03 Thread Vladimer Shioshvili
Felimone,

Are you getting it for all data elements, or just the header? Because, it
is expected for the header. Otherwise, make sure you are using data element
schema correctly - default is UID, if you are using code or name, make sure
to select it. Next thing would be to look at permissions.

Best,
Vlad

On Tue, Oct 3, 2017 at 5:36 AM Amone Junior. Felimone <
amone.felim...@manhica.net> wrote:

> Dear all,
>
> Im trying to import data values to a DHIS2 instance, but i get the message
> "Data element not found or not accessible", i get this message trying to
> import using the import tool with a CSV file, and using the Web API.
> In another thread someone suggested to set the external access to view and
> edit, but the button ediit is disabled as shown in the picture
>
> --
>
> Felimone Amone Junior
>
> Data Manager
>
> Centro de Investigação em Saúde de Manhiça (CISM)
>
> Tel./Fax: (+258) 21 81 00 02/181
>
> CP 1929 Maputo - Moçambique
>
> Página Web: www.manhica.org
>
> E-mail: amone.felim...@manhica.net 
>
>
> DISCLAIMER:
>
> Esta mensagem pode conter dados confidenciais e/ou privados. Se recebeu a
> mensagem por erro, queira informar-nos respondendo a este e-mail e
> elimina-lo de seguida do seu sistema. Muito obrigado pela sua cooperação.
>
> CISM - Centro de Investigação em Saúde de Manhiça
>
> This message may contain confidential and/or privileged information. If
> you have recived this message in error, please notify us immediatly by
> respondig to this e-mail and then delete it from your system. Thank for
> your cooperation.
>
> By CISM - Centro de Investigação em Saúde de Manhiça
>
> ___
> 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
>
___
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


[Dhis2-users] Users app - invitation action

2017-08-22 Thread Vladimer Shioshvili
Was action dropdown (with option to select "email invitation to create
account") removed from the add new user screen? It's listed in User manual,
but when moving from 2.24 to 2.27, i no longer have it.

[image: image.png]

Thanks,
Vlad
___
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


Re: [Dhis2-users] API call to list all data elements within a dataset

2017-08-17 Thread Vladimer Shioshvili
Jason is right, my suggestion does not work in later versions. Akash's
gives you what I was trying to get:

https://play.dhis2.org/dev/api/dataElements?filter=dataSetElements.dataSet.id:eq:lyLU2wR22tC=id,name,description=false

On Thu, Aug 17, 2017 at 8:45 AM Akash Jindal 
wrote:

> Hi Nick,
>
> I used this one to get the same:
>
>
> /api/dataElements.json?filter=dataSetElements.dataSet.id:eq:Xd0ePcEz1nx=description,id,displayName=false
> 
>
> Regards
> Akash Jindal
>
>
> On Thu, Aug 17, 2017 at 5:55 PM, Shurajit Dutta 
> wrote:
>
>> Hi everyone,
>>
>> Can someone share with me the API call to list all data elements within a
>> dataset, perhaps the uid and name? Though if someone has something already
>> that provides more fields that would also be great.
>>
>> Thanks,
>> Nick
>>
>> ___
>> 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
>>
>>
> ___
> 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
>
___
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


Re: [Dhis2-users] API call to list all data elements within a dataset

2017-08-17 Thread Vladimer Shioshvili
This should get you started:

api/dataElements?filter=dataSets.id:eq:DATASET_UID


On Thu, Aug 17, 2017 at 8:26 AM Shurajit Dutta 
wrote:

> Hi everyone,
>
> Can someone share with me the API call to list all data elements within a
> dataset, perhaps the uid and name? Though if someone has something already
> that provides more fields that would also be great.
>
> Thanks,
> Nick
> ___
> 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
>
___
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


Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-15 Thread Vladimer Shioshvili
Thanks for confirming.

On Thu, Dec 15, 2016 at 2:07 PM Bob Jolliffe <bobjolli...@gmail.com> wrote:

> Hi Vlad
>
> No it doesn't currently work with adx files.
>
>
> On 15 December 2016 at 18:52, Vladimer Shioshvili <vshioshv...@gmail.com>
> wrote:
>
> Hi Morten,
>
> It does not seem to work with adx message though. Is that right?
>
> Thanks,
> Vlad
>
> On Fri, Dec 9, 2016 at 4:05 AM Lars Helge Øverland <l...@dhis2.org> wrote:
>
> Okay thanks Victor, I can see it now, you are right, compressed files are
> supported ;)
>
> Lars
>
>
> On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia <vgarcia...@gmail.com>
> wrote:
>
> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen <mor...@dhis2.org> wrote:
>
> Hi
>
> Do you get any errors? it should be possible, it will take the first file
> in the zip file and use that (so it would be best to always only have one
> file)
>
> Could you also try with --data-binary instead of -d ?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia <vgarcia...@gmail.com>
> wrote:
>
> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili <vshioshv...@gmail.com>
> wrote:
>
> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland <l...@dhis2.org> wrote:
>
> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> 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
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.n

Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-15 Thread Vladimer Shioshvili
Hi Morten,

It does not seem to work with adx message though. Is that right?

Thanks,
Vlad

On Fri, Dec 9, 2016 at 4:05 AM Lars Helge Øverland <l...@dhis2.org> wrote:

> Okay thanks Victor, I can see it now, you are right, compressed files are
> supported ;)
>
> Lars
>
>
> On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia <vgarcia...@gmail.com>
> wrote:
>
> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen <mor...@dhis2.org> wrote:
>
> Hi
>
> Do you get any errors? it should be possible, it will take the first file
> in the zip file and use that (so it would be best to always only have one
> file)
>
> Could you also try with --data-binary instead of -d ?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia <vgarcia...@gmail.com>
> wrote:
>
> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili <vshioshv...@gmail.com>
> wrote:
>
> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland <l...@dhis2.org> wrote:
>
> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> 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
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>
> ___
> 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
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : h

Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-06 Thread Vladimer Shioshvili
Thanks Lars. It was a human error issue, input i was testing with has
duplicates and i was looking at ignored, and not noticing the delete count.
Thanks!

What would be the level of effort and ability to back port to 2.24 of
supporting compressed files in API?

On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland <l...@dhis2.org> wrote:

> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> 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
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>
___
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


[Dhis2-users] couple questions about dataValueSets API

2016-12-06 Thread Vladimer Shioshvili
1) just to confirm, web api only accets uncompressed file, right? and it's
the import/export app that is capable of handling zip file?

2) does DELETE import strategy work for dataValueSets? I have not been able
to get it to work.

I am running on 2.24, if it makes a difference.

Thanks,
Vlad
___
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