[Dhis2-users] Get number of days between two event dates in different program stages

2018-04-10 Thread 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
___
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] Option sets in program indicators

2018-04-10 Thread Natalie Tibbels
Hi all,
For program indicators, do option set codes count as number values in an 
expression/filter? I want to create a program indicator that captures whether 
ANY response was given to a particular data element in a tracker program stage 
(with response type text using an option set with 11 options, codes: 01, 02, 
03…11). I want to sum all of the cases where the user selected ANY option for 
that data element.

Does this make sense?
Program expression: Enrollment count. [or TEI count?]
Program filter: {#uidofdataelement} >='01' and #{CDbxAsttXzY.mFhpwpIv7ci}<='11'

Is there a better way to do this? Am I right that d2:hasValue cannot be used if 
the response type is an option set?

Thanks,
Natalie
___
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] org unit in program variable/rule

2018-04-10 Thread Rady
Hello Bernard,

You can use *V{orgunit_code}* in program rule to retrieve orgunit code.

Thanks,
Rady

On Tue, Apr 10, 2018 at 5:59 PM, Bernard Sadaka (IM Advisor) <
lib@pu-ami.org> wrote:

> Hello all,
>
> Is there a way to get the organization unit as a program variable and/or
> use it in the program rules?
>
> My usecase is that I want to use the program rule to create a unique value
> based on:
>
> · The PHCC (org unit)
>
> · The family number
>
> · The individual number
>
> Thanks in advance for the help.
>
>
>
> All the best,
>
> Bernard
>
>
>
> [image: cid:image002.png@01D36F50.572585A0]
>
> *Bernard Sadaka*
>
> *Information Management Advisor*
>
> Première Urgence - Aide Médicale Internationale
>
> Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
>
> Ain el Remmaneh, Beirut, Lebanon
>
> *E-mail:* lib@pu-ami.org
>
> *Cell:* +961 71 004 881 (208)
>
> *Skype:* imapuami
>
> *Website:* https://www.pu-ami.org
>
>
>
>
>
> ___
> 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] org unit in program variable/rule

2018-04-10 Thread Bernard Sadaka (IM Advisor)
Thank you Sakibou!

It worked.

 

All the best,

Bernard

 




Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail:   lib@pu-ami.org 

Cell: +961 71 004 881 (208)

Skype: imapuami

Website:   https://www.pu-ami.org

 

 

From: Sakibou ALASSANI [mailto:sakibou.al...@yahoo.fr] 
Sent: Tuesday, April 10, 2018 2:27 PM
To: Bernard Sadaka (IM Advisor) ; 'DHIS 2 Developers list' 
; dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] org unit in program variable/rule

 

Hi Sadaka

>From my knowledge Only orgunit code is supported at now

You can use V{orgunit_code} in the assignment expression 

 


Sakibou 

 

 

Le mardi 10 avril 2018 à 10:59:39 UTC, Bernard Sadaka (IM Advisor) 
 > a écrit : 

 

 

Hello all,

Is there a way to get the organization unit as a program variable and/or use it 
in the program rules?

My usecase is that I want to use the program rule to create a unique value 
based on:

* The PHCC (org unit)

* The family number

* The individual number

Thanks in advance for the help.

 

All the best,

Bernard

 




Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail:   lib@pu-ami.org 

Cell: +961 71 004 881 (208)

Skype: imapuami

Website:   https://www.pu-ami.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   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] org unit in program variable/rule

2018-04-10 Thread Sakibou ALASSANI
Hi SadakaFrom my knowledge Only orgunit code is supported at now
You can use V{orgunit_code} in the assignment expression 


Sakibou 
 

Le mardi 10 avril 2018 à 10:59:39 UTC, Bernard Sadaka (IM Advisor) 
 a écrit :  
 
 
Hello all,

Is there a way to get the organization unit as a program variable and/or use it 
in the program rules?

My usecase is that I want to use the program rule to create a unique value 
based on:

· The PHCC (org unit)

· The family number

· The individual number

Thanks in advance for the help.

  

All the best,

Bernard

  

| 

 | 
Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib@pu-ami.org 

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.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   : https://help.launchpad.net/ListHelp


[Dhis2-users] org unit in program variable/rule

2018-04-10 Thread Bernard Sadaka (IM Advisor)
Hello all,

Is there a way to get the organization unit as a program variable and/or use
it in the program rules?

My usecase is that I want to use the program rule to create a unique value
based on:

* The PHCC (org unit)

* The family number

* The individual number

Thanks in advance for the help.

 

All the best,

Bernard

 




Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail:   lib@pu-ami.org 

Cell: +961 71 004 881 (208)

Skype: imapuami

Website:   https://www.pu-ami.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] Program indicator expressions

2018-04-10 Thread Jane Greig
Hi
Can anyone advise on whether program indicator expressions can use data 
elements with option sets? They do not appear in the list of data elements 
available, but it does not tell me my expression using the UID of one is 
invalid. However, it also does not give me a result. Example I am trying to use 
is:
d2:condition('#{qaDVwQUHD0j.g4bPEQ4a7WM} == 'LB' ',1,0)
to return a value of 1 if that condition is true, otherwise 0. Is that possible 
and I am just writing my expression wrongly? Even with a Boolean data element 
that does appear in the list of data elements, I could not get a result using 
== 1, == TRUE, == Yes.
Any guidance is appreciated.
Thanks
Jane


Jane Greig, PhD
Epidemiologist MSF-OCA
Manson Unit, MSF-UK


___
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