Re: [Dhis2-devs] API not showing 401 Unauthorized error

2018-04-19 Thread Rangarirai Matavire
By the way, its not just the error response code that is worrying, but also
the loop of redirects that starts, this makes it difficult to handle the
response for an http client. To see this loop of redirects, you can add -L
to curl as below.

curl -I -L -u admin:distric -H 'Accept: application/json'
https://play.dhis2.org/2.28/api/me

I think this behaviour should be corrected as it may lead to unexpected
behaviour of apps.

Regards

On Wed, Apr 18, 2018 at 11:10 PM, Rangarirai Matavire 
wrote:

> Hi Devs,
>
> I am wondering whether the behaviour I am seeing is a bug or something to
> be expected due to some change.
>
> When I run the following curl command:
>
> curl -I -u admin:distric -H 'Accept: application/json'
> https://play.dhis2.org/2.29/api/me
>
> I get an HTTP 302 response. Note that I have deliberately set the password
> wrong so I can mock a 401 unauthorized response. I get the same response
> when I run the command on version 2.28. However, as expected, when I run it
> on 2.27, 2.26 etc I get a 401 HTTP response.
>
> I hope someone can assist.
>
> Regards,
>
> Ranga
>
___
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] WEB API Error in DHIS2.30

2018-04-19 Thread Ocaya Stephen
Please note that 2.30 has not yet been officially released. But think the
developers will look into fixing this issue.

regards

On Thu, Apr 19, 2018 at 11:17 PM, Adebusoye Anifalaje  wrote:

