[Dhis2-users] (API) Ordering analytics results

2017-08-10 Thread Martin Van Aken
We want to retreive the 5 entities with the highest values for a given
period and data element. I can retreive all values easily with an analytics
call, but is there any way to order the results on the values (I can then
limit the call to five entities).

I saw example of "order" or "defaultOrder" clauses, but those were all
related to meta data - in my case I want to order values.

Any help would be most welcome,

Thanks,

Martin



-- 
*Martin Van Aken - **Freelance Enthusiast Developer*

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken 
Call me on Skype : vanakenm
Hang out with me : mar...@joyouscoding.com
Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken
Company website : www.joyouscoding.com
___
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] how to create aggregate value from tracker

2017-08-10 Thread channara rin
hi Em,
thank you for reply.
by the way, i can't catch what you guide me.
i tried find out where can connect program indicator with specific data
element?
And how to use script to sync?

Best thank
Channara


On Aug 10, 2017 7:19 PM, "Em Le Hong"  wrote:

Hi Channara,

The aggregate query builder was replaced by Program Indicator. You can use
Program Indicator in analytic tools like using Aggregate Data Element.
However, if you want to keep aggregate data elements and link them with
Tracker data, there are some steps you can do:

   - Create Program Indicator which is corresponding with your aggregate
   data element. Use script to sync Program Indicator and aggregate data
   element.
   - If you don't know how to use script, you can export Program Indicator
   value, modify it and use Import/Export module to import to your system (*NOT
   RECOMMEND*)

Some experiences share to you, hope it can be helpful for you!

Regards,



On Thu, Aug 10, 2017 at 5:36 PM, channara rin 
wrote:

> Hi all,
> i am newbie with 2.26/2.27.
> do you know how to create aggregate value from tracker with registration
> to input value into specific data element?
> can you show in brief?
>
> thank you so much
> channara
>
> ___
> 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
>
>


-- 
*Em Le Hong*
DHIS2 Implementation| *HISP Vietnam *
em.hispviet...@gmail.com | *Skype:* em.hispviet...@gmail.com
___
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] how to create aggregate value from tracker

2017-08-10 Thread Em Le Hong
Hi Channara,

The aggregate query builder was replaced by Program Indicator. You can use
Program Indicator in analytic tools like using Aggregate Data Element.
However, if you want to keep aggregate data elements and link them with
Tracker data, there are some steps you can do:

   - Create Program Indicator which is corresponding with your aggregate
   data element. Use script to sync Program Indicator and aggregate data
   element.
   - If you don't know how to use script, you can export Program Indicator
   value, modify it and use Import/Export module to import to your system (*NOT
   RECOMMEND*)

Some experiences share to you, hope it can be helpful for you!

Regards,



On Thu, Aug 10, 2017 at 5:36 PM, channara rin 
wrote:

> Hi all,
> i am newbie with 2.26/2.27.
> do you know how to create aggregate value from tracker with registration
> to input value into specific data element?
> can you show in brief?
>
> thank you so much
> channara
>
> ___
> 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
>
>


-- 
*Em Le Hong*
DHIS2 Implementation| *HISP Vietnam *
em.hispviet...@gmail.com | *Skype:* em.hispviet...@gmail.com
___
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] how to create aggregate value from tracker

2017-08-10 Thread channara rin
Hi all,
i am newbie with 2.26/2.27.
do you know how to create aggregate value from tracker with registration to
input value into specific data element?
can you show in brief?

thank you so much
channara
___
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] d2: daysbetween AND d2:yearsbetween not working properly in 2.27 build revision b6e8cde

2017-08-10 Thread Markus Bekken
Hi Georgi!
The age should also have worked fine - the age is in reality just a date being 
displayed in another way. Can you report the bug in Jira please?

One thing to consider if you want to combine this rule with the AGE data type: 
The number of years displayed in the AGE data element is calculated based on 
todays date. The calculation that you are doing the rule is calculating the age 
of the person at the time of enrollment. That means that if you register a 
person 17 years old today, with today as the enrollment date, the AGE 
dataelement would display 17 as the age and your rule would also consider the 
person to be 17. Then if you come back in 1 year, the AGE data element would 
show 18 as the age - but the underlying birthdate and enrollment date would be 
unchanged and therefore the rule would still calculate the age to 17.

Markus

