Re: [Dhis2-users] using report date in the program rule

2018-01-05 Thread Nada Ghosn
Good evening,
Thank you for your message.
I have tried the following:
- having specific code for each target orgunit
- having a data element: de_ic_orgunit
- having a program event capture (pgm_icu) where de_ic_orgunit is included
in the form
- having a program rule: pr_ic_orgunit_code, where no condition is
specified, and where action is to attribute value to data element
(de_ic_orgunit), with the following expression V{orgunit_code}

When testing the procedure, it did not work. The orgunit code did not
appear in the target data element.

Did i do some mistake in the procedure?
Sincerely
Nada

On Fri, Jan 5, 2018 at 5:31 PM, Markus Bekken  wrote:

> Hi Nada,
> there is a variable that you can use to get the orgunit code in program
> rules, but not the orgunit name.
>
> The variable is addressed with V{orgunit_code}. For tracker programs this
> will be the enrolling orgunit, while for single event programs this will be
> the event orgunit.
>
> See table 19.14: 19.5.6. Reference information: Operators and functions
> to use in program rule expression
> 
>
> Markus
>
> 2. jan. 2018 kl. 17.46 skrev Pamod Amarakoon :
>
> Hi Nada,
>
> Just wondering whether you are using the standard data entry form or a
> custom form. I'm not really sure whether there is a function to display
> selected org unit name. This is possible using javascript if you are using
> a custom form though.
>
> On Tue, Jan 2, 2018 at 12:04 AM, Nada Ghosn  wrote:
>
>> Good evening,
>> Thank you again for your prompt reply.
>> I shall test the new program again.
>>
>> I will be thankful if you can assist me in the following query:
>> how to create a data element to retain the name of the orgunit.
>>
>> Sincerely
>> Nada
>>
>>
>> On Mon, Jan 1, 2018 at 9:15 PM, Pamod Amarakoon  wrote:
>>
>>> Hi Nada,
>>>
>>> It should come automatically if you already have a data element for the
>>> age field and if you have applied a rule to assign the value of the
>>> expression above to the data element.
>>>
>>> On Mon, Jan 1, 2018 at 11:17 PM, Nada Ghosn  wrote:
>>>
 Good evening,
 Thank you for your prompt reply.
 I did the expression and it works.
 However, i have to click on the field (year) to get the value.
 I will be thankful if you can advise on how to get the value
 automatically without having to click in the target field (year)
 Sincerely
 NG


 On Mon, Jan 1, 2018 at 8:19 PM, Pamod Amarakoon  w
 rote:

> Hi Nada,
>
> Best wishes for 2018 !
>
> Regarding your query I assume the problem you are facing with is how
> to obtain the year from the event date. Considering the date format you 
> can
> get the string value of the year by obtaining the first 4 digits from the
> left side of the value for the event date. So I suggest you use the
> following function.
>
> d2:left(V{event_date}, 4)
>
> Hope this helps.
>
> On Mon, Jan 1, 2018 at 9:35 PM, Nada Ghosn  wr
> ote:
>
>> Hello,
>> Best wishes for 2018.
>>
>> I am trying to do the following in an event-capture program:
>> - capture the year of the event date (report date) and assign it to a
>> program rule variable.
>>
>> I will be thankful if you can assist me.
>> Sincerely
>> NG
>>
>> --
>> Nada Ghosn, MD
>> Head, Epidemiology Surveillance Program (Esumoh)
>> Ministry of Public Health
>> Beirut, Museum square
>> Lebanon
>> Tel +961.1.614194 <+961%201%20614%20194>
>> Fax +961.1.610920 <+961%201%20610%20920>
>> Email esumoh...@gmail.com, esu...@moph.gov.lb
>> Website www.moph.gov.lb
>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> Regards,
> Dr. Pamod Amarakoon
> MBBS (SL)
> MSc (Biomedical Informatics), EMSc (Health Admin), PGCert (MedEd), CEH
> Medical Officer in Health Informatics
> Nutrition Coordination Division
> Ministry of Health, Nutrition and Indigenous Medicine,
> Sri Lanka
>
> Confidentiality Notice: the information contained in this email and
> any attachments may be legally privileged and confidential. If you are not
> an intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you 
> have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not 

[Dhis2-users] Updating datavalue using API

2018-01-05 Thread Jean de Dieu Anoubissi
Dear all
Best wishes for 2018.
I would like to know if it is possible to update (delect or change) data
value using API

This is an sql request I want to perform:

1. UPDATE datavalue SET categoryOptionComboid=IDA Where
CategoryOptionComboid=IDB;
2. DELET from datavalue WHERE categoryoptionComboid =IDB;

How can I have the Same result with API;

I will be thankfull if someone can help me.