> Hi Mahdi,
> I am forwarding your request to the user list. This is the appropriate
> forum for asking these sort of questions.
>
> Best.
> Busoye.
>
> -- Forwarded message -
> From: mahdi asgari 
> Date: Thu, 19 Apr 2018 at 20:25
> Subject: WEB API Error in DHIS2.30
> To: 
>
>
> Hi dear adebusoye
>
> I am using dhis2 version 2.30, compiled from github (last version),
> When i try to create trackedEntity, i get the following error
> I seem's TrackedEntity has been removed from TrackedEntityInstance
> how i can fix the problem.
>
> ERROR:
> {"httpStatus":"Internal Server Error","httpStatusCode":500,"
> status":"ERROR","message":"Unrecognized field \"trackedEntity\" (class
> org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance), not
> marked as ignorable (14 known properties: \"trackedEntityInstance\",
> \"lastUpdatedAtClient\", \"lastUpdated\", \"createdAtClient\",
> \"trackedEntityType\", \"orgUnit\", \"inactive\", \"enrollments\",
> \"featureType\", \"attributes\", \"deleted\", \"relationships\",
> \"created\", \"coordinates\"])\n at [Source: {\"trackedEntityInstance\":
> \"IKjF4BZg3hb\",\"trackedEntity\": \"nEenWmSyUEp\",\"orgUnit\":
> \"iq6Pt6QzM4d\",\"trackedEntityType\": \"MCPQUTHX1Ze\",\"attributes\"
> :[{\"attribute\":\"spFvx9FndA4\",\"value\":\"53\"},{\"attribute\":\"
> w75KJ2mc4zz\",\"value\":\"\"},{\"attribute\":\"
> hqtiQfZ66yc\",\"value\":\"??\"},{\"attribute\":\"
> zDhUuAYrxNC\",\"value\":\"\"},{\"attribute\":\"
> AuPLng5hLbE\",\"value\":\"51961113\"},{\"attribute\":\"
> EO4ms2Ju3nf\",\"value\":\"1\"},{\"attribute\":\"gHGyrwKPzej\
> ",\"value\":\"2013-09-17\"},{\"attribute\":\"P2cwLGskgxn\",\
> "value\":\"123\"},{\"attribute\":\"Agywv2JGwuq\",\"
> value\":\"\"}],\"enrollments\":[{\"orgUnit\":
> \"iq6Pt6QzM4d\",\"program\": \"LaWt5AR1tfl\",\"enrollmentDate\":
> \"2013-09-17\",\"incidentDate\": \"2013-09-17\"}]}; line: 1, column: 59]
> (through reference chain: org.hisp.dhis.dxf2.events.trackedentity.
> TrackedEntityInstance[\"trackedEntity\"])"}
>
> JSON DATA:
> {"trackedEntityInstance": "IKjF4BZg3hb","orgUnit":
> "iq6Pt6QzM4d","trackedEntity":"lp7Kq6QzS4d","trackedEntityType":
> "MCPQUTHX1Ze","attributes":[{"attribute":"spFvx9FndA4","
> value":"53","attribute":"w75KJ2mc4zz","value":"","
> attribute":"hqtiQfZ66yc","value":"??","attribute":"
> zDhUuAYrxNC","value":"","attribute":"AuPLng5hLbE","
> value":"51961113","attribute":"EO4ms2Ju3nf","value":"1","
> attribute":"gHGyrwKPzej","value":"2013-09-17","attribute":"P2cwLGskgxn","
> value":"123","attribute":"Agywv2JGwuq","value":""}],"enrollments":[{"orgUnit":
> "iq6Pt6QzM4d","program": "LaWt5AR1tfl","enrollmentDate":
> "2013-09-17","incidentDate": "2013-09-17"}]}
>
> thanks in advanced
> --
> Forgive the typos. Using handheld device
>
> ___
> 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
>
>


-- 
--
*Stephen Ocaya*
Tel: +256 393 217 892 | Mob: +256774558980
www.stephocay.com
SkypeID: stephocay
___
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] Fwd: WEB API Error in DHIS2.30

2018-04-19 Thread mahdi asgari
-- Forwarded message --
From: mahdi asgari 
Date: Thu, Apr 19, 2018 at 11:55 PM
Subject: WEB API Error in DHIS2.30
To: bus...@baosystems.com


Hi dear adebusoye

I am using dhis2 version 2.30, compiled from github (last version),
When i try to create trackedEntity with weeb api, i get the following error
It seem's TrackedEntity has been removed from TrackedEntityInstance class
how can i fix the problem?

ERROR:
{"httpStatus":"Internal Server Error","httpStatusCode":500,"
status":"ERROR","message":"Unrecognized field \"trackedEntity\" (class
org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance), not marked
as ignorable (14 known properties: \"trackedEntityInstance\",
\"lastUpdatedAtClient\", \"lastUpdated\", \"createdAtClient\",
\"trackedEntityType\", \"orgUnit\", \"inactive\", \"enrollments\",
\"featureType\", \"attributes\", \"deleted\", \"relationships\",
\"created\", \"coordinates\"])\n at [Source: {\"trackedEntityInstance\":
\"IKjF4BZg3hb\",\"trackedEntity\": \"nEenWmSyUEp\",\"orgUnit\":
\"iq6Pt6QzM4d\",\"trackedEntityType\": \"MCPQUTHX1Ze\",\"attributes\"
:[{\"attribute\":\"spFvx9FndA4\",\"value\":\"53\"},{\"attribute\":\"
w75KJ2mc4zz\",\"value\":\"\"},{\"attribute\":\"
hqtiQfZ66yc\",\"value\":\"??\"},{\"attribute\":\"
zDhUuAYrxNC\",\"value\":\"\"},{\"attribute\":\"
AuPLng5hLbE\",\"value\":\"51961113\"},{\"attribute\":\"
EO4ms2Ju3nf\",\"value\":\"1\"},{\"attribute\":\"gHGyrwKPzej\
",\"value\":\"2013-09-17\"},{\"attribute\":\"P2cwLGskgxn\",\
"value\":\"123\"},{\"attribute\":\"Agywv2JGwuq\",\"
value\":\"\"}],\"enrollments\":[{\"orgUnit\": \"iq6Pt6QzM4d\",\"program\":
\"LaWt5AR1tfl\",\"enrollmentDate\": \"2013-09-17\",\"incidentDate\":
\"2013-09-17\"}]}; line: 1, column: 59] (through reference chain:
org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance[\"
trackedEntity\"])"}

JSON DATA:
{"trackedEntityInstance": "IKjF4BZg3hb","orgUnit":
"iq6Pt6QzM4d","trackedEntity":"lp7Kq6QzS4d","trackedEntityType":
"MCPQUTHX1Ze","attributes":[{"attribute":"spFvx9FndA4","
value":"53"},{"attribute":"w75KJ2mc4zz","value":""},{"
attribute":"hqtiQfZ66yc","value":"??"},{"attribute":"
zDhUuAYrxNC","value":""},{"attribute":"AuPLng5hLbE","
value":"51961113"},{"attribute":"EO4ms2Ju3nf","value":"1"},{"
attribute":"gHGyrwKPzej","value":"2013-09-17"},{"attribute":"P2cwLGskgxn","
value":"123"},{"attribute":"Agywv2JGwuq","value":""}],"enrollments":[{"orgUnit":
"iq6Pt6QzM4d","program": "LaWt5AR1tfl","enrollmentDate":
"2013-09-17","incidentDate": "2013-09-17"}]}

thanks in advanced
___
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] WEB API Error in DHIS2.30

2018-04-19 Thread Adebusoye Anifalaje
Hi Mahdi,
I am forwarding your request to the user list. This is the appropriate
forum for asking these sort of questions.

Best.
Busoye.

-- Forwarded message -
From: mahdi asgari 
Date: Thu, 19 Apr 2018 at 20:25
Subject: WEB API Error in DHIS2.30
To: 


Hi dear adebusoye

I am using dhis2 version 2.30, compiled from github (last version),
When i try to create trackedEntity, i get the following error
I seem's TrackedEntity has been removed from TrackedEntityInstance
how i can fix the problem.

ERROR:
{"httpStatus":"Internal Server
Error","httpStatusCode":500,"status":"ERROR","message":"Unrecognized field
\"trackedEntity\" (class
org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance), not marked
as ignorable (14 known properties: \"trackedEntityInstance\",
\"lastUpdatedAtClient\", \"lastUpdated\", \"createdAtClient\",
\"trackedEntityType\", \"orgUnit\", \"inactive\", \"enrollments\",
\"featureType\", \"attributes\", \"deleted\", \"relationships\",
\"created\", \"coordinates\"])\n at [Source: {\"trackedEntityInstance\":
\"IKjF4BZg3hb\",\"trackedEntity\": \"nEenWmSyUEp\",\"orgUnit\":
\"iq6Pt6QzM4d\",\"trackedEntityType\":
\"MCPQUTHX1Ze\",\"attributes\":[{\"attribute\":\"spFvx9FndA4\",\"value\":\"53\"},{\"attribute\":\"w75KJ2mc4zz\",\"value\":\"\"},{\"attribute\":\"hqtiQfZ66yc\",\"value\":\"??\"},{\"attribute\":\"zDhUuAYrxNC\",\"value\":\"\"},{\"attribute\":\"AuPLng5hLbE\",\"value\":\"51961113\"},{\"attribute\":\"EO4ms2Ju3nf\",\"value\":\"1\"},{\"attribute\":\"gHGyrwKPzej\",\"value\":\"2013-09-17\"},{\"attribute\":\"P2cwLGskgxn\",\"value\":\"123\"},{\"attribute\":\"Agywv2JGwuq\",\"value\":\"\"}],\"enrollments\":[{\"orgUnit\":
\"iq6Pt6QzM4d\",\"program\": \"LaWt5AR1tfl\",\"enrollmentDate\":
\"2013-09-17\",\"incidentDate\": \"2013-09-17\"}]}; line: 1, column: 59]
(through reference chain:
org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance[\"trackedEntity\"])"}

JSON DATA:
{"trackedEntityInstance": "IKjF4BZg3hb","orgUnit":
"iq6Pt6QzM4d","trackedEntity":"lp7Kq6QzS4d","trackedEntityType":
"MCPQUTHX1Ze","attributes":[{"attribute":"spFvx9FndA4","value":"53","attribute":"w75KJ2mc4zz","value":"","attribute":"hqtiQfZ66yc","value":"??","attribute":"zDhUuAYrxNC","value":"","attribute":"AuPLng5hLbE","value":"51961113","attribute":"EO4ms2Ju3nf","value":"1","attribute":"gHGyrwKPzej","value":"2013-09-17","attribute":"P2cwLGskgxn","value":"123","attribute":"Agywv2JGwuq","value":""}],"enrollments":[{"orgUnit":
"iq6Pt6QzM4d","program": "LaWt5AR1tfl","enrollmentDate":
"2013-09-17","incidentDate": "2013-09-17"}]}

thanks in advanced
-- 
Forgive the typos. Using handheld device
___
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] Reserving unique Case ID attributes in Tracker - duplicates encountered when reserving via Android

2018-04-19 Thread Calle Hedberg
Hi

Note also that Tracker Capture did not open up before both 100 reserved
value batches had been created - so it took around 4 min for the login

Regards
Calle

On 19 April 2018 at 16:13, Calle Hedberg  wrote:

> Markus,
>
> I think this must have been caused by a hibernate caching delay. I deleted
> the additional records created by Tracker Capture now (after logging out
> from Tracker Capture), and then logged in with TC again - and this time the
> system actually generated 200 reserved values in two batches:
> - the first batch of 100 reserved values were created within 20 seconds
> - after 3 minutes, another batch of 100 reserved values were created, and
> this also took less than 20 sec
> AND, more importantly, none of the 200 new values were among those
> pre-existing in the ...ReservedValues table.
>
> So my conclusion is that the only safe route after inserting
> reservedvalues directly is to re-start the server and thus make sure all
> caches are flushed BEFORE anybody can log in from a remote device.
>
> Regards
> Calle
>
>
> On 19 April 2018 at 14:25, Markus Bekken  wrote:
>
>> Hey Calle,
>> we haven't really documented how this behaves when you do manual inserts
>> of reseved values. Assuming the db insert did the same as a API reservation
>> would have done, and that no caching is interfering what hibernate sees -
>> the 100 new reserved values should not be among those preexisting in the
>> TrackedEntityAttributeReservedValues.
>>
>> Markus
>>
>> 19. apr. 2018 kl. 13:26 skrev Calle Hedberg :
>>
>> Hi,
>>
>> In 2.28. the table "TrackedEntityAttributeReservedValues" is storing
>> unique ID values that have been reserved. When a request is coming from
>> e.g. an Android device running Tracker Capture, the API will trigger the
>> reservation of 100 values and return these to the device while also storing
>> the reserved values in the above table.
>>
>> Yesterday, I inserted a list of such reserved values into that table in
>> order to "protect" a section of numbers that will be used for importing
>> legacy data.
>>
>> I then decided to verify that those case IDs WERE now actually reserved.
>>
>> 1.
>> when using the normal browser Tracker Capture, it clearly worked - no
>> case IDs coming up were in the reserved range
>>
>> 2.
>> But when I fired up Android Tracker Capture and logged in afresh, the
>> system did reserve 100 more values BUT a number of those were values
>> already in the TrackedEntityAttributeReservedValues table.
>>
>> Or in other words, it seems like a request for reserved values from
>> Tracker Capture via the API will generate reserved values without checking
>> if those values are reserved already - is that correct?
>>
>> Regards
>> Calle
>>
>> --
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>> 
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19119
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>> ___
>> 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
>>
>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19119
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Reserving unique Case ID attributes in Tracker - duplicates encountered when reserving via Android

2018-04-19 Thread Calle Hedberg
Markus,

I think this must have been caused by a hibernate caching delay. I deleted
the additional records created by Tracker Capture now (after logging out
from Tracker Capture), and then logged in with TC again - and this time the
system actually generated 200 reserved values in two batches:
- the first batch of 100 reserved values were created within 20 seconds
- after 3 minutes, another batch of 100 reserved values were created, and
this also took less than 20 sec
AND, more importantly, none of the 200 new values were among those
pre-existing in the ...ReservedValues table.

So my conclusion is that the only safe route after inserting reservedvalues
directly is to re-start the server and thus make sure all caches are
flushed BEFORE anybody can log in from a remote device.

Regards
Calle


On 19 April 2018 at 14:25, Markus Bekken  wrote:

> Hey Calle,
> we haven't really documented how this behaves when you do manual inserts
> of reseved values. Assuming the db insert did the same as a API reservation
> would have done, and that no caching is interfering what hibernate sees -
> the 100 new reserved values should not be among those preexisting in the
> TrackedEntityAttributeReservedValues.
>
> Markus
>
> 19. apr. 2018 kl. 13:26 skrev Calle Hedberg :
>
> Hi,
>
> In 2.28. the table "TrackedEntityAttributeReservedValues" is storing
> unique ID values that have been reserved. When a request is coming from
> e.g. an Android device running Tracker Capture, the API will trigger the
> reservation of 100 values and return these to the device while also storing
> the reserved values in the above table.
>
> Yesterday, I inserted a list of such reserved values into that table in
> order to "protect" a section of numbers that will be used for importing
> legacy data.
>
> I then decided to verify that those case IDs WERE now actually reserved.
>
> 1.
> when using the normal browser Tracker Capture, it clearly worked - no case
> IDs coming up were in the reserved range
>
> 2.
> But when I fired up Android Tracker Capture and logged in afresh, the
> system did reserve 100 more values BUT a number of those were values
> already in the TrackedEntityAttributeReservedValues table.
>
> Or in other words, it seems like a request for reserved values from
> Tracker Capture via the API will generate reserved values without checking
> if those values are reserved already - is that correct?
>
> Regards
> Calle
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
> 
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19119
>
> Email: calle.hedb...@gmail.com
>
> Skype: calle_hedberg
>
> ***
>
> ___
> 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
>
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Reserving unique Case ID attributes in Tracker - duplicates encountered when reserving via Android

2018-04-19 Thread Markus Bekken
Hey Calle, 
we haven't really documented how this behaves when you do manual inserts of 
reseved values. Assuming the db insert did the same as a API reservation would 
have done, and that no caching is interfering what hibernate sees - the 100 new 
reserved values should not be among those preexisting in the 
TrackedEntityAttributeReservedValues. 

Markus 

> 19. apr. 2018 kl. 13:26 skrev Calle Hedberg :
> 
> Hi,
> 
> In 2.28. the table "TrackedEntityAttributeReservedValues" is storing unique 
> ID values that have been reserved. When a request is coming from e.g. an 
> Android device running Tracker Capture, the API will trigger the reservation 
> of 100 values and return these to the device while also storing the reserved 
> values in the above table.
> 
> Yesterday, I inserted a list of such reserved values into that table in order 
> to "protect" a section of numbers that will be used for importing legacy 
> data. 
> 
> I then decided to verify that those case IDs WERE now actually reserved.
> 
> 1. 
> when using the normal browser Tracker Capture, it clearly worked - no case 
> IDs coming up were in the reserved range
> 
> 2.
> But when I fired up Android Tracker Capture and logged in afresh, the system 
> did reserve 100 more values BUT a number of those were values already in the 
> TrackedEntityAttributeReservedValues table.
> 
> Or in other words, it seems like a request for reserved values from Tracker 
> Capture via the API will generate reserved values without checking if those 
> values are reserved already - is that correct?
> 
> Regards
> Calle
> 
> -- 
> *** <>
> Calle Hedberg
> 
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
> 
> Tel/fax (home): +27-21-685-6472
> 
> Cell: +27-82-853-5352
> 
> Iridium SatPhone: +8816-315-19119
> 
> Email: calle.hedb...@gmail.com 
> Skype: calle_hedberg
> 
> ***
> 
> 
> ___
> 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

___
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] Reserving unique Case ID attributes in Tracker - duplicates encountered when reserving via Android

2018-04-19 Thread Calle Hedberg
Hi,

In 2.28. the table "TrackedEntityAttributeReservedValues" is storing unique
ID values that have been reserved. When a request is coming from e.g. an
Android device running Tracker Capture, the API will trigger the
reservation of 100 values and return these to the device while also storing
the reserved values in the above table.

Yesterday, I inserted a list of such reserved values into that table in
order to "protect" a section of numbers that will be used for importing
legacy data.

I then decided to verify that those case IDs WERE now actually reserved.

1.
when using the normal browser Tracker Capture, it clearly worked - no case
IDs coming up were in the reserved range

2.
But when I fired up Android Tracker Capture and logged in afresh, the
system did reserve 100 more values BUT a number of those were values
already in the TrackedEntityAttributeReservedValues table.

Or in other words, it seems like a request for reserved values from Tracker
Capture via the API will generate reserved values without checking if those
values are reserved already - is that correct?

Regards
Calle

-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Get number of days between two event dates in different program stages

2018-04-19 Thread Calle Hedberg
Hi

DHIS2 does not currently support V{event_date} for a specific stage - it
will always pick the anchor/report date for the most current event.

This is supposed to be fixed in 2.30 - see JIRA issue DHIS2-1397

Regards
Calle

On 19 April 2018 at 06:13, Marko David Garcia 
wrote:

> Hello friends!.
> Is there a solution for 2.25 version?.
> Thank you very much.
> Regards.
>
> Cordialmente,
>
> *Marko David Garcia M.*
> *Skype: marko_david*
>
> 2018-04-11 1:54 GMT-05:00 Edouard Lavaud :
>
>> Hi Rady,
>>
>> I used a kind of hack for doing that:
>>
>> I first used a program rule to copy the event_date into a new data
>> element of the program stage (so, yup, the date is kind of duplicated
>> in the stage).
>>
>> However then I could create a program rule variable to fetch this date
>> I wanted, and compare it with another one.
>>
>> Hope this could help.
>>
>> Best,
>>
>> Edouard
>>
>> 2018-04-11 6:39 UTC+02:00, Rady :
>> > Hello DHIS2 community,
>> >
>> > I have a doubt how to get number of days between two event dates in
>> > different program stages. For example,
>> > *d2:daysBetween(programstage1.V{event_date},programstage2.V{
>> event_date})*.
>> >
>> > Anybody used to have experience on this? please help.
>> >
>> > Thanks,
>> > Rady
>> >
>>
>>
>> --
>> *Edouard Lavaud, *
>>
>>
>>
>> *MSc in Health Policy, Planning & FinancingMEng in
>> TelecommunicationUniversity Diploma in ICT for Health*
>> *Email:* edouard.lav...@gmail.com
>> *Mobile:* 0033 6 7210 23 59
>>
>> ___
>> 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
>>
>
>
> ___
> 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
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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] Querying Events API for a data value

2018-04-19 Thread David Huser
Hi,

Is there a way to filter the Event API for a data value (to only return
events where it matches to the value)?

What I tried:

   - Variations of this (undocumented) call but get events back where the
   value != 12  --
   
https://play.dhis2.org/2.29/api/events.json?program=q04UBOqq3rp=lsJCUffec9h:eq:12

   - /api/analytics/events/query/programUID.json?dimension=... works but
   this has two shortcomings: Analytics need to be run and dimension/period
   restrictions where I need the response instantly, across all periods.

Happy to create a JIRA issue if requested.

Best,
David


-- 


*David Huser*
DHIS2 Support Specialist
dhu...@baosystems.com | https://baosystems.com |  2900 K Street, Suite 507,
Washington D.C. 20007
___
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