Re: [Dhis2-devs] Cannot get individual values from API

2017-05-01 Thread Lars Helge Øverland
Hi Ramon,

unfortunately the API cannot currently do exactly what you are asking for.

The dataValueSets

API endpoint allows you query by data set and also data element group, if
that is helpful.

Allowing for specifying individual data elements is something we should
offer, so feel free to write an improvement issue at jira.dhis2.org.

best regards,

Lars



On Mon, May 1, 2017 at 4:24 PM, Ramón José Jiménez Pomareta <
dh...@pomareta.ch> wrote:

> Thank you for your quick answer, that works !
>
> But for me it doesn't if I don't specify co. Actually, I have a
> dataElement which is divided in three categories options. And so, I must
> call three times dataValues or simply call for the whole dataSet. In both
> cases I have to do the addition. Is there any option to retrieve a
> dataElement directly without specify category options ?
>
> Thank you so much !
>
> 2017-05-01 12:05 GMT+02:00 Knut Staring :
>
>> I think the demo data have been moved from 2013 to more recent years. Try
>> this:
>>
>> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu
>> =201601=DiszpKrYNg8=Prlt0C1RF0s
>>
>> On Mon, May 1, 2017 at 11:55 AM, Ramón José Jiménez Pomareta <
>> dh...@pomareta.ch> wrote:
>>
>>> Hi,
>>>
>>> I don't know if I didn't get something but I am not be able to retrieve
>>> individual values through the API. The play.dhis2 example doesn't work
>>> neither and it gives me the same answer :
>>>
>>> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201301=DiszpKrYNg8=Prlt0C1RF0s
>>>
>>> {"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
>>>  value does not exist"}
>>>
>>>
>>> Thank you for your answer,
>>>
>>> Ramón Jiménez Pomareta.
>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522 <+47%20918%2080%20522>
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
> ___
> 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
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
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


Re: [Dhis2-devs] Cannot get individual values from API

2017-05-01 Thread Knut Staring
Hi again, I think you could get what you want throgh the Analytics API:

https://docs.dhis2.org/master/en/developer/html/webapi_analytics.html#webapi_analytics_dimensions_and_items

On Mon, May 1, 2017 at 4:24 PM, Ramón José Jiménez Pomareta <
dh...@pomareta.ch> wrote:

> Thank you for your quick answer, that works !
>
> But for me it doesn't if I don't specify co. Actually, I have a
> dataElement which is divided in three categories options. And so, I must
> call three times dataValues or simply call for the whole dataSet. In both
> cases I have to do the addition. Is there any option to retrieve a
> dataElement directly without specify category options ?
>
> Thank you so much !
>
> 2017-05-01 12:05 GMT+02:00 Knut Staring :
>
>> I think the demo data have been moved from 2013 to more recent years. Try
>> this:
>>
>> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu
>> =201601=DiszpKrYNg8=Prlt0C1RF0s
>>
>> On Mon, May 1, 2017 at 11:55 AM, Ramón José Jiménez Pomareta <
>> dh...@pomareta.ch> wrote:
>>
>>> Hi,
>>>
>>> I don't know if I didn't get something but I am not be able to retrieve
>>> individual values through the API. The play.dhis2 example doesn't work
>>> neither and it gives me the same answer :
>>>
>>> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201301=DiszpKrYNg8=Prlt0C1RF0s
>>>
>>> {"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
>>>  value does not exist"}
>>>
>>>
>>> Thank you for your answer,
>>>
>>> Ramón Jiménez Pomareta.
>>>
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522 <+47%20918%2080%20522>
>> Skype: knutstar
>> http://dhis2.org
>>
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
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


Re: [Dhis2-devs] Cannot get individual values from API

2017-05-01 Thread Ramón José Jiménez Pomareta
Thank you for your quick answer, that works !

But for me it doesn't if I don't specify co. Actually, I have a dataElement
which is divided in three categories options. And so, I must call three
times dataValues or simply call for the whole dataSet. In both cases I have
to do the addition. Is there any option to retrieve a dataElement directly
without specify category options ?

Thank you so much !

2017-05-01 12:05 GMT+02:00 Knut Staring :

> I think the demo data have been moved from 2013 to more recent years. Try
> this:
>
> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201601=
> DiszpKrYNg8=Prlt0C1RF0s
>
> On Mon, May 1, 2017 at 11:55 AM, Ramón José Jiménez Pomareta <
> dh...@pomareta.ch> wrote:
>
>> Hi,
>>
>> I don't know if I didn't get something but I am not be able to retrieve
>> individual values through the API. The play.dhis2 example doesn't work
>> neither and it gives me the same answer :
>>
>> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201301=DiszpKrYNg8=Prlt0C1RF0s
>>
>> {"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
>>  value does not exist"}
>>
>>
>> Thank you for your answer,
>>
>> Ramón Jiménez Pomareta.
>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522 <+47%20918%2080%20522>
> Skype: knutstar
> http://dhis2.org
>
___
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


Re: [Dhis2-devs] Bug - cannot schedule events in Tracker Capture

2017-05-01 Thread Sam Johnson
Hi Markus,

Although I tested your fix for this when it was released, and it worked well in 
update 9a5f6d0 (25 April), this bug appears to have returned in the latest 
update 2e93869 (1 May) of 2.26.  What’s odd is that I can’t see any commits to 
the origin/v26 branch of tracker-capture-app since you made that change on 25 
April – is this now possibly a build error, or perhaps an underlying API issue?

This bug is very straightforward to reproduce – just use the calendar icon to 
schedule an event, and it instead creates the event. I’ve updated the existing 
Jira issue (DHIS2-1438) with a 
comment – would it be possible to also re-open this issue?

Another bug also appears to have been introduced in both versions: the ‘Display 
generate event box after completed’ option no longer seems to be working.  This 
should (for repeatable program stages) prompt the user to schedule a future 
event at the appropriate interval – but now nothing happens at all.  (You can 
replicate this on Play Demo in the RMNCH Tracker, by first setting the 
‘standard interval days’ of the ‘Antenatal care visit’ program stage, then 
creating an event and ‘completing’ it – it fails to prompt you to schedule a 
follow-up ‘Antenatal care visit’.)  I’ve logged this as 
DHIS2-1507.

I’d be very grateful if you’re able to find time to look at this again, as 
these two bugs have once again broken the Tracker in 2.26.

Many thanks, Sam.


From: Markus Bekken 
Date: Tuesday, 25 April 2017 at 23:21
To: Sam Johnson 
Cc: DHIS2 Developers , "absolo...@yahoo.com" 
, Immaculate Ayebazibwe 
Subject: Re: [Dhis2-devs] Bug - cannot schedule events in Tracker Capture

Hey Sam!
Thanks for pushing this up the priority list. It was a relatively small fix, 
new versions of 2.26 and 2.27 snapshot are ready to download.

Best regards,
Markus

25. apr. 2017 kl. 17.35 skrev Sam Johnson 
>:

Hi devs,

Just following up on the bug below 
(DHIS2-1438).  I realize Abyot is on 
leave (congratulations! ☺), but this ticket is still assigned to him – is there 
anyone else who might be able to pick this up?

This bug is quite urgent, as it has effectively crippled the Tracker in 2.26.  
But I’m guessing that’s it’s just a case of the wrong code being fired, so 
should hopefully be fairly simple to fix?

Cheers, Sam.


From: Dhis2-devs 
>
 on behalf of Sam Johnson 
>
Date: Tuesday, 18 April 2017 at 19:55
To: Abyot Asalefew Gizaw >, DHIS2 
Developers 
>
Cc: "absolo...@yahoo.com" 
>, Immaculate Ayebazibwe 
>
Subject: [Dhis2-devs] Bug - cannot schedule events in Tracker Capture


This sender failed our fraud detection checks and may not be who they appear to 
be. Learn about spoofing

Feedback

Hi Abyot,

I’ve come across what looks like a new bug introduced into Tracker Capture in 
2.26 – I don’t seem to be able toschedule events.  Although I’ve not used 
periods in my Tracker programs, I’m wondering if the fix discussed in the 
thread below has triggered this new bug?

In 2.26, both the calendar icon and the ‘ask user to create new event when 
stage is complete’ option now generate an open event instead of a scheduled 
event.  (In 2.25, both of these correctly create a scheduled event instead of 
an open event.)  Note that the one thing that still works fine is if the 
booking is auto-generated on enrolment – this still schedules rather than 
creates the event.)

To reproduce this in the Play demo website:
1.  Open Tracker Capture, select Ngelehun CHC, and register a new patient 
for the WHO RMNCH Tracker (first visit = 2017-01-01).
2.  Complete the ‘First antenatal care visit’, which triggers a prompt to 
‘Schedule new event for stage Antenatal care visit’ – a new ‘open’ visit is 
created instead of a scheduled visit (a future ‘open’ event shouldn’t be 
possible!).
3.  Use the ‘+’ icon to create a new event for 2017-02-01 – a new ‘open’ 
visit is correctly created.
4.  Use the calendar icon to schedule a new event (booking) for 2017-03-01 
– a new ‘open’ visit is created, instead of a scheduled visit.

I’ve reported this as https://jira.dhis2.org/browse/DHIS2-1438.  This is an 
extremely important bug, as users in other facilities can only update scheduled 
events 

Re: [Dhis2-devs] Cannot get individual values from API

2017-05-01 Thread Knut Staring
I think the demo data have been moved from 2013 to more recent years. Try
this:

https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201601=DiszpKrYNg8=Prlt0C1RF0s

On Mon, May 1, 2017 at 11:55 AM, Ramón José Jiménez Pomareta <
dh...@pomareta.ch> wrote:

> Hi,
>
> I don't know if I didn't get something but I am not be able to retrieve
> individual values through the API. The play.dhis2 example doesn't work
> neither and it gives me the same answer :
>
> https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201301=DiszpKrYNg8=Prlt0C1RF0s
>
> {"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
>  value does not exist"}
>
>
> Thank you for your answer,
>
> Ramón Jiménez Pomareta.
>
>
> ___
> 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
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
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


[Dhis2-devs] Cannot get individual values from API

2017-05-01 Thread Ramón José Jiménez Pomareta
Hi,

I don't know if I didn't get something but I am not be able to retrieve
individual values through the API. The play.dhis2 example doesn't work
neither and it gives me the same answer :

https://play.dhis2.org/demo/api/24/dataValues?de=s46m5MS0hxu=201301=DiszpKrYNg8=Prlt0C1RF0s

{"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
value does not exist"}


Thank you for your answer,

Ramón Jiménez Pomareta.
___
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