Regards
___
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] using report date in the program rule

2018-01-05 Thread Markus Bekken
Hi Nada,
there is a variable that you can use to get the orgunit code in program rules, 
but not the orgunit name. 

The variable is addressed with V{orgunit_code}. For tracker programs this will 
be the enrolling orgunit, while for single event programs this will be the 
event orgunit.

See table 19.14: 19.5.6. Reference information: Operators and functions to use 
in program rule expression 


Markus

> 2. jan. 2018 kl. 17.46 skrev Pamod Amarakoon :
> 
> Hi Nada,
> 
> Just wondering whether you are using the standard data entry form or a custom 
> form. I'm not really sure whether there is a function to display selected org 
> unit name. This is possible using javascript if you are using a custom form 
> though.
> 
> On Tue, Jan 2, 2018 at 12:04 AM, Nada Ghosn  > wrote:
> Good evening,
> Thank you again for your prompt reply.
> I shall test the new program again.
> 
> I will be thankful if you can assist me in the following query:
> how to create a data element to retain the name of the orgunit.
> 
> Sincerely
> Nada
> 
> 
> On Mon, Jan 1, 2018 at 9:15 PM, Pamod Amarakoon  > wrote:
> Hi Nada,
> 
> It should come automatically if you already have a data element for the age 
> field and if you have applied a rule to assign the value of the expression 
> above to the data element.
> 
> On Mon, Jan 1, 2018 at 11:17 PM, Nada Ghosn  > wrote:
> Good evening,
> Thank you for your prompt reply.
> I did the expression and it works.
> However, i have to click on the field (year) to get the value.
> I will be thankful if you can advise on how to get the value automatically 
> without having to click in the target field (year)
> Sincerely
> NG
> 
> 
> On Mon, Jan 1, 2018 at 8:19 PM, Pamod Amarakoon  > wrote:
> Hi Nada,
> 
> Best wishes for 2018 !
> 
> Regarding your query I assume the problem you are facing with is how to 
> obtain the year from the event date. Considering the date format you can get 
> the string value of the year by obtaining the first 4 digits from the left 
> side of the value for the event date. So I suggest you use the following 
> function.
> 
> d2:left(V{event_date}, 4)
> 
> Hope this helps.
> 
> On Mon, Jan 1, 2018 at 9:35 PM, Nada Ghosn  > wrote:
> Hello,
> Best wishes for 2018.
> 
> I am trying to do the following in an event-capture program:
> - capture the year of the event date (report date) and assign it to a
> program rule variable.
> 
> I will be thankful if you can assist me.
> Sincerely
> NG
> 
> -- 
> Nada Ghosn, MD
> Head, Epidemiology Surveillance Program (Esumoh)
> Ministry of Public Health
> Beirut, Museum square
> Lebanon
> Tel +961.1.614194 
> Fax +961.1.610920 
> Email esumoh...@gmail.com , esu...@moph.gov.lb 
> 
> Website www.moph.gov.lb 
> 
> 
> ___
> 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 
> 
> 
> 
> 
> 
> -- 
> Regards,
> Dr. Pamod Amarakoon
> MBBS (SL)
> MSc (Biomedical Informatics), EMSc (Health Admin), PGCert (MedEd), CEH
> Medical Officer in Health Informatics
> Nutrition Coordination Division
> Ministry of Health, Nutrition and Indigenous Medicine,
> Sri Lanka
> 
> Confidentiality Notice: the information contained in this email and any 
> attachments may be legally privileged and confidential. If you are not an 
> intended recipient, you are hereby notified that any dissemination, 
> distribution, or copying of this e-mail is strictly prohibited. If you have 
> received this e-mail in error, please notify the sender and permanently 
> delete the e-mail and any attachments immediately. You should not retain, 
> copy or use this e-mail or any attachments for any purpose, nor disclose all 
> or any part of the contents to any other person.
> 
> 
> 
> 
> 
> 
> -- 
> Nada Ghosn, MD
> Head, Epidemiology Surveillance Program (Esumoh)
> Ministry of Public Health
> Beirut, Museum square
> Lebanon
> Tel +961.1.614194 
> Fax +961.1.610920 
> Email esumoh...@gmail.com , esu...@moph.gov.lb 
> 
> Website www.moph.gov.lb 
> 
> 
> 
> 
> -- 
> Regards,
> Dr. Pamod Amarakoon
> MBBS (SL)
> MSc 

[Dhis2-users] (no subject)

2018-01-05 Thread Stanley Kalyati
Hi All

Does anyone happen to have a script for collapsing a section in a form or
expanding it?

My form is a bit long and i want some sections to be collapsible or
expandable for data input?

Thank you

Stanley
___
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