> 9. aug. 2017 kl. 14.24 skrev Georgi Chakarov :
> 
> Hi Markus,
>  
> I was able to test this expression d2:yearsBetween(A{Date of Birth}, V{ 
> enrollment _date})  <18
> The problem was that my Date of Birth attribute was of value type AGE. Once I 
> changed it to DATE the program rule started working.
>  
> Is there anything specific that needs to be taken into consideration when 
> working with Age value type?
>  
> Regards,
>  
> Georgi
>  
> From: Markus Bekken [mailto:mar...@dhis2.org] 
> Sent: Wednesday, August 9, 2017 11:01 AM
> To: Georgi Chakarov 
> Cc: DHIS Users ; DHIS 2 Developers list 
> 
> Subject: Re: [Dhis2-users] FW: d2: daysbetween AND d2:yearsbetween not 
> working properly in 2.27 build revision b6e8cde
>  
> Hi there Georgi!
> The expression
> d2:yearsBetween(A{Date of Birth}, V{ enrollment _date})  <18
> should be the correct one. I would change the V{ enrollment _date} to 
> V{enrollment _date}
>  
> Note that before the birth date is not entered, the expression will evaluate 
> to 0 - which will be less than 18.
>  
> Let me know how it goes.
>  
> Markus
>  
> 9. aug. 2017 kl. 00.41 skrev Georgi Chakarov  >:
>  
> Hello all! Any thoughts on my email below from last week?
>  
> Thanks,
>  
> Georgi
>  
> From: Georgi Chakarov 
> Sent: Friday, August 4, 2017 1:01 PM
> To: DHIS Users  >; DHIS 2 Developers list 
> >
> Cc: Sara Gaudon >; 
> Kristiyan Panayotov  >
> Subject: d2: daysbetween AND d2:yearsbetween not working properly in 2.27 
> build revision b6e8cde
>  
> Hello all!
>  
> I am trying to create a program rule based on Date of birth and Enrollment 
> date. Basically, I want to hide one set of data elements if the client is 
> below 18 years old and another set of data elements if the client is above 18 
> years of age.
>  
> This is what I tried:
> 1)  (d2:daysBetween(A{Date of Birth}, V{enrollment_date})/365)  <18   
>   THIS DOES NOT WORK
> 2)  (d2:yearsBetween(A{Date of Birth}, V{ enrollment _date})/365)  <18
>   This actually works(hides the data element I want), but I don’t think 
> it is the correct expression.
> 3)  d2:yearsBetween(A{Date of Birth}, V{ enrollment _date})  <18  
> I think that this is the correct expression, but it is executing 
> the rule (does not hide the data element).
>  
> Do you think that there might be a bug in how these expressions work? If not, 
> can someone guide me to the correct expression?
>  
> Thanks in advance,
>  
> Georgi
>  
>  
>  
>  
>   
> Georgi Chakarov, CIA | geo...@logicaloutcomes.net 
>  | +1-647-478-5634 x 104 | LogicalOutcomes 
> c/o Centre for Social Innovation, 720 Bathurst Street, Toronto Canada M5S 2R4 
> | You may unsubscribe from receiving commercial electronic messages from 
> LogicalOutcomes by emailing i...@logicaloutcomes.net 
> 
>  
> ___
> 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] Lost aggregate builder in DHIS2 v2.25

2017-08-10 Thread channara rin
Hi Nick,
last mail you said aggregate builder replace by program indicators. so
after upgrade, all formula will still exist in 2.25 or  lost?

thank you
channara

On Thu, Dec 22, 2016 at 11:52 AM, channara rin 
wrote:

> ohh
> got it,
> thank you
>
> On Wed, Dec 21, 2016 at 12:07 PM, Shurajit Dutta 
> wrote:
>
>> Hi Channara,
>>
>> This has been effectively replaced by program indicators. You can have a
>> look at some of the relevant documentation to learn more
>>
>> https://ci.dhis2.org/docs/2.25/en/user/html/ch27s04.html
>>
>> https://www.dhis2.org/event-tracker-program-indicator-basics
>> https://www.dhis2.org/working-with-program-indicator-filters
>>
>> Nick
>>
>> On Wed, Dec 21, 2016 at 11:37 AM, channara rin 
>> wrote:
>>
>>> dear all,
>>> any one can help me?, usually, i use aggregate builder to create value
>>> with formula for *data element*. and when i test with version 2.25, i
>>> can't find aggregate builder function.
>>>
>>> regards,
>>> channara
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Shurajit Dutta
>> Health Information Consultant
>>
>
>
___
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