Re: [Dhis2-devs] [Dhis2-users] Tracker Capture - Input Fields Validation

2016-04-27 Thread Markus Bekken
Hi again Muhammad,
d2:validatePattern and d2:length could conveniently be backported - they are 
now supported in the latest 2.22 build.

Calle: Added a few examples to the user manual, which can be found here: 
http://dhis2.github.io/dhis2-docs/master/en/user/html/ch31s05.html 
<http://dhis2.github.io/dhis2-docs/master/en/user/html/ch31s05.html>

The program rules generally access data within one enrollment for tracker 
programs. Data values from data elements and tracked entity attributes, along 
with constants and a set of variables defined here: 
http://dhis2.github.io/dhis2-docs/master/en/user/html/ch30s03.html 
<http://dhis2.github.io/dhis2-docs/master/en/user/html/ch30s03.html>
For event capture, the program rules access data values from the current event, 
and events within the same program and organization unit. 

Not to say we cant expand this in future releases, please comment and or create 
blueprints for what would be useful in your context.

Best regards,
Markus

> 26. apr. 2016 kl. 07.01 skrev Muhammad Tahir :
> 
> Correction, we are on version 2.22
> 
> On Tue, Apr 26, 2016 at 9:56 AM, Muhammad Tahir  <mailto:mtag...@gmail.com>> wrote:
> Hi Markus,
> 
> Your answer is very helpful, but unfortunately we are on version 2.23 and 
> won't be able to use this.
> 
> Is there any way around to achieve the same.
> 
> @Calle: Thank you highlighting the loop option, we are also looking for this 
> to validate the values in DB.
> 
> On Mon, Apr 25, 2016 at 6:21 PM, Calle Hedberg  <mailto:calle.hedb...@gmail.com>> wrote:
> Markus,
> 
> A series of valid expression examples would be very useful, including 
> examples using multiple actions.
> 
> Can those expressions include lookup functions into other tables or stored 
> views in the system?
> 
> Regards
> Calle
> 
> On 25 April 2016 at 14:37, Markus Bekken  <mailto:markus.bek...@gmail.com>> wrote:
> Hi Muhammad,
> 
> There is support for this in the 2.23 release(just out), via the program 
> rules.
> 
> Right clicking on your program in the programs app, select program rules - 
> and you can create a rule like this:
> 
> If you also want to validate that the field has a certain pattern, you could 
> expand the rule with a regular expression matching check. The below example 
> checks wether the address field is containing letters and spaces, followed by 
> a space and then a number. The regex is [\w ]+ \d+ - notice that the 
> backslashes needs to be escaped:
> 
> 
> Please have a look, and let us know if we can help with anything!
> 
> Markus
> 
>> 25. apr. 2016 kl. 07.30 skrev Muhammad Tahir > <mailto:mtag...@gmail.com>>:
>> 
>> Hi,
>> 
>> While working with Tracker Capture, is there any possibility to add 
>> validation (Js/jquery validation or any other) via front-end or we have to 
>> make changes at code level to achieve this?
>> 
>> We have created some fields as TEXT, but want to restrict the length and 
>> pattern to restrict users to enter correct data.
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Regards,
>> Muhammad Tahir
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> Post to : dhis2-us...@lists.launchpad.net 
>> <mailto:dhis2-us...@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> More help   : https://help.launchpad.net/ListHelp 
>> <https://help.launchpad.net/ListHelp>
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-devs 
> <https://launchpad.net/~dhis2-devs>
> Post to : dhis2-devs@lists.launchpad.net 
> <mailto:dhis2-devs@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~dhis2-devs 
> <https://launchpad.net/~dhis2-devs>
> More help   : https://help.launchpad.net/ListHelp 
> <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 <mailto:calle.hedb...@gmail.com>
> Skype: calle_hedberg
> 
> ***
> 
> 
> 
> 
> 
> -- 
> Regards,
> Muhammad Tahir
> 
> 
> 
> -- 
> Regards,
> Muhammad Tahir

___
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] [Dhis2-users] Fwd: Count events for specific program stage

2016-05-03 Thread Markus Bekken
Hi there Ramaso,
the reason you are not seeing the program indicator in tracker capture for the 
particular TEI below is the program indicators filter. There is a shortcoming 
when combining the filters with indicators shown in the data entry form. 
Working on fixing this, but in the meantime we can probably help with a 
workaround in the data entry form.

Did you want to show the number of events of the "Contact" program stage, 
assuming there is other program stages that you do not want to count events 
from?

Best regards, 
Markus

> 3. mai 2016 kl. 11.52 skrev ramaso hasina :
> 
> I've try this solution in the demo : 
> 
> Program indicator :
> 
> https://play.dhis2.org/demo/dhis-web-maintenance-program/showUpdateProgramIndicator.action?id=858928
>  
> 
> 
> Tracker Capture:
> 
> https://play.dhis2.org/demo/dhis-web-tracker-capture/index.html#/dashboard?tei=kKctZA8jmCV&program=dxHHSR1fWo3
>  
> 
> 
> There's no value seen in the program indicator 
> 
> Hasina.
> 
> 
> 
> 
> 2016-05-03 11:36 GMT+03:00 ramaso hasina  >:
> Thanks Lars, 
> 
> I'll try this workaround.
> 
> Hasina.
> 
> 2016-05-03 11:28 GMT+03:00 Lars Helge Øverland  >:
> Hi Ramaso,
> 
> we do not support that directly per now. However it has come up a number of 
> times so we will try to get it done for 2.24.
> 
> I am thinking we can add another variable for program stage, which allows you 
> to filter on the program stage ID in the indicator filter, e.g.
> 
> V{program_stage} = 'A03MvHHogjR'
> 
> 
> https://blueprints.launchpad.net/dhis2/+spec/program-indicator-event-program-stage-count
>  
> 
> 
> 
> However, there could be a workaround. Given that you have a numerical data 
> element which is _always_ filled for the stage, can use the event count 
> variable in the expression:
> 
> V{event_count}
> 
> 
> and use that data element in the expression where you filter on a a value 
> greater > 0, e.g.
> 
> #{A03MvHHogjR.wQLfBvPrXqq} > 0
> 
> 
> This way, the filter will filter out event which do not have a value for that 
> data element in that stage.
> 
> 
> regards,
> 
> Lars
> 
> 
> 
> 
> 
> 
> On Tue, May 3, 2016 at 9:28 AM, ramaso hasina  > wrote:
> Hi,
> 
> I'm trying to do a program with many program stage.
> My program indicator is to know the count of events for just the first 
> program stage for example.
> How can I do that ?
> 
> Thanks.
> 
> DHIS2 Version : 2.21 - 20994.
> 
> 
> Hasinarivelo RAMASOMANANA
> mHealth Specialist
> Population Services International
> Antananarivo - Madagascar
> 
> ​Vies Saines - Résultats mesurables
> 
> 
> 
> ___
> 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
> http://www.dhis2.org 
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users 
> 
> Post to : dhis2-us...@lists.launchpad.net 
> 
> Unsubscribe : https://launchpad.net/~dhis2-users 
> 
> 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


Re: [Dhis2-devs] Tracker capture and custom forms

2016-05-10 Thread Markus Bekken
Hi Olav!
Let me address your second point :)

> 10. mai 2016 kl. 15.45 skrev Olav Poppe :
> 
> Hi devs, 
> first, I’ve been working on a custom data entry form for tracker (2.22 and 
> 2.23). I’ve customised the same form as programmes with and without 
> registration, and I notice that in Tracker Capture everything is seemingly 
> "magnified" by 25% or so compared to Event Capture (e.g. rows that are 35px 
> high in EC are 44px in TC). Is there a reason for this? The way it is 
> rendered in Event Capture seems more "normal" to me, whilst opening custom 
> forms in Tracker Capture always make me think Chrome is set to zoom… 
> 
> Second, in Tracker Capture, there seems to be no way of displaying 
> "validation warnings" (defined through program rules) - could there be 
> something similar to EC, with a "Validation warnings" widget? Similarly, 
> while EC will highlight missing required fields when completing ("Required" 
> in red), there is no indicator TC as to what field(s) are missing.
Yes, we have been talking about the same, we need a way of showing the warnings 
in custom forms, and adding a widget like EC is perhaps the hottest option. 
Another one that was mentioned was adding them inside the form, somehow - for 
example as a small icon in or next to the input field. We are also discussing a 
use case for having validation errors that is triggered/shown when trying to 
complete the program stage. Maybe some warnings could be nice to show upon 
completion also - inside the dialog for confirming the completion for example.
> 
> Regards
> Olav
> 
> 
> 
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Status of ImportSummaries in /api/events

2016-05-12 Thread Markus Bekken
Hi Morten,
the TC/EC apps should still work as before if this is updated. Seems like a 
sensible fix.

Will the https status of the whole call follow the importsummaries status?

Markus

> 12. mai 2016 kl. 12.32 skrev Vanya Seth :
> 
> Ok sounds good. 
> 
> Regards
> Vanya
> 
> On Thu, May 12, 2016 at 3:44 PM, Morten Olav Hansen  > wrote:
> Hi Vanya
> 
> Yes, I agree it's not correct. I just want to wait for feedback from Abyot or 
> Markus before I change anything, so it won't break EC/TC.
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> On Thu, May 12, 2016 at 4:51 PM, henri claude moungui  > wrote:
> Hi all.
> wasn't the Dry Run option at "yes" ?
> If this is the case, maybe after resolving the conflict of the  category 
> option identifier: U8vu31ybiD5 , Aamer will have to retry by setting the Dry 
> Run at "No"
> 
> Hope this helps...if I'm not out of the lines..
> 
> Henri
> 
>  
> 
> 
> Le Jeudi 12 mai 2016 10h33, Vanya Seth  > a écrit :
> 
> 
> Hi Morten
> 
> As mentioned earlier. We are working on the events data sync. And this 
> specific issue is in the /events POST API.
> 
> The idea is to retry the event data sync if there is any conflict (where 
> essentially some data has not sycned ). Treating a CONFLICT as a SUCCESS does 
> not sound like a good idea.
> 
> Apart from that would the /api/events POST be able to update the same event 
> again if retried. Am coming probably from the 
> "attributecategoryoptioncomboid" field.
> 
> Regards
> Vanya
> 
> On Thu, May 12, 2016 at 12:26 PM, Morten Olav Hansen  > wrote:
> No, I mean for the new DXF2 importer, I'm sorry (I assume you are also 
> working on the metadata sync importer). The event importer has not had any 
> changes done.
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> On Thu, May 12, 2016 at 1:44 PM, Aamer Mohammed  > wrote:
> Thanks Morten for the insight. But we are also on a branch forked off on 2.23 
> and it is not giving any WARNING kind of status in our case. Any thoughts 
> please?
> 
> 
> On Thu, May 12, 2016 at 11:46 AM, Morten Olav Hansen  > wrote:
> Hi
> 
> I agree this is confusing, but I think this is also the case in our old 
> importer. I'm not sure if we want to change it at this point (as we don't 
> want to break any third party clients out there).
> 
> That said, as you might know, we changed the approach a bit in our new 
> importer, and it is much better at these kind of issues (in your case it 
> would give status=WARNING which means please have a closer look at the 
> report, or ERROR if all failed).
> 
> We are hoping to have proper web-api versioning coming in 2.24, which means 
> we can potentially clean up these kinds of issues (but that part is not 
> started yet, so let's see).
> 
> @Abyot: are you using this returned status for anything in your EC/TC apps?
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> 
> On Thu, May 12, 2016 at 12:52 PM, Aamer Mohammed  > wrote:
> Hi
> 
> We are using /api/events to post event related data and it is being uploaded 
> successfully. The api returns a response of type ImportSummaries which has 
> the status of ImportSummary along with the count of data which is 
> imported/updated. 
> In case of any conflicts being reported in ImportSummary, we observe that the 
> status still shows as SUCCESS. 
> 
> -
> ImportSummaries {
>   importSummaries = [ImportSummary {
>   status = SUCCESS, 
> description = 'null', 
> importCount = [imports = 2, updates = 0, ignores = 0], 
> conflicts = [ImportConflict {
>   object = 'Illegal category option identifier: 
> U8vu31ybiD5', value = 'U8vu31ybiD5' }], 
> dataSetComplete = 'null', 
> reference = 'jLBehWyIspM', 
> href = 
> 'http://msfocamdsynchq.twhosted.com/api/events/jLBehWyIspM 
> '
>   }]
> }
> --
> Is this not an error because the complete import of the event data has not 
> happened. Please suggest.
> 
> Thanks
> Aamer.
> 
> 
> 
> 
> 
> 
> -- 
> With Regards
> ThoughtWorks Technologies
> Hyderabad
> 
> --Stay Hungry Stay Foolish!!
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users 
> 
> Post to: dhis2-us...@lists.launchpad.net 
> 
> Unsubscribe : https://launchpad.net/~dhis2-users 
> 
> More help  : https://help.launchpad.net/Li

Re: [Dhis2-devs] dueDate in Tracker Capture

2016-05-17 Thread Markus Bekken
Hi there Shivee,
As you might now, the dueDate basically represents which date the event was 
supposed to take place at. For events that has actually taken place, you would 
also fill in the eventDate of the event that is posted, and the dueDate would 
not be that important anymore. 

When creating events, Tracker Capture suggests due dates automatically based on 
config parameters like you mention. If you want to implement the whole or parts 
of the same logic that applies in tracker capture, you can have a look at the 
functions getEventDueDate and getEventDueDatePeriod in the EventUtils service 
in tracker capture(scripts/services.js).

Each app is however free to post due dates that makes sense in their own 
functional scenario. In some cases it might be enough to always use the same 
dueDate as eventDate - if you do not specifically need to handle the dates 
separately.

Best regards, 
Markus

> 17. mai 2016 kl. 13.25 skrev Shivee Gupta :
> 
> Hello Devs! 
> 
> I am working on an app using the d2 APIs related to tracker capture. I have 
> successfully registered and enrolled the new trackedEntityInstances to the 
> selected orgUnit and Program.
> 
> Now what I want to do is add events, for which I have to POST a payload 
> containing dueDate for the event. My doubt is, how do I calculate due date ? 
> The program stage model gives me info like 'minDaysFromStart', 'lastUpdated' 
> but I do not see 'dueDate' anywhere. Is it a separately calculated value ? 
> 
> Should, dueDate = createdOn + minDaysFromStart ? 
> 
> Regards,
> Shivee
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Tracker Indicators not working as expected

2016-06-01 Thread Markus Bekken
Hi there,
you want to make an indicator that compares the dates from two different events 
within the same enrollment. Unfortunately the program indicators is at the 
moment only capable of comparing data within one event.

Is it a possibility to use the incident date or enrollment date as the 
admission date? You would be able to create a program indicator that compares 
these dates with the discharge date of the second program stage. 
> d2:daysBetween(Admission.Date of admission,Discharge.Date of exit)

could be rewritten to:

d2:daysBetween(V{incident_date},#{dataelement for exit date})

to make it perfect you would probably also run a filter so you only count the 
discharge events. 

Best regards,
Markus

> 1. jun. 2016 kl. 10.56 skrev Sultanahamar Mohammad :
> 
> Team,
> 
> We created indicators for a tracker program which calculates the average 
> length of stay.
> We have two stages one for admission and the other for discharge. Admission 
> has a data element for admission date and discharge has got one for discharge 
> date. After this, we have created a indicator which is of Aggregation type 
> average and the indicator being daysbetween discharge date and admission 
> date. We can see the indicator with correct value while filling the tracker 
> data entry form. But in Dataviz app, when we create a chart, it is showing it 
> as 0. We tried other simple indicators which would count the number of events 
> and they are all working fine. We have run Analytics tables also. Could you 
> please let us know on what are we missing.
> 
> Expression description
> d2:daysBetween(Admission.Date of admission,Discharge.Date of exit)
> 
> we have tried the reverse of this expression as well meaning, Discharge date 
> being first argument of the expression above.
> 
> 
> Thanks and Regards,
> Sultan Ahamar.
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] Program rules combining several Dataelements. Not working?

2016-06-01 Thread Markus Bekken
Hi there Jose,
the example you gave should work fine.

It seems the reason that your particular espression is not evaluated to 
true(triggering the actions you hooked to the rule), is the middle clause of 
your expression:
> #{AdoptedMethod} == '[35] UID'

This evaluates to:
>  '[35] IUD' == '[35] UID' 
..which is false. Can it be only a typo in the expression or the data element 
value - the U and I should be switched around?

Best regards,
Markus

> 1. jun. 2016 kl. 15.17 skrev Jose Garcia Muñoz :
> 
> 
> Hi devs.
> 
> Are 'complex' program rules working? I mean by 'complex' combining different 
> datalements. For example:
> 
> #{CurrentMethod} == '[35] IUD' && #{AdoptedMethod} == '[35] UID' && 
> #{ServiceProvided} != '[38] IUD removal'
> 
> But when I check the value of the expresion in the JS console I get the 
> following information:
> 
> Expression with id rule:M8qUeTSwhnF was successfully run. Original condition 
> was: #{CurrentMethod} == '[35] IUD' && #{AdoptedMethod} == '[35] UID' && 
> #{ServiceProvided} != '[38] IUD removal' - Evaluation ended up as:'[35] IUD' 
> == '[35] IUD' && '[35] IUD' == '[35] UID' && '[42] MA' != '[38] IUD removal' 
> - Result of evaluation was:false
> 
> The result should be true, right? Am I doing something wrong?
> 
> Regards
> Jose
> ___
> 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] [Bug 1588757] Re: Missing authorities for deleting program indicators and editing program rules

2016-06-03 Thread Markus Bekken
** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588757

Title:
  Missing authorities for deleting program indicators and editing
  program rules

Status in DHIS:
  New

Bug description:
  The interface to edit user roles is missing the following authorities:

  F_PROGRAM_INDICATOR_DELETE
  F_PROGRAMRULE_ADD
  F_PROGRAMRULE_DELETE
  F_PROGRAMRULEVARIABLE_ADD
  F_PROGRAMRULEVARIABLE_DELETE

  
  This affects versions 2.22 build 22059 and 2.23 build 22983

  JM

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588757/+subscriptions

___
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 1588757] Re: Missing authorities for deleting program indicators and editing program rules

2016-06-04 Thread Markus Bekken
Thanks :)

I will look at it shortly. I was thinking we can simplify the
authorities a bit for program rules, no need to have different
authorities for actions and program rules for example.

> 3. jun. 2016 kl. 15.37 skrev Juan Manuel Alcantara 
> :
> 
> Hi Markus
> Lets also add 
> 
> F_PROGRAMRULEACTION_ADD
> F_PROGRAMRULEACTION_DELETE
> 
> Thanks!
> 
> JM
> 
> -- 
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1588757
> 
> Title:
>  Missing authorities for deleting program indicators and editing
>  program rules
> 
> Status in DHIS:
>  New
> 
> Bug description:
>  The interface to edit user roles is missing the following authorities:
> 
>  F_PROGRAM_INDICATOR_DELETE
>  F_PROGRAMRULE_ADD
>  F_PROGRAMRULE_DELETE
>  F_PROGRAMRULEVARIABLE_ADD
>  F_PROGRAMRULEVARIABLE_DELETE
> 
> 
>  This affects versions 2.22 build 22059 and 2.23 build 22983
> 
>  JM
> 
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1588757/+subscriptions

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588757

Title:
  Missing authorities for deleting program indicators and editing
  program rules

Status in DHIS:
  New

Bug description:
  The interface to edit user roles is missing the following authorities:

  F_PROGRAM_INDICATOR_DELETE
  F_PROGRAMRULE_ADD
  F_PROGRAMRULE_DELETE
  F_PROGRAMRULEVARIABLE_ADD
  F_PROGRAMRULEVARIABLE_DELETE

  
  This affects versions 2.22 build 22059 and 2.23 build 22983

  JM

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588757/+subscriptions

___
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] [Bug 1585785] Re: Program rule with skip logic invoked on repeatable stage result in 2nd stage not rendering all Data Elements

2016-06-06 Thread Markus Bekken
This issue was resolved by a configuration change. The variables in the
expression was configured to use the newest value in the program.
Switching to getting the value from the current program stage resolved
the issue.

** Changed in: dhis2
   Status: New => Invalid

** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1585785

Title:
  Program rule with skip logic invoked on repeatable stage result in 2nd
  stage not rendering all Data Elements

Status in DHIS:
  Invalid

Bug description:
  We have a Tracker capture program with a repeatable stage and program rules 
which invoke skip logic based on the value captured. 
  Tested on Google Chrome and Firefox the first stage opened for a TEI shows 
all the data element fields and if some of them are captured such that the skip 
logic is invoked, a subsequent event for that same TEI opens with a reduced 
number of data element fields in which those elements previously skipped are 
not listed.

  Version:2.23
  Build revision:22968
  Build date:2016-05-24 13:39

  This is really urgent we need to start training on this module next
  week and need this fixed. It should not be necessary for users to
  clear cache between every entry to invoke the full form.

  One of our Java devs had a look and believes it might be a caching
  issue where the browser cached the form and it doesnt reload properly.

  Thanks 
  Elmarie

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1585785/+subscriptions

___
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] Unique tracked entity attributes are now compulsory?

2016-06-08 Thread Markus Bekken
Hi guys!
Chiming in - I think Abyot is on leave today.
This seems to be a discrepancy that we should just resolve one way or the 
other. You might say that a blank value is not unique, but I have also recently 
encountered a use case where we needed a non-compulsory unique attribute like 
you Jose. 

Hiding the field with program rules was a workaround in our case, but I think 
it makes sense to allow blank values in non-compulsory unique attributes.

Unless there is any disagreements we can implement the client to conform to the 
API.

Markus

> 8. jun. 2016 kl. 09.15 skrev Morten Olav Hansen :
> 
> Hi
> 
> Sorry for late reply, but I have been looking into this, and from the backend 
> this is not required. I'm adding in Abyot, hopefully he can answer why it is 
> required in the UI part (I see it's marked with red star, and it will not 
> allow it without a value)
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org 
> On Mon, Jun 6, 2016 at 12:02 PM, Jose Garcia Muñoz  > wrote:
> 
> Dear devs,
> 
> we realized that tracked attributes are always compulsory even if they are 
> not marked like that in the program definition? so it is not possible at all 
> to keep them blank using the Tracker Capture.
> 
> In PSI (and I guess is the same for many different countries), we need to 
> define unique patient's IDs, although several times it is not possible to 
> collect them for many reasons, but now the system is not giving us the option 
> of keeping the IDs blank
> 
> Is this something that can be changed? Unique attributes can be compulsory 
> just marking the attribute as compulsory in the program definition...
> 
> Please, let us know, as we may need to reconsider some re-configuration for 
> our programs.
> 
> Many Thanks
> Jose
> 
> 
> 
> ___
> 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

___
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] [Bug 1593574] Re: Tracker program hangs on data entry / event capture screen

2016-06-17 Thread Markus Bekken
The screenshots 1 and 2 is coming from a discrepancy between the latest
build on the dev server and the latest built tracker capture from git.
This problem will be resolved with the next deploy.

The problem in screenshot 3 should be fixed with the latest 2.23 build.

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1593574

Title:
  Tracker program hangs on data entry / event capture screen

Status in DHIS:
  Incomplete

Bug description:
  After upgrading to 2.23 build 22982 the tracker program completes the
  registration, but on the programstage data entry screen the system
  just hangs. This can be replicated on play.dhis2.org.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1593574/+subscriptions

___
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] [Bug 1593574] Re: Tracker program hangs on data entry / event capture screen

2016-06-20 Thread Markus Bekken
** Changed in: dhis2
   Status: Incomplete => Fix Committed

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1593574

Title:
  Tracker program hangs on data entry / event capture screen

Status in DHIS:
  Fix Committed

Bug description:
  After upgrading to 2.23 build 22982 the tracker program completes the
  registration, but on the programstage data entry screen the system
  just hangs. This can be replicated on play.dhis2.org.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1593574/+subscriptions

___
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] Program indicators - option codes or text?

2016-06-28 Thread markus . bekken
Nicely spotted. Codes is used in analytics, but names in the client side 
calculation. Will fix so codes isused in TC for indicators.

Markus

> Den 28. jun. 2016 kl. 16.12 skrev Olav Poppe :
> 
> Hi devs, I’ve only tested this in trunk:
> when configuring program indicators the «Filter» description says: «Use 
> option codes for option set references.» However, in TC data entry, looking 
> in the console, it looks like name is used (‘Months’ is name, ‘MONTHS’ is 
> code).
> 
> Evaluation ended up as:
> ('' && d2:yearsBetween('2000-01-01','') < 5) || 
> ('Months' == 'DAYS' && 7 < 1825) ||
> ('Months' == 'WEEKS' && 7 < 520) ||
> ('Months' == 'MONTHS' && 7 < 60) ||
> (‘Months’ == 'YEARS' && 7 < 5)
> 
> Assume this might be a TC-only discrepancy (e.g. that in analytics, CODE is 
> actually used), though I’ve not yet been able to test that yet.
> 
> Regards
> Olav
> 
> 
> 
___
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] Trunk tracker bugs/issues

2016-06-28 Thread Markus Bekken
Thanks Olav,
see some inline comments. 

> 28. jun. 2016 kl. 14.52 skrev Olav Poppe :
> 
> Hi devs, 
> this might all be known issues since this is trunk, but I’ve been testing the 
> tracker (EC/TC) part of trunk the last two days and though I’d report the 
> issues I’ve come over:
> - TC: «auto-generate event» and «open data entry after enrollment» does not 
> seem to work, at least not in the instance I’ve tested with (worked in 2.23)
Thanks for the tip. We found it on the latest trunk in testing of 2.24, but 
then it might be a problem back to 2.23 as well.
> - TC: the new «show error and prevent completion» program rule action is not 
> triggered if there are also required/compulsory fields that are missing when 
> clicking complete. I think it would make sense to show all errors that 
> prevent the complete action when clicking complete?
That is a sound suggestion. We could show a list of the required fields 
together with other errors and or warnings upon completion. Will make a 2.24 
feature request and see if I get to it :) 
> - TC: I get an exception related to a program rule when enrolling new TEIs 
> (see screenshots). It tries to access the trackedentityattribute.id of the 
> «effect», which is null because the programruleaction is linked only to a 
> data element. (This is an «ASSIGN» type action).
I see. Will add a check that prevents this from failing. You can possibly also 
make a workarond by writing a rule that would not try to do an assignment of a 
dataelement when in the registration page.
> - Backend/maintenance: the programruleaction table leaves «orphaned» actions, 
> e.g. action not associated with a rule - I assume these should have been 
> deleted?
Yes, you are right that this might happen. This should be cleaned up - created 
a bug: https://bugs.launchpad.net/dhis2/+bug/1597137
> - EC: would be nice if report date could be embedded in custom forms - 
> support for this seems to have been going in and out over the last few 
> versions
> - TC/EC: Form/font sizes seems to be different for custom forms in the two 
> apps. EC size (12pt) seems more «normal» to me (vs 14pt in TC)
> - + a few program rule issues already sent to Markus…
> 
> Regards
> Olav
> 
>  09.48.37.png>
> ___
> 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] [Bug 1597137] [NEW] orphan program rule actions

2016-06-28 Thread Markus Bekken
Public bug reported:

Working with the programs app maintaining program rules, it is possible
to create orphaned program rule actions in the database. These would
never trigger or be visible anywhere except as unwanted litter the
database.

** Affects: dhis2
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1597137

Title:
  orphan program rule actions

Status in DHIS:
  New

Bug description:
  Working with the programs app maintaining program rules, it is
  possible to create orphaned program rule actions in the database.
  These would never trigger or be visible anywhere except as unwanted
  litter the database.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1597137/+subscriptions

___
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] [Bug 1569793] Re: attribute unique in program not working

2016-06-29 Thread Markus Bekken
As we are not fixing this before 2.24, the options will be hidden. Be
sure to revert revision 23470 when the support is implemented.

** Description changed:

  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.
  
  The workaround is to use other uniqueness scopes.
  
  In the way the calls is made, the registration of the Tracked entity(and
  the attribute values), happens before enrolling this tracked entity in a
  program. The first call(registration) fails because the program is not
  submitted. The program cannot be submitted until the second
  call(enrollment) is made.
+ 
+  Be sure to revert revision 23470 when the support is implemented.

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1569793

Title:
  attribute unique in program not working

Status in DHIS:
  New

Bug description:
  When using the "unique in program scope" option for attributes,
  registering users will cause a crash on the server side.

  The workaround is to use other uniqueness scopes.

  In the way the calls is made, the registration of the Tracked
  entity(and the attribute values), happens before enrolling this
  tracked entity in a program. The first call(registration) fails
  because the program is not submitted. The program cannot be submitted
  until the second call(enrollment) is made.

   Be sure to revert revision 23470 when the support is implemented.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1569793/+subscriptions

___
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] Trunk tracker bugs/issues

2016-06-29 Thread Markus Bekken
Good stuff - See comment inline.

> 29. jun. 2016 kl. 10.59 skrev Olav Poppe :
> 
> Great, thanks both.
> 
> Event date in custom forms isn’t very import, but would be nice to have.
> 
> Markus, you write 
>>  can possibly also make a workarond by writing a rule that would not try to 
>> do an assignment of a dataelement when in the registration page.
> How do I control when it is run, apart from through the condition? The 
> condition was "when data element X != '’", assign parts of data element X 
> code to another data element. E.g. the condition should not be true on 
> registration, since the data element would not have a value at that point.
Interesting, was going to suggest this very thing - to expand the expression so 
it would not be true on registration. Seems there is room for a little bit of 
investigation here :) Can I have you DB off the list? 

The other workaround option is not available in the program rules UI, but you 
know how to use the API and database directly so here goes :) : You can assign 
a program stage to the programRule.programStage - this will cause the rule to 
only be executed in the connected program stage(not in registration or other 
stages).
> 
> Olav
> 
>> 29. jun. 2016 kl. 09.23 skrev Abyot Asalefew Gizaw > <mailto:ab...@dhis2.org>>:
>> 
>> Hi Olav,
>> 
>> Thanks for reporting these issues. With Markus commenting on those issues 
>> related to program rule, I can comment on the others.
>> 
>> The font size issue is fixed.
>> 
>> Event auto generation is also reported during our internal testing phase - 
>> so that will be fixed for 2.24. 
>> 
>> Adding event date in custom forms was something we had long before. Now 
>> seems we no more allow for adding event date during custom form design - I 
>> will try to investigate. But can't promise if this is going to make it 
>> before 2.24.
>> 
>> --
>> Abyot A. Gizaw.
>> Senior Engineer, DHIS2
>> University of Oslo
>> http://www.dhis2.org <http://www.dhis2.org/>
>> On Wed, Jun 29, 2016 at 1:46 AM, Markus Bekken > <mailto:markus.bek...@gmail.com>> wrote:
>> Thanks Olav,
>> see some inline comments.
>> 
>> > 28. jun. 2016 kl. 14.52 skrev Olav Poppe > > <mailto:olav.po...@me.com>>:
>> >
>> > Hi devs,
>> > this might all be known issues since this is trunk, but I’ve been testing 
>> > the tracker (EC/TC) part of trunk the last two days and though I’d report 
>> > the issues I’ve come over:
>> > - TC: «auto-generate event» and «open data entry after enrollment» does 
>> > not seem to work, at least not in the instance I’ve tested with (worked in 
>> > 2.23)
>> Thanks for the tip. We found it on the latest trunk in testing of 2.24, but 
>> then it might be a problem back to 2.23 as well.
>> > - TC: the new «show error and prevent completion» program rule action is 
>> > not triggered if there are also required/compulsory fields that are 
>> > missing when clicking complete. I think it would make sense to show all 
>> > errors that prevent the complete action when clicking complete?
>> That is a sound suggestion. We could show a list of the required fields 
>> together with other errors and or warnings upon completion. Will make a 2.24 
>> feature request and see if I get to it :)
>> > - TC: I get an exception related to a program rule when enrolling new TEIs 
>> > (see screenshots). It tries to access the trackedentityattribute.id 
>> > <http://trackedentityattribute.id/> of the «effect», which is null because 
>> > the programruleaction is linked only to a data element. (This is an 
>> > «ASSIGN» type action).
>> I see. Will add a check that prevents this from failing. You can possibly 
>> also make a workarond by writing a rule that would not try to do an 
>> assignment of a dataelement when in the registration page.
>> > - Backend/maintenance: the programruleaction table leaves «orphaned» 
>> > actions, e.g. action not associated with a rule - I assume these should 
>> > have been deleted?
>> Yes, you are right that this might happen. This should be cleaned up - 
>> created a bug: https://bugs.launchpad.net/dhis2/+bug/1597137 
>> <https://bugs.launchpad.net/dhis2/+bug/1597137>
>> > - EC: would be nice if report date could be embedded in custom forms - 
>> > support for this seems to have been going in and out over the last few 
>> > versions
>> > - TC/EC: Form/font sizes seems to be different for custom forms in the two 
>> > apps. EC size (12p

Re: [Dhis2-devs] Program indicators - option codes or text?

2016-07-01 Thread Markus Bekken
Hi again,
this is fixed in the latest built 2.24 and trunk.

Markus

> 28. jun. 2016 kl. 16.37 skrev markus.bek...@gmail.com:
> 
> Nicely spotted. Codes is used in analytics, but names in the client side 
> calculation. Will fix so codes isused in TC for indicators.
> 
> Markus
> 
> Den 28. jun. 2016 kl. 16.12 skrev Olav Poppe  >:
> 
>> Hi devs, I’ve only tested this in trunk:
>> when configuring program indicators the «Filter» description says: «Use 
>> option codes for option set references.» However, in TC data entry, looking 
>> in the console, it looks like name is used (‘Months’ is name, ‘MONTHS’ is 
>> code).
>> 
>> Evaluation ended up as:
>> ('' && d2:yearsBetween('2000-01-01','') < 5) || 
>> ('Months' == 'DAYS' && 7 < 1825) ||
>> ('Months' == 'WEEKS' && 7 < 520) ||
>> ('Months' == 'MONTHS' && 7 < 60) ||
>> (‘Months’ == 'YEARS' && 7 < 5)
>> 
>> Assume this might be a TC-only discrepancy (e.g. that in analytics, CODE is 
>> actually used), though I’ve not yet been able to test that yet.
>> 
>> Regards
>> Olav
>> 
>> 
>> 

___
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] [Bug 1597981] Re: can't add more than 1 attribute as source field in program rule

2016-07-02 Thread Markus Bekken
** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1597981

Title:
  can't add more than 1 attribute as source field in program rule

Status in DHIS:
  Invalid

Bug description:
  Hi Dev,

  I'm using tracker capture in DHIS2 Version 2.23 R.22977 and get some
  issue with program rules:

  I add 1 attribute as source field to create program rule, it works
  fine, but when I add 1 more attribute, it doesn't work. I found that,
  after click on Add button, it saves successfully, but when I re open a
  program rule, I don't see the new attribute that I just added. This
  happen only with tracked entity attribute, dataElement is working
  fine.

  In addition, is there anyway that I can remove the source field?

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1597981/+subscriptions

___
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] [Bug 1599062] Re: program rule doesn't work onload in tracker capture registration form

2016-07-05 Thread Markus Bekken
** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1599062

Title:
  program rule doesn't work onload in tracker capture registration form

Status in DHIS:
  New

Bug description:
  Hi Dev,

  DHIS 2  Version 2.23 R.22977

  I create a program rule to hide 1 field in registration form Tracker
  Capture app, it's only can hide the field when I click somewhere on
  the form, can't hide the field from beginning when I just open it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1599062/+subscriptions

___
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] Program indicators in data entry (EC)

2016-07-05 Thread Markus Bekken
Hi Olav!

Its tagged 2.25:
https://blueprints.launchpad.net/dhis2/+spec/program-rules-d2-condition

Markus

> 5. jul. 2016 kl. 14.44 skrev Olav Poppe :
> 
> Hi devs,
> is there a timeline for supporting all the different indicator expressions in 
> data entry? E.g. i notice that d2:condition does not work in 2.24 EC/TC.
> 
> Regards
> Olav
> ___
> 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


Re: [Dhis2-devs] Program indicators in data entry (EC)

2016-07-05 Thread Markus Bekken
Sorry that wasn't clear in the blueprint description, but yeah - thats the same 
thing underneath.

Markus

> 5. jul. 2016 kl. 14.51 skrev Olav Poppe :
> 
> Hi, 
> thanks, I didn’t mean support for d2:condition in program rules, but to be 
> able to show program indicators using the d2:condition in the calculation in 
> data entry (but perhaps it is the same thing in the background?)
> 
> Olav
> 
> 
> 
> 
>> 5. jul. 2016 kl. 14.46 skrev Markus Bekken :
>> 
>> Hi Olav!
>> 
>> Its tagged 2.25:
>> https://blueprints.launchpad.net/dhis2/+spec/program-rules-d2-condition
>> 
>> Markus
>> 
>>> 5. jul. 2016 kl. 14.44 skrev Olav Poppe :
>>> 
>>> Hi devs,
>>> is there a timeline for supporting all the different indicator expressions 
>>> in data entry? E.g. i notice that d2:condition does not work in 2.24 EC/TC.
>>> 
>>> Regards
>>> Olav
>>> ___
>>> 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


Re: [Dhis2-devs] TC "complete" modal

2016-07-05 Thread Markus Bekken
Hi Olav. 
The line seems to break in presence of the "Complete event and enrollment" 
button - will make a margin above the button to avoid them clinging together. 
The heading is an explicit style update made in 2.24, but you think the bigger 
header was nicer? :)

Markus

> 5. jul. 2016 kl. 14.30 skrev Olav Poppe :
> 
> Hi devs,
> the «complete» modal in TC does not look very nice. The heading is smaller 
> than than normal, and the cancel button has no space above it.
> 
> Regards
> Olav
> 
> 
> 
> 
> ___
> 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] [Bug 1599062] Re: program rule doesn't work onload in tracker capture registration form

2016-07-06 Thread Markus Bekken
Fixed in latest 2.24 and trunk.

Git:
https://github.com/dhis2/tracker-capture-app/commit/26e2468a76a154a9cc36958fe13b7f20b3050148

** Changed in: dhis2
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1599062

Title:
  program rule doesn't work onload in tracker capture registration form

Status in DHIS:
  Fix Released

Bug description:
  Hi Dev,

  DHIS 2  Version 2.23 R.22977

  I create a program rule to hide 1 field in registration form Tracker
  Capture app, it's only can hide the field when I click somewhere on
  the form, can't hide the field from beginning when I just open it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1599062/+subscriptions

___
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] [Dhis2-users] Issue with Tracker Capture Program Rules not working with sections

2016-09-02 Thread Markus Bekken
Hi Absolom. 
Can you open the browser console(if using Chrome on windows, it is opened with 
F12), and see if there are any red error messages that shows up when you click 
"add source field"?

Markus

> 1. sep. 2016 kl. 13.24 skrev Bridget Magoba :
> 
> Dear Absolom,
> I have a program with sections in version 2.23, program rules work fine.
>  
> From: <> Dhis2-users 
> [mailto:dhis2-users-bounces+bridgetmagoba=mifumi@lists.launchpad.net 
> ] On 
> Behalf Of Absolom MURAMIRA
> Sent: Thursday, September 1, 2016 12:54 PM
> To: dhis2-devs@lists.launchpad.net 
> Cc: dhis2-users
> Subject: [Dhis2-users] Issue with Tracker Capture Program Rules not working 
> with sections
>  
> Dear All,
>  
> I just realized that when you create a program and define sections under 
> program stages, you are not able to define any program rules. When you click 
> the Add Source field, nothing happens and same applies to the actions button. 
> Has anyone else experienced this? Thank you.
>  
> Absolom
> 
> 
>  
> This email has been checked for viruses by Avast antivirus software. 
> www.avast.com 
> ___
> 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


Re: [Dhis2-devs] Program rule - selected field to hide changes to None

2016-09-27 Thread Markus Bekken
Thanks for reporting, Calle. There was a related fix on trunk yesterday night 
that seems to have fixed the below mentioned issue as well. Looking into fixing 
the same in 2.24 now.

Markus


> 27. sep. 2016 kl. 12.16 skrev Calle Hedberg :
> 
> Hi
> 
> This increasingly looks like a significant bug - Elmarie just added a similar 
> program rule (i.e. using a 'MALE' value in the Gender attribute to hide the 
> Pregnant attribute) in another instance, and the result is the same: the 
> action field value is replaced by "None" and there are no drop-down values.
> 
> Regards
> Calle
> 
> On 27 September 2016 at 11:06, Calle Hedberg  > wrote:
> Hi
> 
> I'm having an issue that baffles me: when adding a program rule to a tracker 
> program that checks one attribute in order to hide another attribute, I can 
> initially select and save - everything seems normal.
> 
> But when I open the program rule again, the field to be hidden is showing 
> "None" and there are no values in the drop-down for that selection.
> 
> I have tried to replicate this on the demo, but on the demo the new program 
> rule does not save at all. No error message - it just don't save.
> 
> I then tried to modify an existing program rule ("WHO RMNCH tracker", verify 
> street address) by changing the action from warning to hide field - again I 
> only get "None" in the field drop-down.
> 
> Is this a bug, or am I doing something dumb?
> 
> 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
> 
> ***
> 
> 
> 
> 
> 
> -- 
> *** <>
> 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


Re: [Dhis2-devs] Program rule - selected field to hide changes to None

2016-09-27 Thread Markus Bekken
Hi again, 
It seems saving a programrule for hiding tracked entity attributes works, but 
there was a bug that prevented the tracked entity attributes from being visible 
when reopening the rule.

This is now fixed in 2.24 and trunk, new builds running now. Older versions was 
not affected.

Note: A feature of the old program rules editor is that after saving and 
closing the actions of a rule, it is no longer possible to change the tracked 
entity attribute or data element that each action affects. If an action should 
be changed it is currently necessary to delete and add that action again. This 
will not be necessary in the future program maintenance app.

Best regards,
Markus

> 27. sep. 2016 kl. 13.27 skrev Calle Hedberg :
> 
> Hi,
> 
> Thanks Markus.
> 
> With regard to not being able to edit or add program rules in SL demo, FYI: 
> it was a user rights issue. Logging in as system sorted that problem out - it 
> looks like the standard admin user don't have privileges to do anything on 
> program rules.
> 
> Regards
> calle
> 
> On 27 September 2016 at 13:09, Markus Bekken  <mailto:markus.bek...@gmail.com>> wrote:
> Thanks for reporting, Calle. There was a related fix on trunk yesterday night 
> that seems to have fixed the below mentioned issue as well. Looking into 
> fixing the same in 2.24 now.
> 
> Markus
> 
> 
>> 27. sep. 2016 kl. 12.16 skrev Calle Hedberg > <mailto:calle.hedb...@gmail.com>>:
>> 
>> Hi
>> 
>> This increasingly looks like a significant bug - Elmarie just added a 
>> similar program rule (i.e. using a 'MALE' value in the Gender attribute to 
>> hide the Pregnant attribute) in another instance, and the result is the 
>> same: the action field value is replaced by "None" and there are no 
>> drop-down values.
>> 
>> Regards
>> Calle
>> 
>> On 27 September 2016 at 11:06, Calle Hedberg > <mailto:calle.hedb...@gmail.com>> wrote:
>> Hi
>> 
>> I'm having an issue that baffles me: when adding a program rule to a tracker 
>> program that checks one attribute in order to hide another attribute, I can 
>> initially select and save - everything seems normal.
>> 
>> But when I open the program rule again, the field to be hidden is showing 
>> "None" and there are no values in the drop-down for that selection.
>> 
>> I have tried to replicate this on the demo, but on the demo the new program 
>> rule does not save at all. No error message - it just don't save.
>> 
>> I then tried to modify an existing program rule ("WHO RMNCH tracker", verify 
>> street address) by changing the action from warning to hide field - again I 
>> only get "None" in the field drop-down.
>> 
>> Is this a bug, or am I doing something dumb?
>> 
>> 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 <mailto: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 <mailto:calle.hedb...@gmail.com>
>> Skype: calle_hedberg
>> 
>> ***
>> 
>> 
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> Post to : dhis2-devs@lists.launchpad.net 
>> <mailto:dhis2-devs@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp 
>> <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 <mailto: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] [Bug 1612375] [NEW] Program indicators: error in percentage calculations when using d2:condition (inconsistent results at different levels of aggregation)

2016-10-07 Thread Markus Bekken
Hi there Sam,
thank you for the detailed report.

The division is done with integers when both the inputs are integers. So the 
result of the divison is rounded down from f.ex. 0,66 to 0 before the 
multiplication with 100 happens. You found a workaround yourself, another 
option would be to do the multiplication before the division:
> · sum(d2:condition('#{dBwrot7S420.vANAXwtLwcT}>=10',1,0)) * 100 / 
> V{event_count}


P.S. To get the given example to work on the latest 2.24 and 2.25 snapshot with 
custom aggregation it was also necessary to specify aggregation operator for 
the event count variable:
> · sum(d2:condition('#{dBwrot7S420.vANAXwtLwcT}>=10',1,0)) * 100 / 
> count(V{event_count})


Best regards,
Markus

> 25. aug. 2016 kl. 15.13 skrev Sam Johnson :
> 
> Hi all,
>  
> Just following up on this bug report again – is there any chance I could get 
> it looked at/prioritized?
>  
> I’ve dug a little deeper, and it looks like this bug could be as simple as an 
> error in variable handling.
>  
> Specifically, although in the example I originally gave, the following 
> DOESN’T work:
> · sum(d2:condition('#{dBwrot7S420.vANAXwtLwcT}>=10',1,0)) / 
> V{event_count} * 100
> the following DOES seem to work:
> · sum(d2:condition('#{dBwrot7S420.vANAXwtLwcT}>=10',100,0)) / 
> V{event_count}
>  
> Is it possible that when the aggregation step of the indicator calculation is 
> undertaken, any decimal results are at some point forced to an integer, 
> generating incorrect values wherever the result is <1?
>  
> Cheers,
>  
> Sam.
>  
>  
> From: Dhis2-devs 
>  on behalf 
> of Samuel Scott 
> Date: Tuesday, 23 August 2016 at 15:08
> To: DHIS2 Developers , Lars Helge Øverland 
> 
> Subject: Re: [Dhis2-devs] [Bug 1612375] [NEW] Program indicators: error in 
> percentage calculations when using d2:condition (inconsistent results at 
> different levels of aggregation)
>  
> Hi all,
>  
> I reported a bug in the web program indicator calculations a couple of weeks 
> ago, and included in the report everything that’s needed to quickly replicate 
> the bug, but I don’t think anyone has had a chance to look at this report yet.
>  
> Have I followed the correct process for reporting this?  Is it at all 
> possible to get an idea of when a fix for this might be available?  (It’s 
> quite a serious bug, as ‘valid’ expressions are returning 
> incorrect/inconsistent results at different levels of aggregation.)
>  
> Many thanks,
>  
> Sam.
>  
>  
> From: Dhis2-devs 
>  on behalf 
> of Samuel Scott 
> Reply-To: Bug 1612375 <1612...@bugs.launchpad.net>
> Date: Thursday, 11 August 2016 at 19:21
> To: DHIS2 Developers 
> Subject: [Dhis2-devs] [Bug 1612375] [NEW] Program indicators: error in 
> percentage calculations when using d2:condition (inconsistent results at 
> different levels of aggregation)
>  
> Public bug reported:
>  
> Bug found in 2.22, still present in 2.24 online demo (2.24 rev.23557)
> Online demo accessed using Chrome 52.0.2743.116.
>  
> There appears to be a bug in the program indicator calculations when:
> a sum() custom aggregation is used twice, to enable the calculation of a 
> percentage AND
> an element of the percentage calculation includes d2:condition.
>  
> Note that either of these situations works properly on its own - ie the
> numerator and denominator work perfectly when separated into two
> different indicators - it is only when combined that the bug occurs.
>  
> TO REPRODUCE THIS BUG
>  
> In the online demo instance, using the Antenatal Care Visit program:
>  
> 1. Create a program indicator called TestNumerator, with aggregation type 
> 'custom' and expression:
> sum(d2:condition('#{dBwrot7S420.vANAXwtLwcT}>=10',1,0))
>  
> 2. Create a program indicator called TestDenominator, with aggregation type 
> 'custom' and expression:
> V{event_count}
>  
> 3. Create a program indicator called TestPercentage, with aggregation type 
> 'custom' and expression, which combines these two expressions as a percentage:
> sum(d2:condition('#{dBwrot7S420.vANAXwtLwcT}>=10',1,0)) / V{event_count} * 100
>  
> 4. Create a pivot table based on the Antenatal program, add all three 
> indicators to the pivot, and run it:
> Numerator and denominator calculate correctly, but percentage returns 2/3 = 0 
> (instead of 66.7)
>  
> 5. Now change the Period from Last 12 months to Last 52 weeks, and re-run:
> All indicators now calculate correctly, with percentage correctly showing 0/1 
> = 0 and 2/2 = 100.
>  
>  
> Note that this is not a bug in the event_count variable, as the same bug 
> consistently appears even when V{event_count} is replaced by sum(1) in the 
> indicator expressions.
>  
> I have a project whose viability depends on being able to correctly
> calculate these percentages at higher levels of aggregation (regions
> etc), so if confirmed as a bug, I would be hugely grateful if it were
> possible to fix this in the current release, rather than in 2.25.
>  
> Many thanks, 

Re: [Dhis2-devs] Program rule - selected field to hide changes to None

2016-10-07 Thread Markus Bekken
Hi David,
I need some more info to reproduce. Do I understand that you have hide-rules 
working in other dataelements and tracked entity attributes, but this 
particular hide-rule(s) does not work? Can you reproduce in demo?

It not - is it possible to let me into the instance to debug?

Best regards
Markus

> 7. okt. 2016 kl. 07.56 skrev David Itana :
> 
> Dear DHIS2 community,
>  
> I am experiencing a similar  problem on my instance;
>  
> Version: 2.24
> Build revision: 704143a
> Build date: 2016-10-06 06:20
>  
> I have trying using previous WAR files of 2.24, but results in the same 
> problem.
>  
> The difference is that on my instance the selected fields to hide does not 
> change to none. The fields remain visible on the form but if you try to enter 
> any value, the system throws a message as indicated in the screenshot below. 
> All other program rules related to both tracked entity attributes and the 
> data elements are working properly. 
>  
> Is there anything I am doing wrong?
>  
>  
> 
>  
>  
> Kind regards,
>  
> David
>  
>  
> From: Dhis2-devs [mailto:dhis2-devs-bounces+ditana 
> <mailto:dhis2-devs-bounces%2Bditana>=hispna@lists.launchpad.net 
> <mailto:hispna@lists.launchpad.net>] On Behalf Of Markus Bekken
> Sent: Tuesday, September 27, 2016 3:06 PM
> To: calle.hedb...@gmail.com <mailto:calle.hedb...@gmail.com>
> Cc: dhis2-devs
> Subject: Re: [Dhis2-devs] Program rule - selected field to hide changes to 
> None
>  
> Hi again, 
> It seems saving a programrule for hiding tracked entity attributes works, but 
> there was a bug that prevented the tracked entity attributes from being 
> visible when reopening the rule.
>  
> This is now fixed in 2.24 and trunk, new builds running now. Older versions 
> was not affected.
>  
> Note: A feature of the old program rules editor is that after saving and 
> closing the actions of a rule, it is no longer possible to change the tracked 
> entity attribute or data element that each action affects. If an action 
> should be changed it is currently necessary to delete and add that action 
> again. This will not be necessary in the future program maintenance app.
>  
> Best regards,
> Markus
>  
>> 27. sep. 2016 kl. 13.27 skrev Calle Hedberg > <mailto:calle.hedb...@gmail.com>>:
>>  
>> Hi,
>>  
>> Thanks Markus.
>>  
>> With regard to not being able to edit or add program rules in SL demo, FYI: 
>> it was a user rights issue. Logging in as system sorted that problem out - 
>> it looks like the standard admin user don't have privileges to do anything 
>> on program rules.
>>  
>> Regards
>> calle
>>  
>> On 27 September 2016 at 13:09, Markus Bekken > <mailto:markus.bek...@gmail.com>> wrote:
>>> Thanks for reporting, Calle. There was a related fix on trunk yesterday 
>>> night that seems to have fixed the below mentioned issue as well. Looking 
>>> into fixing the same in 2.24 now.
>>>  
>>> Markus
>>>  
>>>  
>>>> 27. sep. 2016 kl. 12.16 skrev Calle Hedberg >>> <mailto:calle.hedb...@gmail.com>>:
>>>>  
>>>> Hi
>>>>  
>>>> This increasingly looks like a significant bug - Elmarie just added a 
>>>> similar program rule (i.e. using a 'MALE' value in the Gender attribute to 
>>>> hide the Pregnant attribute) in another instance, and the result is the 
>>>> same: the action field value is replaced by "None" and there are no 
>>>> drop-down values.
>>>>  
>>>> Regards
>>>> Calle
>>>>  
>>>> On 27 September 2016 at 11:06, Calle Hedberg >>> <mailto:calle.hedb...@gmail.com>> wrote:
>>>>> Hi
>>>>>  
>>>>> I'm having an issue that baffles me: when adding a program rule to a 
>>>>> tracker program that checks one attribute in order to hide another 
>>>>> attribute, I can initially select and save - everything seems normal.
>>>>>  
>>>>> But when I open the program rule again, the field to be hidden is showing 
>>>>> "None" and there are no values in the drop-down for that selection.
>>>>>  
>>>>> I have tried to replicate this on the demo, but on the demo the new 
>>>>> program rule does not save at all. No error message - it just don't save.
>>>>>  
>>>>> I then tried to modify an existing program rule ("WHO RMNCH tracker", 
>>>>&

Re: [Dhis2-devs] Program indicators and attributes

2016-10-18 Thread Markus Bekken
Hey Olav.
Thanks for reporting. Reproduced this, will fix and get back to you.

Markus

> 18. okt. 2016 kl. 18.56 skrev Olav Poppe :
> 
> Hi devs, we’re having problems making a program indicator that attributes in 
> the filter, using 2.24. We’ve tried different types of attributes (number, 
> option sets), but none of them work. Looking at the web console, those with 
> text-type attributes becomes '' and numeric becomes 0. Any advice? See 
> screenshots.
> 
> Regards
> Olav
> 
>  17.38.37.png>
> ___
> 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


Re: [Dhis2-devs] Program indicators and attributes

2016-10-19 Thread Markus Bekken
Hey again Olav,
this is fixed in the latest 2.24, and shortly in 2.25 and master.

Markus

> 19. okt. 2016 kl. 00.36 skrev Markus Bekken :
> 
> Hey Olav.
> Thanks for reporting. Reproduced this, will fix and get back to you.
> 
> Markus
> 
>> 18. okt. 2016 kl. 18.56 skrev Olav Poppe :
>> 
>> Hi devs, we’re having problems making a program indicator that attributes in 
>> the filter, using 2.24. We’ve tried different types of attributes (number, 
>> option sets), but none of them work. Looking at the web console, those with 
>> text-type attributes becomes '' and numeric becomes 0. Any advice? See 
>> screenshots.
>> 
>> Regards
>> Olav
>> 
>> > 17.38.37.png>
>> ___
>> 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


Re: [Dhis2-devs] [Dhis2-users] Tracker incident dates changes

2016-10-20 Thread Markus Bekken
Hi David, 
what is the time zone of the server? This is a known bug when you have a time 
zone different than UTC.

Markus

> 20. okt. 2016 kl. 09.31 skrev David Itana :
> 
> Dear DHIS community
>  
> I am using tracker Version: 2.24, Build revision: e2f8d0e, Build date: 
> 2016-10-13 06:20. I have configured a three stage program with registration 
> which is giving the problemlisted below.
>  
> After clicking complete button on the enrollment or refreshing/logging out of 
> the system, the incident dates of all program stages changes to some strange 
> dates as seen in the screenshot below. The calendar is set to ISO 8601 with 
> date format set to dd-MM-yyy.
>  
> Is this a known problem with this version or are there any settings which are 
> not properly set up?
>  
> 
>  
> Best regards,
>  
> David
>  
>  
>  
>  
>  
>  
>  
> ___
> Mailing list: https://launchpad.net/~dhis2-users 
> 
> Post to : dhis2-us...@lists.launchpad.net 
> 
> Unsubscribe : https://launchpad.net/~dhis2-users 
> 
> 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] [Bug 1635583] Re: Program indicators are not properly evaluated

2016-10-28 Thread Markus Bekken
** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1635583

Title:
  Program indicators are not properly evaluated

Status in DHIS:
  New

Bug description:
  - Stable demo at DHIS2 site - tracker capture module
  - 
  - MCH/PNC program
  - Age at visit and Age at visit calc from days indicators are not refreshed 
when walking through different visits

  
  Current user:
  admin
  Version:
  2.25
  Build revision:
  36bf2d9
  Build date:
  2016-10-21 06:37
  Jasper reports version:
  6.1.0
  User agent:
  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/53.0.2785.143 Safari/537.36

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1635583/+subscriptions

___
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] Issue with calculation of Age through program indicator

2016-11-03 Thread Markus Bekken
Hi there Saurabh,

The d2:yearsBetween() is not yet supported in the server side aggregation of 
program indicators. For now you would have to use d2:daysBetween() / 365 - 
which is not 100% correct as the leap years is not considered. You wrote 
d2daysBetween in your mail below(without the colon between d2 and daysBetween), 
but i assume that was a typo in the mail. 
If you used the expression 
d2:daysBetween(A{yourDateOfBirthAttributeUID},V{event_date}) / 365 that should 
work fine on both the server and client side. Let me know if this was the 
expression you tried. Note that the attribute UID should be prefixed with A. 

In the dev instance the example indicators on the MNCH / PHC program use the 
V{event_date} as basis for the age calculation. This causes the indicators to 
be calculated to NaN until you enter an event date. If you do not explicitly 
want the age at the event, you can use V{enrollment_date} instead.

Markus

P.S. The attributes of type date is not shown in the expression part of the 
Program Indicator UI, only in the filter further down. This is all getting 
reworked and sorted out soon, but as a workaround for avoiding typos you can 
add the attribute in the filter part of the UI then cut'n'paste.

> 18. okt. 2016 kl. 18.11 skrev Saurabh :
> 
> Hi Devs
>  
> Have been trying to create a program indicator for calculation of Age (in 
> years) using the ‘d2yearsBetween’ expression (have tried with ‘d2daysBetween’ 
> as well), and then putting the attribute for date of birth, and event/current 
> date. The date of birth is not part of the attribute list in the ‘Expression’ 
> part of the program indicator, hence the attribute UID (for DOB) is used 
> instead in the expression.
>  
> Although the expression is shown as valid, but the output is still ‘NaN’.
>  
> Similar indicators are available on the dev instance 
> (https://play.dhis2.org/dev/ ) for the MNCH 
> program for Mother’s Age at visit in years/days, but there also the value 
> shows as ‘NaN’.
>  
> Would appreciate some help around this, if this can be fixed, or we are doing 
> something wrong here!
>  
> Regards
>  
> Saurabh
>  
> ___
> 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


Re: [Dhis2-devs] update tracker profile form

2016-11-04 Thread Markus Bekken
Maybe you are being hit bu this? Unique in program does not work properly and 
was therefore removed as an option in the uniqueness scope for tracked entity 
attributes. Probably this was not backported all the way to 2.21. 

Try a different uniqueness scope for your attributes, and see if that helps.

https://bugs.launchpad.net/dhis2/+bug/1569793


> 4. nov. 2016 kl. 09.39 skrev Lars Helge Øverland :
> 
> This seems to be the relevant part of the tomcat log. Abyot can you see what 
> the problem is?
> 
> ---
> 
> 04-Nov-2016 10:57:08.013 SEVERE [http-nio-8080-exec-4] 
> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for 
> servlet [webapi] in context with path [/2.21-raw] threw exception [Request 
> processing failed; nested exception is java.lang.IllegalArgumentException: 
> program is required for program scope] with root cause
>  java.lang.IllegalArgumentException: program is required for program scope
>   at org.springframework.util.Assert.notNull(Assert.java:112)
>   at 
> org.hisp.dhis.trackedentity.DefaultTrackedEntityAttributeService.validateScope(DefaultTrackedEntityAttributeService.java:221)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>   at 
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>   at 
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>   at 
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>   at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>   at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>   at com.sun.proxy.$Proxy57.validateScope(Unknown Source)
>   at 
> org.hisp.dhis.dxf2.events.trackedentity.AbstractTrackedEntityInstanceService.checkScope(AbstractTrackedEntityInstanceService.java:553)
>   at 
> org.hisp.dhis.dxf2.events.trackedentity.AbstractTrackedEntityInstanceService.checkAttributes(AbstractTrackedEntityInstanceService.java:582)
>   at 
> org.hisp.dhis.dxf2.events.trackedentity.AbstractTrackedEntityInstanceService.updateTrackedEntityInstance(AbstractTrackedEntityInstanceService.java:327)
>   at 
> org.hisp.dhis.dxf2.events.trackedentity.JacksonTrackedEntityInstanceService.updateTrackedEntityInstanceJson(JacksonTrackedEntityInstanceService.java:198)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>   at 
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>   at 
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>   at 
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>   at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>   at com.sun.proxy.$Proxy199.updateTrackedEntityInstanceJson(Unknown 
> Source)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at 
> org.springframework.aop.su

Re: [Dhis2-devs] [issue] Metadata Import fails when modifying a tracker program and tracker program stage

2016-11-04 Thread Markus Bekken
Hi Archana!
I'll let Morten or someone else comment on possible fixes, but recently had the 
same problem as you describe in "with registration" below. I didn't dig to the 
bottom of it but found a workaround: You can manually clean out the 
program_attribute rows connected to the program(s) being imported.
delete from program_attributes where programid = ;

The second problem you describe you should be able to work around in the same 
way, but then cleaning out the programstagedataelements entries for your 
program(s). 
delete from programstagedataelement where programstageid in(select 
programstageid from programstage where programid = );

If trying this workarounds you should back up your db first.

Markus

> 4. nov. 2016 kl. 10.07 skrev Archana Chillala :
> 
> Hi, 
> 
> We are using the latest version of DHIS 2.25 (build - 5e16867). We have two 
> instances of DHIS and are trying to sync metadata from one instance to the 
> other. Sync is failing for the following cases.
> 
> 
> Modifying a Tracker program (i.e. program “with registration”)  
> 
> * INFO  2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type 
> ProgramTrackedEntityAttribute (DefaultObjectBundleService.java 
> [http-bio-8080-exec-7])
> * WARN  2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 
> (SqlExceptionHelper.java [http-bio-8080-exec-7])
> * ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique 
> constraint "programtrackedentityattribute_unique_key"
>   Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. 
> (SqlExceptionHelper.java [http-bio-8080-exec-7])
> * ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the 
> metadata. could not execute statement (MetadataSyncImportHandler.java 
> [http-bio-8080-exec-7])
> org.hibernate.exception.ConstraintViolationException: could not execute 
> statement
>   at 
> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
>   at 
> org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
>   at 
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
>   at 
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
>   at 
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
>   at 
> org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
>   at 
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
>   at 
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
>   at 
> org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
>   at 
> org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
>   at 
> org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
>   at 
> org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
>   at 
> org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
>   at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
>   at 
> org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value 
> violates unique constraint "programtrackedentityattribute_unique_key"
>   Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
>   at 
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
>   at 
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
>   at 
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
>   at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
>   at 
> org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
>   at 
> org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
>   at 
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
>   at 
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> 
> 
> 
> Modifying the program stage of a Tracker program (i.e. program “with 
> registration”)
> 
> * INFO  2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type 
> ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> * INFO  2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type 
> ProgramStageDataElement (DefaultObjectBundleService.java 
> [http-bio-8080-exec-10])
> * ERROR 2016-

Re: [Dhis2-devs] Program Rules: NULL is not defined

2016-11-19 Thread Markus Bekken
Hi there,

There should not be any incompatibilities between 2.24 and 2.25 program rules. 
Can you provide a login privately so I can debug and try to uncover the problem?

In program rules, NULL is not supported. You can use 
d2:hasValue('variableName'), this statement will be true if the value is not 
blank or non-existing. You can alternatively use #{variableName} != '' (double 
hyphens).

Best regards,
Markus

> 19. nov. 2016 kl. 06.43 skrev Immaculate Ayebazibwe :
> 
> Hi guys,
> We created Program Rules in 2.24 but after an upgrade to 2.25 they are not 
> working. Have you experienced any thing like this, or did we do something 
> wrong.
> 
> Also I have noticed that the system does not recognise NULL, Null, when I 
> inspect element it shows warning NULL is not defined.
> I tried using null, but this does not work as it should, in other wards i get 
> the opposite of the expected results.
> Any ideas? 
> Have there been any changes in the database?
> Because we have used NULL/Null/null both in program rules and indicators a 
> lot.
> I get the same results on Demo
> 
> Appreciate your response!!
> 
> 
> 
> Thank you and Kind Regards
> Immarcqulate. A (Emma Kassy) 
> 
> "You miss 100% of the shots you don't take."

___
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] Program rule actions of type ASSIGN not working on SCHEDULED events

2016-11-25 Thread Markus Bekken
Hi there,
thank you for the detailed report below. 
This problem was fixed and released around the time of the original request, 
but for some reason has not been included in the later 2.25 builds. I 
redeployed and rebuilt the code now, please try again with the latest 2.25.
(https://github.com/dhis2/tracker-capture-app/commit/65bb19748991ee4cc9f971b4a310bf652895fb95)

Markus

> 23. nov. 2016 kl. 20.33 skrev Alejandro :
> 
> Hi!
>  
> Any feedback on this issue so far? In case it is of any help, I noticed the 
> following. When updating one dataelement in an event that was directly added 
> (sign + in the user interface of the Tracker Capture) the payload generated 
> was:
> 
> {"event":"donHXNZZSoH","orgUnit":"ElSpSqucvZg","program":"ORvg6A5ed7z","programStage":"tmsr4EJaSPz","status":"ACTIVE","trackedEntityInstance":"v3YvuAkhpWs","dataValues":[{"dataElement":"xMYPMdmM3aY","value":5,"providedElsewhere":false}]}
> 
> 
> 
> On the contrary, when updating the same dataelement in an event filled out 
> after being scheduled (first scheduled, then assigned a date and filled out), 
> the resulting payload was:
> 
> {"event":"Ev4dLx6ujXm","orgUnit":"ElSpSqucvZg","program":"ORvg6A5ed7z","programStage":"tmsr4EJaSPz","status":"SCHEDULE","trackedEntityInstance":"v3YvuAkhpWs","dataValues":[{"dataElement":"iiRV3pv52oc","value":5,"providedElsewhere":false}]}
> 
>  
> It seems that the flag/property status is not updated to ACTIVE once the 
> previous scheduled event is filled out and maybe this might be the cause of 
> not executing programRuleActions (if there is some conditional code checking 
> the status).
> 
> This would be a very good improvement to us, since our programs contain many 
> ASSIGN programRuleActions and not being able to schedule events prevents us 
> from using standard functionalities such as Upcoming Events and Overdue 
> Events.
>  
> Many thanks in advance!
> Alejandro
> 
> 
> On Thu, Nov 10, 2016 at 10:05 AM, Victor Garcia  > wrote:
> Hi all,
> 
> we have noticed a buggy behavior when using program rule actions of type 
> ASSIGN in scheduled events. The program rule is correctly evaluated, but the 
> program rule action does not assign the desired value to the dataelement in 
> that event. This happens only when the event is created using the visit 
> scheduler. If the event is created using the "Add new event" button the 
> program rule action works fine.
> 
> The steps to reproduce the issue:
> 1. Create a programRuleVariable of type "DATAELEMENT_CURRENT_EVENT" with the 
> dataelement we want to copy.
> 2. Create a programRule limited to that programStage.
> 3. Assign a programRuleAction of type ASSIGN, with the previously crated 
> programRuleVariable as the "data" and a dataelement as the target.
> 
> I couldn't access demo server to reproduce the issue (it seems that admin 
> password has been changed), but I did in dev server and created an example 
> that you can easily verify until it is reset tonight. It is in the program 
> "WHO RMNCH Tracker", in the stage "Postpartum care visit". I added a new 
> dataelement called "Copy HIV test result" just below "HIV test result" that 
> copies its value. You can verify that if the stage is created using the "Add 
> event button" the value is correctly copied; but it the stage is added using 
> the visit scheduler, the value is not copied.
> 
> If there is doubt please let me know.
> 
> Thank you!
> 
> Víctor
> 
> ___
> 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

___
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] [Dhis2-users] Program rules to show/hide sections.

2016-12-04 Thread Markus Bekken
Hey there Arun,
Which version of DHIS are you using? And is this tracker or event capture? It 
seems there is a bug when several rules are working to hide or show the same 
section - one of the rules will always win. What should have happened is of 
course what you expected: The section should be hidden if one or more rules 
tries to hide it. Will get back to you with a fix for this.

Markus

> 4. des. 2016 kl. 08.43 skrev Arun Paul :
> 
> Hello,
> 
> I am finding problem in doing dynamical hide and show of sections in a 
> program form. It works well if there is only one section to hide and show, 
> but acts weird if there are 2-3 sections to hide and show. 
> 
> This is how I have designed the form.
> 
> My intention was to show the relevant risk factor section when a cancer type 
> is selected.
> 
> Type of cancer: Breast/Cervical/GI
> Section- 1: Breast cancer risk factors
> Section - 2: Cervical cancer risk factors
> Section - 3: GI cancer risk factor.
> 
> Program rule 1: When 'Type of Cancer' == 'Breast' , Hide section2&3.
> Program rule 2: When 'Type of Cancer' == 'Cervical' , Hide section1&3.
> Program rule 3: When 'Type of Cancer' == 'GI' , Hide section1&2.
> 
> It was working well when I had section1&2 and only 2 program rules with those 
> sections, but when I added section 3 and changed program rules like above, 
> the UI did not behave like I wanted.
> Is this a bug? or the wrong way I created the rules?
> 
> Thanks,
> Arun
> 
> 
> 
> 
> 
> 
> Cheers,
> - Arun Paul
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] [Dhis2-users] Program rules to show/hide sections.

2016-12-08 Thread Markus Bekken
Hi there,
Aruns original problem was that he had two rules that was hiding the same 
section. Gitika provided a workaround, but now the underlying cause is fixed in 
2.24 -> 

If you have the same underlying problem, your section rules should now work. If 
your problem persists, please send more info on your version and how your rules 
is configured.

Best regards,
Markus

> 5. des. 2016 kl. 18.27 skrev usuario tecugi :
> 
> Hi all,
> 
> Taking advantage of this message, we are using DHIS Version 2.24 and we have 
> the same issue: No section is hidden.
> 
> Attached you will find a screenshot.
> 
> Please let us know your thoughts.
> 
> Regards,
> 
> On Mon, Dec 5, 2016 at 1:24 AM, Arun Paul  <mailto:paul.a...@gmail.com>> wrote:
> Thanks Gitika,
> Good suggestion. This works for me!
> 
> Cheers,
> - Arun Paul
> 
> On Mon, Dec 5, 2016 at 12:38 PM, gitika arora  <mailto:gitik...@gmail.com>> wrote:
> Hi Arun,
> 
> It might help if you create your rules based on section that is to be hidden 
> and not based on condition. This way you will have all the conditions to hide 
> a section in one rule itself.
> 
> For eg- if you create following 3 rules, these should work-
> 
> Program rule 1: When 'Type of Cancer' == 'Cervical' OR 'Type of Cancer' == 
> 'GI'  , Hide section 1
> Program rule 2: When 'Type of Cancer' == 'Breast' OR 'Type of Cancer' == 'GI' 
> , Hide section 2
> Program rule 3: When 'Type of Cancer' == 'Cervical' OR 'Type of Cancer' == 
> 'Breast' , Hide section 3
> 
> 
> 
> On Mon, Dec 5, 2016 at 12:28 PM, Arun Paul  <mailto:paul.a...@gmail.com>> wrote:
> Hi Markus,
> 
> I am using Tracker.
> Version is 2.23, but I tried this on the demo site (2.25) it's reproducible 
> there too.
> It will be great to get a fix for this.
> 
> Thanks,
> Arun
> 
> 
> 
> 
> Cheers,
> - Arun Paul
> 
> On Mon, Dec 5, 2016 at 12:07 PM, Markus Bekken  <mailto:markus.bek...@gmail.com>> wrote:
> Hey there Arun,
> Which version of DHIS are you using? And is this tracker or event capture? It 
> seems there is a bug when several rules are working to hide or show the same 
> section - one of the rules will always win. What should have happened is of 
> course what you expected: The section should be hidden if one or more rules 
> tries to hide it. Will get back to you with a fix for this.
> 
> Markus
> 
>> 4. des. 2016 kl. 08.43 skrev Arun Paul > <mailto:paul.a...@gmail.com>>:
>> 
>> Hello,
>> 
>> I am finding problem in doing dynamical hide and show of sections in a 
>> program form. It works well if there is only one section to hide and show, 
>> but acts weird if there are 2-3 sections to hide and show. 
>> 
>> This is how I have designed the form.
>> 
>> My intention was to show the relevant risk factor section when a cancer type 
>> is selected.
>> 
>> Type of cancer: Breast/Cervical/GI
>> Section- 1: Breast cancer risk factors
>> Section - 2: Cervical cancer risk factors
>> Section - 3: GI cancer risk factor.
>> 
>> Program rule 1: When 'Type of Cancer' == 'Breast' , Hide section2&3.
>> Program rule 2: When 'Type of Cancer' == 'Cervical' , Hide section1&3.
>> Program rule 3: When 'Type of Cancer' == 'GI' , Hide section1&2.
>> 
>> It was working well when I had section1&2 and only 2 program rules with 
>> those sections, but when I added section 3 and changed program rules like 
>> above, the UI did not behave like I wanted.
>> Is this a bug? or the wrong way I created the rules?
>> 
>> Thanks,
>> Arun
>> 
>> 
>> 
>> 
>> 
>> 
>> Cheers,
>> - Arun Paul
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> Post to : dhis2-us...@lists.launchpad.net 
>> <mailto:dhis2-us...@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> More help   : https://help.launchpad.net/ListHelp 
>> <https://help.launchpad.net/ListHelp>
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users 
> <https://launchpad.net/~dhis2-users>
> Post to : dhis2-us...@lists.launchpad.net 
> <mailto:dhis2-us...@lists.launchpad.net>
> Unsubscribe : https://launchpad.n

Re: [Dhis2-devs] "Error"-type program ruled triggered before data entry opens

2017-01-04 Thread Markus Bekken
Hi Olav, 
until recently the "Show error preventing completion" was ignored by the 
registration form. To have it more uniform with how other rules relate to the 
registration form - and support the "First stage appears on registration page" 
better - this was changed. Now the rules are being run in the same way as other 
rules, and the errors is displayed preventing registration/enrollment. However, 
assuming the "First stage appears on registration page" option is not used, all 
the variables will have their default values. Numeric fields will be evaluated 
as 0 for example, and most other data types will be considered empty strings 
for evaluation purposes. The d2:hasValue('variableName') should evaluate to 
false.

Perhaps you can add a clause making sure the rule only triggers when you want? 
For example adding && d2:hasValue('variableName')

Another and perhaps more elegant option it to tell the rule to run only on a 
certain program stage. This has no UI at the moment and require you to edit 
through the API or directly in the database. If you assign the programStage 
attribute of the programRule, or populate the programstage column of the 
programrule database table, that particular rule will only run for the program 
stage you have assigned.

Markus

> 4. jan. 2017 kl. 14.34 skrev Olav Poppe :
> 
> Hi devs, I have a tracker program with registration, with a few program rules 
> of the type «Show error preventing completion». The program has only one 
> stage, which is auto-generated and opened for data entry on registration. 
> 
> In the latest builds of 2.24 and 2.25, these rules are triggered as soon as I 
> click «Save and continue» on the registration page, and I get a message 
> «Please review and fix the following error(s) before registering:». However, 
> all the variables in the program rules relate to data elements in the program 
> stage and not TEI attributes, so I wouldn’t expect them to run until I try to 
> complete the program stage. As it is now, it is not possible to even get to 
> the program stage data entry.
> 
> Any ideas on whether this could be some sort of setting/configuration issue, 
> or if its a bug? I doesn’t seem to behave the same way on the demo instance 
> when I tried to add a similar rule there.
> 
> Regards
> Olav
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Program Indicators

2017-01-13 Thread Markus Bekken
Hi there Seth,
the option set codes only need to be unique within each option set. 

One option set can be
Male - 1 
Female - 2

And another can be 
Yes - 1
No - 0 

But when your option set is
Male - 1
Female - 1
...then the two options will always be seen as "1" when analyzing the data.

Markus

> 13. jan. 2017 kl. 07.54 skrev Seth Okeyo :
> 
> Hello Busoye,
> Yes, in event reports, it works fine, but my intention is to make Program 
> indicators which someone else can work with. does it mean every option set 
> has to have a unique code across all the other option sets?
> Regards
> 
> Seth Okeyo <>| Data Management Officer
> Drugs for Neglected Diseases initiative – Africa Regional Office
> Tetezi Towers, 3rd Floor, George Padmore Road, Kilimani|  P.O. Box 21936 - 
> 00505| Nairobi | Kenya
> T: +254 020 3995000 | M: +254 727 389 149| sok...@dndi.org 
>  | skype: dndi_seth.okeyo
> Best Science for the Most Neglected | www.dndi.org 
> From: Busoye Anifalaje mailto:bus...@baosystems.com>>
> Sent: Thursday, January 12, 2017 5:05:43 PM
> To: Seth Okeyo
> Cc: dhis2-users; Dhis2-devs; DHIS 2 developers; Groupe Francophone du DHIS 2; 
> GROUT, Lise
> Subject: Re: [Dhis2-users] Program Indicators
>  
> For a single option set, the options should have unique codes otherwise there 
> would be no way to identify and analyse these through program indicators. For 
> instance if your code for Male and Female are both 1, then this isn’t going 
> to work. 
> 
> From your example, let’s say your code for Male is 1. Assuming the Value Type 
> for the option text is Text, the filter should be something like this 
> 
> 
> filter:
>> #{yUVXpYVeY6I.Z8W89lDV4IL} ==‘1'
>> 
>> (Demographics, Admission and Treatment.Gender ==‘1')
> 
> If you do not have unique codes, you can still get the results in Event 
> reports. In this case, choose your Program and Program stage. Select the data 
> element and then use the filter next to the data element name to choose 
> “Male” or “Female” (see attached example).
> 
> Cheers
> 
> 
> - -
> 
> 
> Busoye Anifalaje (PhD)
> Director of Services (Principal), BAO Systems
> UK: +44 7901-740-757 | US: +1 682-307-0986|
>  bus...@baosystems.com  | 
> http://www.baosystems.com  |
> Skype: busoye | 2900 K Street, Suite 404, Washington D.C. 20007
> 
> 
> 
> 
>> On 12 Jan 2017, at 13:54, Seth Okeyo > > wrote:
>> 
>> Hi Busoye,
>> In the codes, I used numbers,1,2,3,..x, which makes them the same across 
>> different option sets.
>> but this, does not work too.
>> regards
>> 
>> Seth Okeyo <>| Data Management Officer
>> Drugs for Neglected Diseases initiative – Africa Regional Office
>> Tetezi Towers, 3rd Floor, George Padmore Road, Kilimani|  P.O. Box 21936 - 
>> 00505| Nairobi | Kenya
>> T: +254 020 3995000 | M: +254 727 389 149| sok...@dndi.org 
>>  | skype: dndi_seth.okeyo
>> Best Science for the Most Neglected | www.dndi.org 
>> From: Busoye Anifalaje mailto:bus...@baosystems.com>>
>> Sent: Thursday, January 12, 2017 3:53:25 PM
>> To: Seth Okeyo
>> Cc: dhis2-users; Dhis2-devs; DHIS 2 developers; Groupe Francophone du DHIS 
>> 2; GROUT, Lise
>> Subject: Re: [Dhis2-users] Program Indicators
>>  
>> Hi Seth,
>> 
>> You should try using the code instead of the label name. Version 2.22 also 
>> has a code.
>> 
>> 
>> 
>> - -
>> 
>> 
>> Busoye Anifalaje (PhD)
>> Director of Services (Principal), BAO Systems
>> UK: +44 7901-740-757 | US: +1 682-307-0986|
>>  bus...@baosystems.com  | 
>> http://www.baosystems.com  |
>> Skype: busoye | 2900 K Street, Suite 404, Washington D.C. 20007
>> 
>>> On 12 Jan 2017, at 12:28, Seth Okeyo >> > wrote:
>>> 
>>> Hi Busoye
>>> I'm using the label name for option set... we are running version 2.22.
>>> Regards
>>> 
>>> Seth Okeyo <>| Data Management Officer
>>> Drugs for Neglected Diseases initiative – Africa Regional Office
>>> Tetezi Towers, 3rd Floor, George Padmore Road, Kilimani|  P.O. Box 21936 - 
>>> 00505| Nairobi | Kenya
>>> T: +254 020 3995000 | M: +254 727 389 149| sok...@dndi.org 
>>>  | skype: dndi_seth.okeyo
>>> Best Science for the Most Neglected | www.dndi.org 
>>> From: Busoye Anifalaje >> >
>>> Sent: Thursday, January 12, 2017 2:56:53 PM
>>> To: Seth Okeyo
>>> Cc: dhis2-users; Dhis2-devs; DHIS 2 developers; Groupe Francophone du DHIS 
>>> 2; GROUT, Lise
>>> Subject: Re: [Dhis2-users] Program Indicators
>>>  
>>> Hi Seth,
>>> 
>>> Are you are using the code for the option set value instead of the label 
>>> name?
>>> 
>>> Cheers,
>>> 
>>> - -
>>> 
>>> 
>>> Busoye Anifalaje (PhD)
>>> Director of Services (Principal), BAO Systems
>>> UK: +44 7901-740-757 | US: +1 682-307-0986|
>>>  bus...@baosystems.com 

Re: [Dhis2-devs] [Dhis2-users] Program Indicators

2017-01-13 Thread Markus Bekken
Hi Seth,
If the data type is numeric, there should not be any quotes. See example in 
27.4.1.3. About filters: 27.4.1. About program indicators

It seems you already tried this though, perhaps I can have a look in your 
instance if you send me login info privately. 

Markus

> 13. jan. 2017 kl. 10.42 skrev Seth Okeyo :
> 
> Hello Marcus,
> Thank you very much, I have the options in the right format as you have said, 
> now the problem is,
> do I use quotation marks for the numerical codes i.e. 
> 
> #{yUVXpYVeY6I.Z8W89lDV4IL} ==‘1'
> 
> 
> (Demographics, Admission and Treatment.Gender ==‘1')
> 
> 
> or just 
> 
> #{yUVXpYVeY6I.Z8W89lDV4IL} ==1
> 
> 
> (Demographics, Admission and Treatment.Gender ==‘1')
> 
> 
> both of them do not bring any results
> Regards.
> 
> Seth Okeyo <>| Data Management Officer
> Drugs for Neglected Diseases initiative – Africa Regional Office
> Tetezi Towers, 3rd Floor, George Padmore Road, Kilimani|  P.O. Box 21936 - 
> 00505| Nairobi | Kenya
> T: +254 020 3995000 | M: +254 727 389 149| sok...@dndi.org 
> <mailto:sok...@dndi.org> | skype: dndi_seth.okeyo
> Best Science for the Most Neglected | www.dndi.org <http://www.dndi.org/>
> From: Markus Bekken mailto:markus.bek...@gmail.com>>
> Sent: Friday, January 13, 2017 11:24:06 AM
> To: Seth Okeyo
> Cc: Busoye Anifalaje; dhis2-users; Dhis2-devs; Groupe Francophone du DHIS 2; 
> DHIS 2 developers
> Subject: Re: [Dhis2-users] Program Indicators
>  
> Hi there Seth,
> the option set codes only need to be unique within each option set. 
> 
> One option set can be
> Male - 1 
> Female - 2
> 
> And another can be 
> Yes - 1
> No - 0 
> 
> But when your option set is
> Male - 1
> Female - 1
> ...then the two options will always be seen as "1" when analyzing the data.
> 
> Markus
> 
>> 13. jan. 2017 kl. 07.54 skrev Seth Okeyo > <mailto:sok...@dndi.org>>:
>> 
>> Hello Busoye,
>> Yes, in event reports, it works fine, but my intention is to make Program 
>> indicators which someone else can work with. does it mean every option set 
>> has to have a unique code across all the other option sets?
>> Regards
>> 
>> Seth Okeyo <>| Data Management Officer
>> Drugs for Neglected Diseases initiative – Africa Regional Office
>> Tetezi Towers, 3rd Floor, George Padmore Road, Kilimani|  P.O. Box 21936 - 
>> 00505| Nairobi | Kenya
>> T: +254 020 3995000 | M: +254 727 389 149| sok...@dndi.org 
>> <mailto:sok...@dndi.org> | skype: dndi_seth.okeyo
>> Best Science for the Most Neglected | www.dndi.org <http://www.dndi.org/>
>> From: Busoye Anifalaje mailto:bus...@baosystems.com>>
>> Sent: Thursday, January 12, 2017 5:05:43 PM
>> To: Seth Okeyo
>> Cc: dhis2-users; Dhis2-devs; DHIS 2 developers; Groupe Francophone du DHIS 
>> 2; GROUT, Lise
>> Subject: Re: [Dhis2-users] Program Indicators
>>  
>> For a single option set, the options should have unique codes otherwise 
>> there would be no way to identify and analyse these through program 
>> indicators. For instance if your code for Male and Female are both 1, then 
>> this isn’t going to work. 
>> 
>> From your example, let’s say your code for Male is 1. Assuming the Value 
>> Type for the option text is Text, the filter should be something like this 
>> 
>> 
>> filter:
>>> #{yUVXpYVeY6I.Z8W89lDV4IL} ==‘1'
>>> 
>>> (Demographics, Admission and Treatment.Gender ==‘1')
>> 
>> If you do not have unique codes, you can still get the results in Event 
>> reports. In this case, choose your Program and Program stage. Select the 
>> data element and then use the filter next to the data element name to choose 
>> “Male” or “Female” (see attached example).
>> 
>> Cheers
>> 
>> 
>> - -
>> 
>> 
>> Busoye Anifalaje (PhD)
>> Director of Services (Principal), BAO Systems
>> UK: +44 7901-740-757 | US: +1 682-307-0986|
>>  bus...@baosystems.com <mailto:bus...@baosystems.com> | 
>> http://www.baosystems.com <http://www.baosystems.com/> |
>> Skype: busoye | 2900 K Street, Suite 404, Washington D.C. 20007
>> 
>> 
>> 
>> 
>>> On 12 Jan 2017, at 13:54, Seth Okeyo >> <mailto:sok...@dndi.org>> wrote:
>>> 
>>> Hi Busoye,
>>> In the codes, I used numbers,1,2,3,..x, which makes them the same 
>>> across different option sets.
>>> but this, does not work too.
>>> regards
>>> 
>>> Seth Okeyo <>| Data Management Officer

Re: [Dhis2-devs] Error in Program Rule

2017-01-16 Thread Markus Bekken
Hi Rady, 
I could not reporoduce the error in my local or on the demo server, but they 
are running a newer version of 2.25. Is there a possibility to update your 
server to the latest 2.25? If you still have the problem on the latest 2.25, it 
would be good if you can send a database dump privately for debugging. 

Best regards
Markus

> 16. jan. 2017 kl. 09.51 skrev Rady :
> 
> Dear Erling and Lars,
> 
> Please see attached screen record of my pc for more detail. I also tried to
> remove that Program Rule but cannot and when I edit that program rule and
> remove one section/field and click update, proposed error occur.
> 
> [image: Inline image 2]
> 
> Please advise,
> Rady
> 
> On Mon, Jan 16, 2017 at 3:32 PM, Erling Fjelstad  > wrote:
> 
>> Hi Rady,
>> Have you recently upgraded your DHIS2 version to 2.25? If so, a solution
>> can be to recreate the program rule and delete the one which is failing to
>> update
>> 
>> Regards,
>> Erling
>> 
>> On Mon, Jan 16, 2017 at 9:05 AM Lars Helge Øverland 
>> wrote:
>> 
>>> Hi Rady,
>>> 
>>> okay - can you reproduce this against the demo server?
>>> 
>>> https://play.dhis2.org/demo/
>>> 
>>> regards,
>>> 
>>> Lars
>>> 
>>> On Mon, Jan 16, 2017 at 6:00 AM, Rady  wrote:
>>> 
>>> Dear all DHIS2 teams,
>>> 
>>> Currently I'm working on DHIS2 tracker capture using DHIS2 2.25, build: 
>>> 1862277,
>>> build date: 2016-12-21 06:37. While working on Program Rules to set
>>> rules on some fields of tracker capture, I found an error while updating a
>>> Program Rule (see in attached figure below).
>>> 
>>> [image: Inline image 1]
>>> Please advise me if something went wrong with my configuration?
>>> 
>>> Thanks and regards,
>>> Rady
>>> 
>>> ___
>>> 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
>>> 
>> 
> ___
> 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


Re: [Dhis2-devs] Error in Program Rule

2017-01-17 Thread Markus Bekken
Thank you for the database Rady.

Found that the problem was triggered by an apostrophe in a program stage 
section name. This weakness is fixed now - please try again with the latest 
2.25.

Best regards,
Markus

> 16. jan. 2017 kl. 23.02 skrev Markus Bekken :
> 
> Hi Rady, 
> I could not reporoduce the error in my local or on the demo server, but they 
> are running a newer version of 2.25. Is there a possibility to update your 
> server to the latest 2.25? If you still have the problem on the latest 2.25, 
> it would be good if you can send a database dump privately for debugging. 
> 
> Best regards
> Markus
> 
>> 16. jan. 2017 kl. 09.51 skrev Rady > <mailto:tryr...@gmail.com>>:
>> 
>> Dear Erling and Lars,
>> 
>> Please see attached screen record of my pc for more detail. I also tried to
>> remove that Program Rule but cannot and when I edit that program rule and
>> remove one section/field and click update, proposed error occur.
>> 
>> [image: Inline image 2]
>> 
>> Please advise,
>> Rady
>> 
>> On Mon, Jan 16, 2017 at 3:32 PM, Erling Fjelstad > <mailto:erl...@dhis2.org>> wrote:
>> 
>>> Hi Rady,
>>> Have you recently upgraded your DHIS2 version to 2.25? If so, a solution
>>> can be to recreate the program rule and delete the one which is failing to
>>> update
>>> 
>>> Regards,
>>> Erling
>>> 
>>> On Mon, Jan 16, 2017 at 9:05 AM Lars Helge Øverland >> <mailto:l...@dhis2.org>>
>>> wrote:
>>> 
>>>> Hi Rady,
>>>> 
>>>> okay - can you reproduce this against the demo server?
>>>> 
>>>> https://play.dhis2.org/demo/ <https://play.dhis2.org/demo/>
>>>> 
>>>> regards,
>>>> 
>>>> Lars
>>>> 
>>>> On Mon, Jan 16, 2017 at 6:00 AM, Rady  wrote:
>>>> 
>>>> Dear all DHIS2 teams,
>>>> 
>>>> Currently I'm working on DHIS2 tracker capture using DHIS2 2.25, build: 
>>>> 1862277,
>>>> build date: 2016-12-21 06:37. While working on Program Rules to set
>>>> rules on some fields of tracker capture, I found an error while updating a
>>>> Program Rule (see in attached figure below).
>>>> 
>>>> [image: Inline image 1]
>>>> Please advise me if something went wrong with my configuration?
>>>> 
>>>> Thanks and regards,
>>>> Rady
>>>> 
>>>> ___
>>>> 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 <mailto:l...@dhis2.org>
>>>> http://www.dhis2.org <http://www.dhis2.org/> <https://www.dhis2.org/ 
>>>> <https://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
>>>> 
>>> 
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> Post to : dhis2-devs@lists.launchpad.net 
>> <mailto:dhis2-devs@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp 
>> <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


Re: [Dhis2-devs] Clarification around program rules

2017-01-30 Thread Markus Bekken
Hi Archana,
sorry for the delayed response.

Functionality for editing of variables is regrettably lacking in the program 
rules editor. Support for editing and renaming is coming in a later release, 
possibly at the same time as we modernize the program rules editor UI. Name 
change is currently only possible through the API and directly in the database. 
Remember that if you update a variables name you might have to also update 
expressions. When an update name function is added to the UI, the solution 
would refactor automatically - but for now you would have to do it manually.

To update the variable RycV5uDi66i to "updatedName" through the API:
curl -X PATCH -u admin:district -H "Content-Type: application/json" -d 
'{"name":"updatedName"}' 
"http://localhost:8080/api/programRuleVariables/RycV5uDi66i";

As the configurators are free to use their own naming convention for variables, 
it is not currently possible to do a reliable automatic renaming of the 
variables. Generally it might be a good idea to have a short variable name that 
captures the data elements essential meaning, and not the complete data element 
name. If you are using different source types and other settings, the variable 
name might contain a clues to this.

Markus

> 30. jan. 2017 kl. 13.16 skrev Archana Chillala :
> 
> Hi, 
> 
> Could you please provide any update on this ?
> 
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com 
> Telephone +91 9100960533 
>  
> 
> 
> On Mon, Dec 26, 2016 at 2:54 PM, Archana Chillala  > wrote:
> Hi,
> 
> We're using latest revision of DHIS 2.25. In Program rules, do we have the 
> ability to modify or delete the source field after they've been first added? 
> If so, could you please elaborate how we could do that? Because, currently, 
> we have a button to add a source field, but we don't have any UI component to 
> modify/delete an existing one. (See screenshot below)
> 
> 
> 
> When we add a source field, we have to give a variable name, and in most 
> cases, the variable name will be same as data element name (in short). Now, 
> later if we modify that data element to something else, (rename or change any 
> of its properties or make it an option set), the data element name in program 
> rule also changes accordingly, but the variable name of the source field will 
> still remain the same old one. So, here renaming the variable name will help 
> identify. It would also be good if we could delete that particular source 
> field and add it again.
> It would be valuable if that functionality is provided. 
> 
> Thoughts?
> 
> 
> Cheers,
> 
> Archana Chillala
> Application Developer
> Email archa...@thoughtworks.com 
> Telephone +91 9100960533 
>  
> 
> 
> ___
> 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


Re: [Dhis2-devs] Tracker Program Indicator using data element with option sert

2017-01-31 Thread Markus Bekken
Hi there Brent,
As Calle says, you should use the option set code for the program indicators. 
In your example below it seems you are using parenthesis around your condition 
value. You should remove these and use apostrophes to quote the option set code 
like this:
#{programstage.dataelement} == 'Your optionset code'

Markus

> 31. jan. 2017 kl. 09.43 skrev Calle Hedberg :
> 
> Brent,
> 
> Are your program indicators using the option VALUE or the option CODE?
> 
> regards
> calle
> 
> On 31 January 2017 at 09:36, Brent Williams  > wrote:
> Dear all,
> 
>  
> 
> I have  setup a tracker program, in which the data elements are using options 
> sets in certain cases. I have tried to set up a program indicator that would 
> calculate the value for the sum of the 1, 2 or 3 of the data element options, 
> but the result is counting all the events are not filtering the 2 option.
> 
>  
> 
> 
> 
> 
> 
> 
> 
>  
> 
>  
> 
> Is it possible to setup an program indicator using option sets?
> 
> What am I missing?
> 
>  
> 
> Brent Williams
> 
> 
>   
> 
> Project Implementation
> Health Information Systems Program (HISP) - SA
> 
> ---
> 
> e-mail:br...@hisp.org  
> Mobile:   071 542 9140
> 
> Skype:brent.williams267
> Web:   http://www.hisp.org 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> This message and any attachments are subject to a disclaimer published at 
> http://www.hisp.org/policies.html#comms_disclaimer 
> .  Please read the 
> disclaimer before opening any attachment or taking any other action in terms 
> of this electronic transmission.  If you cannot access the disclaimer, kindly 
> send an email to disclai...@hisp.org  and a copy 
> will be provided to you. By replying to this e-mail or opening any attachment 
> you agree to be bound by the provisions of the disclaimer.
> 
> 
> ___
> 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

___
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] Tracker Program Indicator using data element with option sert

2017-01-31 Thread Markus Bekken
Value code, yes - thank you Calle :)

> 31. jan. 2017 kl. 11.03 skrev Calle Hedberg :
> 
> Markus,
> 
> You are saying "optionSETcode" - you do mean "optionVALUEcode"??
> 
> What Brent wants here is the ability to select one or more optionvalues, not 
> optionSETs
> 
> Regards
> calle
> 
> On 31 January 2017 at 10:48, Markus Bekken  <mailto:mar...@dhis2.org>> wrote:
> Hi there Brent,
> As Calle says, you should use the option set code for the program indicators. 
> In your example below it seems you are using parenthesis around your 
> condition value. You should remove these and use apostrophes to quote the 
> option set code like this:
> #{programstage.dataelement} == 'Your optionset code'
> 
> Markus
> 
>> 31. jan. 2017 kl. 09.43 skrev Calle Hedberg > <mailto:calle.hedb...@gmail.com>>:
>> 
>> Brent,
>> 
>> Are your program indicators using the option VALUE or the option CODE?
>> 
>> regards
>> calle
>> 
>> On 31 January 2017 at 09:36, Brent Williams > <mailto:br...@hisp.org>> wrote:
>> Dear all,
>> 
>>  
>> 
>> I have  setup a tracker program, in which the data elements are using 
>> options sets in certain cases. I have tried to set up a program indicator 
>> that would calculate the value for the sum of the 1, 2 or 3 of the data 
>> element options, but the result is counting all the events are not filtering 
>> the 2 option.
>> 
>>  
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>  
>> 
>>  
>> 
>> Is it possible to setup an program indicator using option sets?
>> 
>> What am I missing?
>> 
>>  
>> 
>> Brent Williams
>> 
>> 
>>   
>> 
>> Project Implementation
>> Health Information Systems Program (HISP) - SA
>> 
>> ---
>> 
>> e-mail:br...@hisp.org <mailto:br...@hisp.org> 
>> Mobile:   071 542 9140
>> 
>> Skype:brent.williams267
>> Web:   http://www.hisp.org <http://www.hisp.org/>
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> 
>> This message and any attachments are subject to a disclaimer published at 
>> http://www.hisp.org/policies.html#comms_disclaimer 
>> <http://www.hisp.org/policies.html#comms_disclaimer>.  Please read the 
>> disclaimer before opening any attachment or taking any other action in terms 
>> of this electronic transmission.  If you cannot access the disclaimer, 
>> kindly send an email to disclai...@hisp.org <mailto:disclai...@hisp.org> and 
>> a copy will be provided to you. By replying to this e-mail or opening any 
>> attachment you agree to be bound by the provisions of the disclaimer.
>> 
>> 
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> Post to : dhis2-devs@lists.launchpad.net 
>> <mailto:dhis2-devs@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp 
>> <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 <mailto:calle.hedb...@gmail.com>
>> Skype: calle_hedberg
>> 
>> ***
>> 
>> 
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> Post to : dhis2-devs@lists.launchpad.net 
>> <mailto:dhis2-devs@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp 
>> <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 <mailto: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] OptionSets of type Number - is optionvalue CODES then limited to number?

2017-02-11 Thread Markus Bekken
Hi Calle - the data type of the option set is meant to dictate what type of 
data the option set codes will be. I would say the error was in 2.24 and older 
dhis versions - allowing letters in codes for numeric option sets seems like a 
bug. 

Markus

> Den 11. feb. 2017 kl. 12.40 skrev Calle Hedberg :
> 
> Hi again,
> 
> Just to add: the constraint that optionSets with valueType = Number can only 
> have optionValue codes consisting of digits is new in either 2.25 and/or 2.26 
> - it is not there in 2.24.
> 
> Which is why I suspect this might be a bug - but I would like confirmation 
> before reporting it on JIRA
> 
> Best regards
> Calle
> 
>> On 11 February 2017 at 13:21, Calle Hedberg  wrote:
>> Hi
>> 
>> I am uncertain if this is a bug or not (latest build 2.26): 
>> When you define an option set using valueType=Number, the system will only 
>> accept optionValue codes consisting of digits (no letters) for that 
>> optionSet.
>> 
>> There is no mention of this restriction in the user manual.
>> 
>> Is this intended behaviour, or is it a bug?
>> 
>> 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
>> 
>> ***
>> 
>> 
> 
> 
> 
> -- 
> ***
> 
> 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


Re: [Dhis2-devs] Tracking information between Program Stages and sections

2017-02-11 Thread Markus Bekken
Hi there!
One option is to make a program indicator that shows the test score. This will 
make this piece of information visible in the Indicators widget throughout all 
program stages.

It is also possible to automatically fill fields based on values in other 
fields using program rules, but it depends what you want here - wether you just 
want to show the value to the user as a guide, or save it as a data value in 
other program stages.

Markus

> 9. feb. 2017 kl. 17.08 skrev usuario tecugi :
> 
> Hi all,
> 
> We want to know if it is possible to fill textfield with information  of 
> other stages or section in the same program.
> 
> For example: A test was done in a previous stage, after we open the next 
> stage in the program, if we want to know the test score, we want to see it in 
> this new stage, so: Is there any way to get legacy with the data element in 
> DHIS?
> 
> Please, let us know.
> 
> Warm Regards,
> 
> ISC. Carlos M. Herrera Sierra
> SESAL/UGI
> 9715-2987
> usuariotec...@gmail.com 
> Cuidemos el Medio Ambiente, por favor,no imprima este correo electrónico si 
> no es necesario.
> 
> Este correo electrónico contiene información legal confidencial y 
> privilegiada. Si Usted no es el destinatario a quien se desea enviar este 
> mensaje, tendrá prohibido darlo a conocer a persona alguna, así como a 
> reproducirlo o copiarlo. Si recibe este mensaje por error, favor de 
> notificarlo al remitente de inmediato y desecharlo de su sistema.
> ___
> 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


Re: [Dhis2-devs] Program indicator "hasValue"

2017-03-01 Thread Markus Bekken
Hi Olav,
the following syntax is now supported:  
> - #{wmSb9TmevMn.jeK5z6acB3N}  == ‘’

Jira issue: https://jira.dhis2.org/browse/DHIS2-1185 


Best regards,
Markus

> 1. feb. 2017 kl. 13.40 skrev Olav Poppe :
> 
> Hi devs, I’m trying (in 2.25) to make a program indicator counting events 
> where a specific data element has not been filled.
> 
> Tested so far: 
> - d2:hasValue(‘wmSb9TmevMn.jeK5z6acB3N’)  => not supported in 
> program indicators, only program rules
> - #{wmSb9TmevMn.jeK5z6acB3N}  == ‘’   => no data 
> - #{wmSb9TmevMn.jeK5z6acB3N}  != ‘’   => counts the events 
> WITH data, but I’m unable to «invert» this:
>   -- !(#{wmSb9TmevMn.jeK5z6acB3N}  != ‘’) => no data, 
> catalina.out shows: ERROR: operator does not exist: ! boolean
>   -- (#{wmSb9TmevMn.jeK5z6acB3N}  != '') != true  => no data
> - #{wmSb9TmevMn.jeK5z6acB3N}  is null => works, but 
> is not a supported format from what I understand.
> 
> In general, what is displayed in «Filter description» and what actually works 
> is not consistent - some things are invalid, but work, others are valid but 
> don’t work…
> 
> Any advice?
> 
> Regards
> Olav
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] PROGRAM INDICATOR CAN DISPLAY DATA WHEN I SWITCH OU TO ROW DIMENSIONS

2017-03-24 Thread Markus Bekken
Dear Georgi and Stanley,
There seems to be a problem with the monthly periods in tracker - please 
register this as a bug in Jira.

The problem with the Program Indicators from different years I was not able to 
reproduce. Using the pivot table app I am able to see program indicator values 
from different years in the same table. Can you provide some more info on your 
indicator, alternatively  send the database to me offline?

Markus

> 24. mar. 2017 kl. 10.20 skrev Georgi Chakarov :
> 
> I am not sure. If someone on the developing team is following the issue I 
> would love their opinion!
> I think that the bug comes from tracker programs. In program settings if you 
> set your repeatable stages to be monthly (or yearly or other period) younwill 
> not be able to create stages that flow within two years. E.g. Now is 2017 and 
> I want to create monthly stages and enter data for earlier periods, say 
> months in 2016, tracker will not allow me to do so. It will allow me to 
> create monthly stages for 2017 only. This restriction actually is reflected 
> in reporting as well. You are not able to see a combined figure for two years.
> 
> I will put together some screenshots of the above and report to jira.
> 
> 
> 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
> From: Stanley Kalyati 
> Sent: Friday, March 24, 2017 7:54:23 AM
> To: Georgi Chakarov
> Cc: DHIS 2 Developers list; DHIS Users
> Subject: Re: [Dhis2-users] PROGRAM INDICATOR CAN DISPLAY DATA WHEN I SWITCH 
> OU TO ROW DIMENSIONS
>  
> Georgi,
> 
> You are right,when i select months for one year i am able to see data 
> regardless of how i move around with the Layout.But when i mix periods for 
> two years then data does  not show.
> 
> Is this a bug or thats how it is made.
> 
> I would love to have information across years.
> 
> Thank you
> 
> Stanley
> 
> On Thu, Mar 23, 2017 at 7:25 PM, Georgi Chakarov  > wrote:
> Hi Stanley,
> 
>  
> 
> Are you using months within one year or your months are from 2 years?
> 
> E.g. the below:
> 
>  
> 
> Oct 2016
> 
> Nov 2016
> 
> Dec 2016
> 
> Jan 2017
> 
> Feb 2017
> 
>  
> 
> Regards,
> 
>  
> 
> Georgi
> 
> From: Dhis2-users [mailto:dhis2-users-bounces+georgi 
> =logicaloutcomes@lists.launchpad.net 
> ] On Behalf Of Stanley Kalyati
> Sent: Thursday, March 23, 2017 3:56 PM
> To: DHIS 2 Developers list  >; DHIS Users 
> mailto:dhis2-us...@lists.launchpad.net>>
> Subject: Re: [Dhis2-users] PROGRAM INDICATOR CAN DISPLAY DATA WHEN I SWITCH 
> OU TO ROW DIMENSIONS
> 
>  
> 
> I had posted this issue for help, is there anyone who can advise?
> 
>  
> 
> Thanks
> 
>  
> 
> Stanley
> 
>  
> 
> On Mar 22, 2017 12:43 PM, "Stanley Kalyati"  > wrote:
> 
> I created a program indicator to count the number of clients enrolled to a 
> program. On layout,when i place the OrgUnit on Filter,Period on Row dimention 
> and data on column dimension,i am able to see data by months.But when i 
> switch OrgUnit to Row dimension and period to filter,then no data is 
> displayed.
> 
>  
> 
> What could be the problem? I am using DHIS2 2.25 latest build.
> 
>  
> 
> Please help
> 
>  
> 
> Stanley
> 
>  
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] [Dhis2-users] CLARITY ON DEFINITIONS FOR COUNTS IN PROGRAM INDICATORS

2017-04-04 Thread Markus Bekken
Hi Stanley!

You possibly already read this chapter in the docs:
26.4.1.7. About variables 


We can probably expand a bit more in the docs on how the different counts work. 
Here is a bit more of an explanation for the different counts.

Count of events(event mode): When looking at this in an pivot, it counts the 
number of events that 
- has an event date within the given period
- happened at the orgunit(s) included in the report
- matches any other filters you might have defined in the "Filter" part 
of the program indicator.

Count of enrollments(event mode): Is counting a subset of the "Count of events" 
above. When several events is linked to one enrollment, each of these groups 
will only be counted as one. An alternative narrative way of explaining it is 
that you count how many different enrollments that is represented with at least 
one event within the given period and orgunit(s).

Count of tracked entity instances(event mode): Is counting a subset of the 
"Count of enrollments" above. When several events is linked to one enrollment, 
and several enrollments is linked to one tracked entity instance, all these are 
grouped and counted on the tracked entity instance level. An alternative 
narrative way of explaining it is that you count how many different tracked 
entity instances that is represented with at least one event within the given 
period and orgunit(s).

As you can see, all these counts is by default founded in the individual events 
that happened within the reporting boundaries. In 2.26 we added another mode 
for program indicators in tracker programs called "Enrollment" mode. This is 
opposed to the "Event" mode that is explained above, and that is the default 
mode for all program indicators. Enrollment mode might be useful in some cases 
when working with tracker data. If you select "Enrollment" as the mode for the 
program indicator, the enrollment itself is the foundation for all counting, 
expressions and filtering. Here is how the counts behave in enrollment mode:

Count of events(enrollment mode): Not yet supported enrollment mode, but 
improvement issue is registered: 
https://jira.dhis2.org/browse/DHIS2-1068?jql=text%20~%20%22count%22

Count of enrollments(enrollment mode): When looking at this in an pivot, it 
counts the number of enrollments that 
- has an enrollment date within the given period
- was enrolled at the orgunit(s) included in the report
- matches any other filters you might have defined in the "Filter" part 
of the program indicator.

Count of tracked entity instances(enrollment mode): Is counting a subset of the 
"Count of enrollments" above. When several enrollments is linked to one tracked 
entity instance, all these are groups are counted as one. An alternative 
narrative way of explaining it is that you count how many different tracked 
entity instances that was enrolled within the 

Hope this explanation can help you when looking into your mentioned difference 
in numbers between event reports and program indicators. If you want further 
assistance on this part, please provide more detail on the indicator definition 
and the event reports query.

Best regards,
Markus

> 3. apr. 2017 kl. 09.19 skrev Stanley Kalyati :
> 
> Can someone please define for me what i expect to get when i create an 
> indicator based on the following in the expression description:
> 
> 1-Count of events,what will the indicator count
> 2-Count of enrollment,will this count all enrollments within the program
> 3-Count of tracked entity instances,what will this count.
> 
> I am saying this because when i extract enrollment data using Events 
> Reports,i get a figure that is different from that which is generated by the 
> program indicator whose expression description is "Count of enrollment"
> 
> A simple definition will help out,.
> 
> Thanks
> 
> Stanley
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] [Dhis2-users] Analyze across events

2017-04-10 Thread Markus Bekken
Hi there Pramil,
if you are on version 2.26 or later you can make a program indicator with the 
"Enrollment" analytics type:


This will let you compare data from different events within the same 
enrollment. The enrollment date is used as the aggregation date when looking at 
the data in a pivot.

Hope this helps, get back if you have any further questions.

Best regards,
Markus


> 7. apr. 2017 kl. 21.48 skrev Pramil Liyanage :
> 
> Hi,
> 
> I need to analyze data across variables in two events in a program with 
> multiple stages. 
> 
> For example, I need to find the number of patients marked as cured in 
> treatment outcome stage,  for a cohort registered during a specified time. 
> Can I combine enrollment date or date from another event (e.g. registration 
> event)? Event reports will aggregate to the event, treatment outcome, not 
> registration.
> 
> I know that this is not possible to combine elements from two events in event 
> reports. Is it possible to do this using programme indicators? If so what is 
> the syntax?
> 
> Regards
> Pramil
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] [Dhis2-users] Analyze across events

2017-04-10 Thread Markus Bekken
Hi Pamod, 
When using enrollment program indicators, the enrollments being aggregated in 
your pivot will be the defined by the enrollment date entered during 
registration/enrollment. Meaning that asking for a report from 2016Q1 will give 
you data for all enrollments that started in this period. You would then be 
able to filter out the enrollments you want using a filter that queries the 
outcome or other data data from one or more program stages within the 
enrollment. The event date of the outcome data event will not be taken into 
account in the current solution. 

Created a JIRA issue to support aggregating on different dates in the 
enrollment(this had been planned for a while but not documented): DHIS2-1398 
<https://jira.dhis2.org/browse/DHIS2-1398>. The last event date in the 
enrollment across all program stages can be accessed in filters and expressions 
calculations by using the V{event_date} variable. However, the individual 
program stages event dates cannot be accessed at the moment, so if you use a 
registration program stage you will not be able to use the event date here with 
enrollment analytics. JIRA issue for adding support for this can be found here: 
DHIS2-1397 <https://jira.dhis2.org/browse/DHIS2-1397>

Let us know the gaps if your you case doesn't seem to be supported - especially 
interested in the relation between the enrollment and event date below. Given 
the two improvements listed above, can you make a filter or expression that 
covers it?

Best regards
Markus

> 10. apr. 2017 kl. 09.43 skrev Pamod Amarakoon :
> 
> Hi Markus,
> 
> What happens when you add enrollment date in defining program indicator and 
> also select the compulsory time dimension in pivot table. Just confused as to 
> what may take precedence.
> 
> eg: In Pramil's case,
> 
> He has a registration stage with an enrollment date and he wants to analyze 
> the outcome event status of another program stage. Say he wants to follow a 
> cohort registered in 2016Q1 who's outcome will only be available in a 
> different program stage in 2017Q2, could this be achieved using Program 
> indicator in pivot table.
> 
> Thanx.
> 
> On Mon, Apr 10, 2017 at 1:04 PM, Pramil Liyanage  <mailto:prami...@gmail.com>> wrote:
> Thanks Markus. I'm on 2.25. Will update to 2.26 and try. Will get back to you 
> if any issue. Thanks again.
> 
> Pramil
> 
> On Mon, Apr 10, 2017 at 12:59 PM, Markus Bekken  <mailto:mar...@dhis2.org>> wrote:
> Hi there Pramil,
> if you are on version 2.26 or later you can make a program indicator with the 
> "Enrollment" analytics type:
> 
> 
> This will let you compare data from different events within the same 
> enrollment. The enrollment date is used as the aggregation date when looking 
> at the data in a pivot.
> 
> Hope this helps, get back if you have any further questions.
> 
> Best regards,
> Markus
> 
> 
>> 7. apr. 2017 kl. 21.48 skrev Pramil Liyanage > <mailto:prami...@gmail.com>>:
>> 
>> Hi,
>> 
>> I need to analyze data across variables in two events in a program with 
>> multiple stages. 
>> 
>> For example, I need to find the number of patients marked as cured in 
>> treatment outcome stage,  for a cohort registered during a specified time. 
>> Can I combine enrollment date or date from another event (e.g. registration 
>> event)? Event reports will aggregate to the event, treatment outcome, not 
>> registration.
>> 
>> I know that this is not possible to combine elements from two events in 
>> event reports. Is it possible to do this using programme indicators? If so 
>> what is the syntax?
>> 
>> Regards
>> Pramil
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> Post to : dhis2-us...@lists.launchpad.net 
>> <mailto:dhis2-us...@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-users 
>> <https://launchpad.net/~dhis2-users>
>> More help   : https://help.launchpad.net/ListHelp 
>> <https://help.launchpad.net/ListHelp>
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users 
> <https://launchpad.net/~dhis2-users>
> Post to : dhis2-us...@lists.launchpad.net 
> <mailto:dhis2-us...@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~dhis2-users 
> <https://launchpad.net/~dhis2-users>
> More help   : https://help.launchpad.net/ListHelp 
> <https://help.launchpad.net/ListHelp>
> 
> 
> 
> 
> -- 
> Regards,
> Dr. Pamod Amarakoon
> MBBS (SL)
> M

Re: [Dhis2-devs] Aggregating events based on last value of the data element

2017-04-10 Thread Markus Bekken
Hi there Chathura,

it seems that the query you want to make below can be achieved with enrollment 
program indicators. Assuming the program is built as a multiple event with 
registration, and the DE1 is part of a repeating program stage, the inherent 
properties of enrollment program indicators covers much of what you want. Each 
child will be counted only once, and only the latest value of D1 will be 
considered for each child.

Can you for example try making a program indicator with analytics type 
"Enrollment", aggregation type "Sum" and the expression being the value of DE1? 
Then you can use pivot or the API to query and see if the results match your 
expectation.

Markus

> 1. apr. 2017 kl. 10.58 skrev chathura widanage :
> 
> Hi,
> 
> We are currently using DHIS2 to track nutrition problems of children under 5 
> years.
> 
> Assume we have only two children in the database and DE1 be a certain 
> condition that we monitor continuously,
> 
> child 1 -> [event 1, DE1=1, time=t1] [event 2 - DE1=1,time=t2] [event 3 - 
> DE1=0,time=t3]
> child 2 -> [event 1, DE1=0, time=t1] [event 2 - DE1=0,time=t2] [event 3 - 
> DE1=0,time=t3]
> 
> Now if I call 
> "events/aggregate/?dimension=DE1:EQ:1&startDate=T1&endDate=T2&dimension=ou:",
>  is there a parameter that we can set in the query to consider only the last 
> value of the data element in the chosen event series.
> 
> eg :
> 
> case
> T1
> T2
> Result
> Expected result
> 1
> t1
> t1+delta
> 1
> 1
> 2
> t1
> t2+delta
> 2
> 1
> 3
> t1
> t3+delta
> 2
> 0
> 4
> t2
> t3+delta
> 1
> 0
> 
> case 1 : child 1 has the condition (because DE1=1), hence result =1
> case 2 : child 1 still has the condition, but we want to consider him only 
> once.
> case 3 : child 1 has got rid of the condition, so we don't want to consider 
> him for the results
> 
> Why we need this :  we want to analyze the state of org unit during a 
> specific period of time and draw a trend chart to determine whether measures 
> taken to improve child health has actually worked or not.
> 
>  
>  And also we need to compare the identified risk factors graphically, so we 
> know which area should get the highest focus or attention.
> 
> 
> 
> Please let us know whether above results can be achieved using API version 
> 2.26. 
> Currently we are using SQL Views (2 SQL views + 1 Query) to generate above 
> results, but that is extremely inefficient and expensive.
> 
> Thanks
> 
> 
> 
> -- 
> Best Regards,
> 
> Chathura Widanage,
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka
>  
> 
>     
>   
> ___
> 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


Re: [Dhis2-devs] Aggregating events based on last value of the data element

2017-04-10 Thread Markus Bekken
Dear Pamod,
to put it simply - if you use October 2016 as reporting date and display this 
enrollment program indicator, the pivot will be populated only with the data 
for the children enrolled in October 2016. The child enrolled in October will 
not show up un the numbers for November. If you want to make a report of all 
currently positive children, you would have to define a long enough reporting 
period to capture all enrollment dates, and filter out anyone not positive.

As a reminder there is a planned improvement to allow other dates to be the 
basis of aggregation: DHIS2-1398 <https://jira.dhis2.org/browse/DHIS2-1398>

Curious to hear how this covers your use case. 

Markus

> 10. apr. 2017 kl. 13.37 skrev Pamod Amarakoon :
> 
> Dear Marcus,
> 
> Want to clarify something. 
> 
> Suppose for example Child A has been marked positive for a disease in October 
> 2016 and he has not turned up for further clinic followups. If we configure 
> the program indicator the way you mentioned and select period dimension as 
> last 12 months from pivot table and consider the output, we are interested in 
> obtaining the cross sectional view of number of affected children at a given 
> time.
> 
> Will the child A only be calculated for the month of October 2016 or will he 
> be counted on subsequent months as well. (In the output we are expecting to 
> see the prevalence of the disease per month).
> 
> Thank you
> 
> On Mon, Apr 10, 2017 at 2:47 PM, Markus Bekken  <mailto:mar...@dhis2.org>> wrote:
> Hi there Chathura,
> 
> it seems that the query you want to make below can be achieved with 
> enrollment program indicators. Assuming the program is built as a multiple 
> event with registration, and the DE1 is part of a repeating program stage, 
> the inherent properties of enrollment program indicators covers much of what 
> you want. Each child will be counted only once, and only the latest value of 
> D1 will be considered for each child.
> 
> Can you for example try making a program indicator with analytics type 
> "Enrollment", aggregation type "Sum" and the expression being the value of 
> DE1? Then you can use pivot or the API to query and see if the results match 
> your expectation.
> 
> Markus
> 
>> 1. apr. 2017 kl. 10.58 skrev chathura widanage > <mailto:chathurawidan...@gmail.com>>:
>> 
>> Hi,
>> 
>> We are currently using DHIS2 to track nutrition problems of children under 5 
>> years.
>> 
>> Assume we have only two children in the database and DE1 be a certain 
>> condition that we monitor continuously,
>> 
>> child 1 -> [event 1, DE1=1, time=t1] [event 2 - DE1=1,time=t2] [event 3 - 
>> DE1=0,time=t3]
>> child 2 -> [event 1, DE1=0, time=t1] [event 2 - DE1=0,time=t2] [event 3 - 
>> DE1=0,time=t3]
>> 
>> Now if I call 
>> "events/aggregate/?dimension=DE1:EQ:1&startDate=T1&endDate=T2&dimension=ou:",
>>  is there a parameter that we can set in the query to consider only the last 
>> value of the data element in the chosen event series.
>> 
>> eg :
>> 
>> case
>> T1
>> T2
>> Result
>> Expected result
>> 1
>> t1
>> t1+delta
>> 1
>> 1
>> 2
>> t1
>> t2+delta
>> 2
>> 1
>> 3
>> t1
>> t3+delta
>> 2
>> 0
>> 4
>> t2
>> t3+delta
>> 1
>> 0
>> 
>> case 1 : child 1 has the condition (because DE1=1), hence result =1
>> case 2 : child 1 still has the condition, but we want to consider him only 
>> once.
>> case 3 : child 1 has got rid of the condition, so we don't want to consider 
>> him for the results
>> 
>> Why we need this :  we want to analyze the state of org unit during a 
>> specific period of time and draw a trend chart to determine whether measures 
>> taken to improve child health has actually worked or not.
>> 
>>  
>>  And also we need to compare the identified risk factors graphically, so we 
>> know which area should get the highest focus or attention.
>> 
>> 
>> 
>> Please let us know whether above results can be achieved using API version 
>> 2.26. 
>> Currently we are using SQL Views (2 SQL views + 1 Query) to generate above 
>> results, but that is extremely inefficient and expensive.
>> 
>> Thanks
>> 
>> 
>> 
>> -- 
>> Best Regards,
>> 
>> Chathura Widanage,
>> Undergraduate,
>> Department of Computer Science and Engineering,
>> University of Moratuwa,
>> Sri Lanka
>>  
>> <https://www.linkedin.com/profile/public-p

Re: [Dhis2-devs] Aggregating events based on last value of the data element

2017-04-10 Thread Markus Bekken
Dear Chathura and Pamod, 
Unfortunately, evaluating indicators using what would have been the latest 
value within every enrollment at a given time is not supported. We could make a 
program indicator that does the base calculation you want, but it will 
currently only reflect the disease situation as of the time of aggregation.

Please feel free to write up a JIRA improvement suggestion to support this.

Best regards
Markus

> 10. apr. 2017 kl. 16.17 skrev chathura widanage :
> 
> Hi Markus,
> 
> Thanks for the response.  Based on the scenario described above, we want to 
> draw a trend chart which is similar to the one in attached png. 
> 
> So basically, given a date, api should consider the latest event(upto given 
> date) of each entity when aggregating.
> 
> Thanks
> 
> On 10 Apr 2017 7:41 p.m., "Pamod Amarakoon"  <mailto:pam...@gmail.com>> wrote:
> Forgot to add we also need to consider the fact that B gets positive for the 
> disease again in May 2017 where we enroll him again and the total becomes 6 
> again.
> 
> Thanx.
> 
> On Mon, Apr 10, 2017 at 6:06 PM, Pamod Amarakoon  <mailto:pam...@gmail.com>> wrote:
> Dear Markus,
> 
> If I elaborate more, suppose there are 6 children A,B,C,D,E and F.
> A, B, and C are enrolled to the program in July 2016 being positive for the 
> disease X (yes/no DE)
> D,E gets enrolled to programme in August 2016 also being positive for X
> F gets enrolled in September 2016 being positive for X.
> 
> All the 6 children are being monthly followed up to assess the existence of 
> the Disease X.
> 
> B gets cured of disease X in January 2017and enrollment gets completed.
> D is lost to follow up from October 2016.
> A, C, E and F are being followed up till  now and all positive for Disease X.
> Although children D has not turned up at clinic we still consider him as 
> positive for Disease X.
> 
> So what I'm interested is to develop a table or trend chart (line chart) for 
> prevalence (old+new) of Disease X in the given community. Should be something 
> like below
> 
> July 2016 - 3
> August 2016 - 5
> September 2016 - 6
> October 2016 - 6
> November 2016 - 6
> December 2016 - 6
> January 2017 - 5
> February 2017 - 5
> March 2017 - 5
> April 2017 - 5
> 
> Is it possible to get this output using a program indicator.
> 
> Thank you.
> 
> On Mon, Apr 10, 2017 at 5:53 PM, Markus Bekken  <mailto:mar...@dhis2.org>> wrote:
> Dear Pamod,
> to put it simply - if you use October 2016 as reporting date and display this 
> enrollment program indicator, the pivot will be populated only with the data 
> for the children enrolled in October 2016. The child enrolled in October will 
> not show up un the numbers for November. If you want to make a report of all 
> currently positive children, you would have to define a long enough reporting 
> period to capture all enrollment dates, and filter out anyone not positive.
> 
> As a reminder there is a planned improvement to allow other dates to be the 
> basis of aggregation: DHIS2-1398 <https://jira.dhis2.org/browse/DHIS2-1398>
> 
> Curious to hear how this covers your use case. 
> 
> Markus
> 
>> 10. apr. 2017 kl. 13.37 skrev Pamod Amarakoon > <mailto:pam...@gmail.com>>:
>> 
>> Dear Marcus,
>> 
>> Want to clarify something. 
>> 
>> Suppose for example Child A has been marked positive for a disease in 
>> October 2016 and he has not turned up for further clinic followups. If we 
>> configure the program indicator the way you mentioned and select period 
>> dimension as last 12 months from pivot table and consider the output, we are 
>> interested in obtaining the cross sectional view of number of affected 
>> children at a given time.
>> 
>> Will the child A only be calculated for the month of October 2016 or will he 
>> be counted on subsequent months as well. (In the output we are expecting to 
>> see the prevalence of the disease per month).
>> 
>> Thank you
>> 
>> On Mon, Apr 10, 2017 at 2:47 PM, Markus Bekken > <mailto:mar...@dhis2.org>> wrote:
>> Hi there Chathura,
>> 
>> it seems that the query you want to make below can be achieved with 
>> enrollment program indicators. Assuming the program is built as a multiple 
>> event with registration, and the DE1 is part of a repeating program stage, 
>> the inherent properties of enrollment program indicators covers much of what 
>> you want. Each child will be counted only once, and only the latest value of 
>> D1 will be considered for each child.
>> 
>> Can you for example try making a program indicator with analytics type 
&g

Re: [Dhis2-devs] Program indicator "hasValue"

2017-04-24 Thread Markus Bekken
Hey Olav,
if you're on 2.26 or later, d2:hasValue() should work: 
https://jira.dhis2.org/browse/DHIS2-1245 
<https://jira.dhis2.org/browse/DHIS2-1245>

Markus

> 24. apr. 2017 kl. 13.09 skrev Olav Poppe :
> 
> Hi, late follow-up on this - is there a «is empty» syntax for dates as well? 
> I get
> 
> ERROR: invalid input syntax for type timestamp: ‘'
> and
> ERROR: COALESCE types timestamp without time zone and integer cannot be 
> matched
> 
> if I use == ‘’ or == 0 respectively for dates.
> 
> Olav
> 
> 
> 
> 
> 
> 
>> 1. mar. 2017 kl. 15.24 skrev Markus Bekken > <mailto:mar...@dhis2.org>>:
>> 
>> Hi Olav,
>> the following syntax is now supported:  
>>> - #{wmSb9TmevMn.jeK5z6acB3N}  == ‘’
>> 
>> Jira issue: https://jira.dhis2.org/browse/DHIS2-1185 
>> <https://jira.dhis2.org/browse/DHIS2-1185>
>> 
>> Best regards,
>> Markus
>> 
>>> 1. feb. 2017 kl. 13.40 skrev Olav Poppe >> <mailto:olav.po...@me.com>>:
>>> 
>>> Hi devs, I’m trying (in 2.25) to make a program indicator counting events 
>>> where a specific data element has not been filled.
>>> 
>>> Tested so far: 
>>> - d2:hasValue(‘wmSb9TmevMn.jeK5z6acB3N’)=> not supported in 
>>> program indicators, only program rules
>>> - #{wmSb9TmevMn.jeK5z6acB3N}  == ‘’ => no data 
>>> - #{wmSb9TmevMn.jeK5z6acB3N}  != ‘’ => counts the 
>>> events WITH data, but I’m unable to «invert» this:
>>> -- !(#{wmSb9TmevMn.jeK5z6acB3N}  != ‘’) => no data, 
>>> catalina.out shows: ERROR: operator does not exist: ! boolean
>>> -- (#{wmSb9TmevMn.jeK5z6acB3N}  != '') != true  => no data
>>> - #{wmSb9TmevMn.jeK5z6acB3N}  is null   => works, but 
>>> is not a supported format from what I understand.
>>> 
>>> In general, what is displayed in «Filter description» and what actually 
>>> works is not consistent - some things are invalid, but work, others are 
>>> valid but don’t work…
>>> 
>>> Any advice?
>>> 
>>> Regards
>>> Olav
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs 
>>> <https://launchpad.net/~dhis2-devs>
>>> Post to : dhis2-devs@lists.launchpad.net 
>>> <mailto:dhis2-devs@lists.launchpad.net>
>>> Unsubscribe : https://launchpad.net/~dhis2-devs 
>>> <https://launchpad.net/~dhis2-devs>
>>> More help   : https://help.launchpad.net/ListHelp 
>>> <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


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

2017-04-25 Thread Markus Bekken
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! J), 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 mailto:ab...@dhis2.org>>, 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 (bookings) – so this bug also breaks the awesomely useful 
> feature you restored in https://jira.dhis2.org/browse/DHIS2-623.
>  
> Cheers, Sam.
>  
>  
> From: Dhis2-users 
>  on behalf 
> of Absolom MURAMIRA 
> Reply-To: "absolo...@yahoo.com" 
> Date: Thursday, 2 March 2017 at 20:03
> To: Abyot Asalefew Gizaw , Immaculate Ayebazibwe 
> 
> Cc: DHIS Users , DHIS2 Developers 
> 
> Subject: Re: [Dhis2-users] [Dhis2-devs] Fw: Tracker Events period issue
>  
> Dear Abyot,  
>  
> Thank you for the update. We also look forward for the periodic fix. 
>  
> Absolom 
>  
> Sent from Yahoo Mail on Android 
> 
>  
> On Thu, 2 Mar 2017 at 11:34, Abyot Asalefew Gizaw
>  wrote:
> Hi, 
>  
> We have now made a limited fix in 2.26.
>  
> Here is what is supported at the moment:
>  
> - scheduling periodic events is not supported at the moment
> - creation of events is possible
> - once created, editing the event's period is not possible
> - normally we store, the end date of the period as event date
> 
> --
> Abyot A. Gizaw.
> Senior Engineer, DHIS2
> University of Oslo
> http://www.dhis2.org 
>  
> On Tue, Feb 28, 2017 at 3:09 PM, Abyot Asalefew Gizaw > 
> wrote:
> sorry the other way round - the calendar icon not the plus icon!
> 
> --
> Abyot A. Gizaw.
> Senior Engineer, DHIS2
> University of Oslo
> http://www.dhis2.org 
>  
> On Tue, Feb 28, 2017 at 3:09 PM, Abyot Asalefew Gizaw > 
> wrote:
> You need to click the plus icon not the calendar icon
>  
> 
> 
> --
> Abyot A. Gizaw.
> Senior Engineer, DHIS2
> University of Oslo
> http://www.dhis2.org 
>  
> On Tue, Feb 28, 2017 at 2:27 PM, Immaculate Ayebazibwe  <>> wrote:
> Hi Abyot, 
>  
> Based on your explanation, even when you use only date, it will not go beyond 
> a given year.
> For example it will show only dates within 2017, or dates within 2016.
> 
>  
>  
> Thank yo

Re: [Dhis2-devs] [Dhis2-users] Enter data for a future date in Event and Tracker Capture

2017-04-26 Thread Markus Bekken
Hi Georgi and Nick

The tracker does not allow allow event dates in the future. This restriction is 
probably there because most(all so far?) tracker use cases register actual 
events that already has happened. Knowing nothing about your usecase: Can you 
model it slightly differently, capturing the future date a data element instead 
of the event date?

Markus






> 26. apr. 2017 kl. 09.29 skrev Georgi Chakarov :
> 
> Hi Nick,
>  
> Thanks for your response!
>  
> See my comments below.
>  
> Regards,
>  
> Georgi
>  
> From: Shurajit Dutta [mailto:shurajitdu...@gmail.com 
> ] 
> Sent: Wednesday, April 26, 2017 6:02 AM
> To: Georgi Chakarov  >
> Cc: dhis2-us...@lists.launchpad.net ; 
> dhis2-devs@lists.launchpad.net 
> Subject: Re: [Dhis2-users] Enter data for a future date in Event and Tracker 
> Capture
>  
> Hi Georgi,
>  
> 1. You can select "Date in future" for attributes/data elements within a 
> program to enter future dates
>  
> 
>  
> I need program stage date/Event reporting date to be future dates. You know 
> how in Data Entry app you can allow for entering data in the future, so from 
> the period drop-down you can select to enter data for 2018 for example, 
> regardless that it is 2017 now. I need the same for Events and Tracker 
> capture stages.
>  
>  
> 2. Does the use of program indicators not solve this issue? You could select 
> those months as the period of interest during analysis.
>  
> The problem here is that the program indicators do not calculate properly. 
> Let me give you an example. My period is May, 1 2016 – April, 30 2017 (this 
> is Fiscal year 2017). I have been entering data for one Tracker program from 
> May,1 to April, 30 daily. I have built a program indicator of interest. When 
> I go to reporting I want to see ONE number, which is the sum/average/other 
> calculation of all months from May 2016 to April 2017. So, I select all these 
> months and put them in the reporting filter (I do not want them in 
> dimension). The reporting module fails to calculate the data properly for 
> these months, because they are in two different years.
> This problem is related to other malfunction in tracker:
>  
> When selecting monthly, six-monthly, yearly period for repeatable program 
> stages you can't create a stage for a year different than the year of 
> enrollment.
>  
> Example
>  
> Program stage is six-monthly
>  
> 
>  
>  
> Enrollment date is in 2015
>  
> 
>  
> Current date is 2017
>  
> 
>  
> DHIS2 does not allow to create a six-monthly stages for 2016. Note how the 
> arrow used to go to next period (2016) is inactive. The only possible options 
> are the two six-monthly periods in 2015. 2014 is not active either.
>  
> 
>  
>  
>  
> Nick
>  
> On Tue, Apr 25, 2017 at 9:53 PM, Georgi Chakarov  > wrote:
> Hello DHIS2 users and devs!
>  
> I have two questions:
> 1)  Is there a way to enter data for a future date in Event and Tracker 
> capture? The latest date that could be selected in these two apps at data 
> entry is the current date.
> 
>  
> 
> 2)  Has someone worked with project periods that are outside of the 
> available periods in DHIS2? I have a client that uses Fiscal Year May, 1 – 
> April, 30 and this is causing a real trouble at data entry as well as 
> reporting.
> 
> For example, the period from May, 1 2015 – April, 30 2016 is defined as 
> Fiscal Year 2016. Data is entered daily in Event and Tracker Capture. How do 
> we enter data so that we fall under this specific reporting period and how do 
> we report an aggregate number for the entire 2016 Fiscal Year?
> 
> [Not to mention that TRACKER DOES NOT correctly aggregate reports when 
> selecting two different years and setting them as report filter in the 
> reports layout, which is an option to display one aggregate number for 2 
> years.]
> 
>  
> 
>  
> Your input is highly appreciated and awaited!
>  
> Thanks,
>  
> 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-us...@lists.launchpad.net 
> 
> Unsubscribe : https://launchpad.net/~dhis2-users 
> 
> More help   : https://help.launchpad.net/ListHelp 
> 
> 
> 
>  
> -- 
> Shurajit Dutta
> Health Information Consultant
> ___

Re: [Dhis2-devs] [Dhis2-users] Auto-Generated Client UICs in Tracker v2.25

2017-04-26 Thread Markus Bekken
Also, you can vote for this issue, and add your specific requirements in the 
comments: 
https://jira.dhis2.org/browse/DHIS2-434


> 25. apr. 2017 kl. 17.49 skrev Em Le Hong :
> 
> You can use script on custom form. Until now, there's no way for default form 
> to generate based on tracked entity attributes.
> 
> On Tue, Apr 25, 2017 at 5:48 PM, Brian O'Donnell  > wrote:
> Hi all,
> 
> I'm curious if anyone has experience in auto-generating Unique Identifier 
> Codes (UICs) in tracker capture module (v2.25 or below), or if there is a 
> best practices document out there.
> 
> We are capturing sensitive information about clients through android tracker. 
> The service provider would like to capture name and phone number data, but 
> restrict viewing of these data to higher-level users. Data entry roles should 
> only be able to search based on a system-generated UIC. You should be able to 
> construct and re-construct UICs based on client data, as in the diagram from 
> PSI below.
> 
> 
> So we do not need a randomly generated ID for the tracked entity, but a 
> script which constructs a custom string attribute based on other tracked 
> entity attributes, similar to this app, but built directly into DHIS2 form: 
> https://play.google.com/store/apps/details?id=org.eyeseetea.uicapp&hl=en 
> 
> 
> I am not the only one who has requested this 
> (https://lists.launchpad.net/dhis2-devs/msg47211.html 
> ) but I cannot find a 
> manual or correspondence online. Happy to provide more details on use case on 
> request.
> 
> Brian
> -- 
>    Brian O'Donnell, MPAff
> Informatics Project Manager
> bodonn...@akros.com  
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users 
> 
> Post to : dhis2-us...@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-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] [Dhis2-users] Enter data for a future date in Event and Tracker Capture

2017-04-26 Thread Markus Bekken
Hi again Georgi.

We have this Jira issue that would probably help you show the data you want in 
the reporting module if you remodeled your data, but it is planned for a later 
release - so perhaps no good to you now: DHIS2-127 
<https://jira.dhis2.org/browse/DHIS2-127>

Lifting the restriction on registering future event dates is a possibility. The 
restriction only applies in the UI at the moment, the back-end supports future 
event dates. If you create an improvement issue for this in Jira we can discuss 
it there. If we allow it for all programs, the user should probably get a 
visual cue that the event date is in the future to minimize accidental wrong 
dates.

For your second question I honestly dont see why the periods should be within 
the same year as the enrollment. Please register this part as a bug in Jira.

Markus

> 26. apr. 2017 kl. 09.50 skrev Georgi Chakarov :
> 
> Hi Markus,
>  
> I thought about it but then it will be really hard in reporting module to the 
> display the data for the desired period.
>  
> Are you able to comment on the below?:
>  
> When selecting monthly, six-monthly, yearly period for repeatable program 
> stages you can't create a stage for a year different than the year of 
> enrollment.
>  
> Example
>  
> Program stage is six-monthly
>  
> 
>  
>  
> Enrollment date is in 2015
>  
> 
>  
> Current date is 2017
>  
> 
>  
> DHIS2 does not allow to create a six-monthly stages for 2016. Note how the 
> arrow used to go to next period (2016) is inactive. The only possible options 
> are the two six-monthly periods in 2015. 2014 is not active either.
>  
> 
>  
>  
>  
> From: Markus Bekken [mailto:mar...@dhis2.org] 
> Sent: Wednesday, April 26, 2017 10:47 AM
> To: Georgi Chakarov 
> Cc: Shurajit Dutta ; 
> dhis2-us...@lists.launchpad.net; dhis2-devs@lists.launchpad.net
> Subject: Re: [Dhis2-users] Enter data for a future date in Event and Tracker 
> Capture
>  
> Hi Georgi and Nick
>  
> The tracker does not allow allow event dates in the future. This restriction 
> is probably there because most(all so far?) tracker use cases register actual 
> events that already has happened. Knowing nothing about your usecase: Can you 
> model it slightly differently, capturing the future date a data element 
> instead of the event date?
>  
> Markus
>  
>  
>  
>  
>  
>  
> 26. apr. 2017 kl. 09.29 skrev Georgi Chakarov  <mailto:geo...@logicaloutcomes.net>>:
>  
> Hi Nick,
>  
> Thanks for your response!
>  
> See my comments below.
>  
> Regards,
>  
> Georgi
>  
> From: Shurajit Dutta [mailto:shurajitdu...@gmail.com 
> <mailto:shurajitdu...@gmail.com>] 
> Sent: Wednesday, April 26, 2017 6:02 AM
> To: Georgi Chakarov  <mailto:geo...@logicaloutcomes.net>>
> Cc: dhis2-us...@lists.launchpad.net <mailto:dhis2-us...@lists.launchpad.net>; 
> dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>
> Subject: Re: [Dhis2-users] Enter data for a future date in Event and Tracker 
> Capture
>  
> Hi Georgi,
>  
> 1. You can select "Date in future" for attributes/data elements within a 
> program to enter future dates
>  
> 
>  
> I need program stage date/Event reporting date to be future dates. You know 
> how in Data Entry app you can allow for entering data in the future, so from 
> the period drop-down you can select to enter data for 2018 for example, 
> regardless that it is 2017 now. I need the same for Events and Tracker 
> capture stages.
>  
>  
> 2. Does the use of program indicators not solve this issue? You could select 
> those months as the period of interest during analysis.
>  
> The problem here is that the program indicators do not calculate properly. 
> Let me give you an example. My period is May, 1 2016 – April, 30 2017 (this 
> is Fiscal year 2017). I have been entering data for one Tracker program from 
> May,1 to April, 30 daily. I have built a program indicator of interest. When 
> I go to reporting I want to see ONE number, which is the sum/average/other 
> calculation of all months from May 2016 to April 2017. So, I select all these 
> months and put them in the reporting filter (I do not want them in 
> dimension). The reporting module fails to calculate the data properly for 
> these months, because they are in two different years.
> This problem is related to other malfunction in tracker:
>  
> When selecting monthly, six-monthly, yearly period for repeatable program 
> stages you can't create a stage for a year different than the year of 
> enrollment.
>  
> Example
>  
> Program stage is six-monthly
>  
> 
>  
>  
> Enrollment d

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

2017-05-02 Thread Markus Bekken
Hi Sam,
for the first part on event scheduling is fixed now. A bad version(without the 
schedule fix) was published inadvertently.

For the generation of the next visit, there seems to be a flag confusion here. 
There is two flags in the program stage config - one called "Display generate 
event box after completed" and another one called "Ask user to create new event 
when stage is complete".

For the moment the tracker only regards the last one - so if you check "Ask 
user to create new event when stage is complete" it should work.

We will clean this up as part of DHIS2-1507, but then you have a workaround. 

Markus

> 1. mai 2017 kl. 13.51 skrev 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 <https://jira.dhis2.org/browse/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 
> <https://jira.dhis2.org/browse/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  <mailto:samuel.john...@qebo.co.uk>>:
>  
> Hi devs,
>  
> Just following up on the bug below (DHIS2-1438 
> <https://jira.dhis2.org/browse/DHIS2-1438>).  I realize Abyot is on leave 
> (congratulations! J), 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 
>  <mailto:dhis2-devs-bounces+samuel.johnson=qebo.co...@lists.launchpad.net>> on 
> behalf of Sam Johnson  <mailto:samuel.john...@qebo.co.uk>>
> Date: Tuesday, 18 April 2017 at 19:55
> To: Abyot Asalefew Gizaw mailto:ab...@dhis2.org>>, DHIS2 
> Developers  <mailto:dhis2-devs@lists.launchpad.net>>
> Cc: "absolo...@yahoo.com <mailto:absolo...@yahoo.com>"  <mailto:absolo...@yahoo.com>>, Immaculate Ayebazibwe  <mailto:ekass...@gmail.com>>
> 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 <http://aka.ms/LearnAboutSpoofing>   
> Feedback <http://aka.ms/SafetyTipsFeedback>
> 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 wor

Re: [Dhis2-devs] How do filters work in Enrolment program indicators?

2017-05-08 Thread Markus Bekken
Hi Sam,

your suspicion is correct. In Enrollment program indicators you will always 
evaluate the newest value for each of the data elements within repeatable 
program stages - both for filters and expression. This means that for your use 
case you will have to use the event analyticstype.

I think you can acheive what you seek here by making the following program 
indicator:
AnalyticsType: Event
Aggregation type: Count
Expression: Enrollment count
Filter: Event macthing the test result

This program indicator will first find all events that matches the filter 
criteria, then make sure to count only how many distinct enrollments that is 
represented in this population of events. 

Markus

> 8. mai 2017 kl. 12.09 skrev Sam Johnson :
> 
> Hi devs,
>  
> Just a quick question around the operation of the enrolment indicators.  I’m 
> trying to do a program indicator which searches a repeatable program stage to 
> see if one or more events include a specific data value (a test result).  The 
> catch is that the data value could be in any event, and may even appear 
> multiple times, but I only want to count each enrolment once, regardless of 
> the number of test results.
>  
> I’ve tried using an ‘enrolment’ program indicator with a filter that ensures 
> only events which include my data value are included in the indicator 
> calculation; however, this doesn’t seem to be working as I expected, and the 
> entire enrolment is often being filtered out, even though it contains a 
> positive test result.
>  
> So I’d be grateful if you could clarify when the filter is applied for 
> ‘enrolment’ program indicators:
> · Is it applied at the event level, before the enrolment record takes 
> the ‘latest’ event for each program stage (so I can filter the events that 
> are used to calculate the ‘latest’ event for each enrolment?)
> · Or for Enrolment PIs is it actually an enrolment rather than an 
> event filter, ie it’s applied after the ‘latest’ event has been pulled for 
> each program stage (so the filter is only applied to the ‘latest’ events, not 
> all events)?
>  
> I think the former would be more powerful, but if it’s the latter (which I 
> suspect), is there another way of counting the number of enrolments that have 
> had a particular value recorded during any one of a number of repeatable 
> events?
>  
> Many thanks in advance for any help/thoughts you can share!
>  
> Cheers, Sam.
>  
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] d2:validatePattern

2017-05-12 Thread Markus Bekken
Hi Simon.
The expression below seems all correct. Tested the same in 2.27 snapshot and it 
works. Which version are you on? Do you have other rules working for the same 
variable A{index_id}?

Markus

> 12. mai 2017 kl. 09.28 skrev simon mugisa :
> 
> Hi there evryone,
> 
> has anybody out there been succesful with the d2:validatePattern pattern 
> program rule,
> i impliment it by:   !d2:validatePattern(A{index_id} ,'\\d{6}\/\\d{2}\/\\d')  
> which i coppied from the dhis2 user guide and added my own A{} but i get this 
> error:
> d2:validatePattern was called with the incorrect number of parameters
> 
> my question is how many parameters are required. if they are two can someone 
> give the right format for this.
>  
>  
> Simon Robert Kununka
> DHIS2 implimentor, Analyst and Consultant
> 
> Uganda-Kampala
> Direct: + 256-777-108-323
> E-mail: nomisrmug...@gmail.com 
> 
> 
> "Don't wish it was easier, wish you were better. Don't wish for less 
> problems, wish for more skills. Don't wish for less change , wish for more 
> wisdom."
> 
> This message and its attachments are confidential and solely for the intended 
> recipients. If received in error, please delete them and notify the sender 
> via reply e-mail immediately.
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] Error creation new stage on 2.26

2017-05-15 Thread Markus Bekken
Hi There Pepe,
Are you able to reproduce this issue on the demo server? 
https://play.dhis2.org/demo/

How are you adding the event? The error message you are getting seems to 
indicate that you are trying to create more than one event in non-repeatable 
program stage. This should not be possible in the Tracker Capture user 
Interface, as the Tracker should make sure only one event is added in 
non-repeatable program stages.

Markus 


> 15. mai 2017 kl. 23.23 skrev Pepe Ken Mvulu :
> 
> Hi Dev team,
> I use version 2.26 of the DHIS2. Build 1c9a347
> I use a Tracker program with multiple events. When I want to add a new 
> "Stage", I get this error message.
> Error
> 
> Error in event creation
> One more conflicts encountered, please check import summary.
> 
> Response from the server.
> 
> [{"responseType":"ImportSummary","status":"ERROR","importOptions":{"idSchemes":{},"dryRun":false,"async":false,"importStrategy":"CREATE","mergeMode":"REPLACE","skipExistingCheck":false,"sharing":false,"skipNotifications":false,"datasetAllowsPeriods":false,"strictPeriods":false,"strictCategoryOptionCombos":false,"strictAttributeOptionCombos":false,"strictOrganisationUnits":false,"requireCategoryOptionCombo":false,"requireAttributeOptionCombo":false},"description":"Program
>  stage is not repeatable and an event already 
> exists","importCount":{"imported":0,"updated":0,"ignored":1,"deleted":0}}]
> 
> Does anyone have an idea to help?
> Regards 
>  
> Pepe Ken Mvulu
> Responsable M&E
> Programme Village Assaini
> Direction de l'Hygiène
> Ministère de la Santé Publique/RDC
> Tél: +243 811515878
> Skype: pepe.ken.mvulu
> ___
> 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


Re: [Dhis2-devs] Aggregation type for Tracker Data Elements

2017-05-18 Thread Markus Bekken
Hi!
Which version of Dhis are you using? Can you reproduce on play.dhis2.org?

Markus

> 16. mai 2017 kl. 20.44 skrev Lorill Crees :
> 
> Hi,
> 
> We have program stage data elements of type integer for year and for month 
> that show up as sums when visualizing in the pivot table. I see that going in 
> to edit the Data Elements, that changing the Aggregation Type is disabled for 
> Data Elements of type Tracker. 
> 
> How can we change the aggregation type to be average, so the year and month 
> will show up properly in the pivot table instead of summed?
> 
> Thanks,
> 
> Lorill
> 
> -- 
> Lorill Crees
> Project Leader / Senior Developer
> 2Paths Solutions Ltd. 
> 
> lcr...@2paths.com 
> skype: lorill2paths
> (604) 689-4123 x 15
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Create Program indicator to sum DE across events

2017-05-22 Thread Markus Bekken
Hi there Joao,
At the moment this is not possible to do within standard DHIS2 functionality. 
We are working on a change that might enable this kind of calculation, but this 
is not detailed and planned to a specific release yet.

It would be possible to make a custom SQL view that retrieves this. This option 
is a bit more advanced.

Best regards,
Markus

> 22. mai 2017 kl. 10.03 skrev Joao Machiana :
> 
> Hi community members
> 
> ​I'm creating a Tracker form, which has 2 stages: one is non-repeatable and 
> the other one is repeatable
> 
> I need to create an Indicator that takes data from a DE from the 
> non-repeatable stage and subtracts the sum of a particular DE from the 
> repeatable stages (all events). Something like this:
> 
> Indicator = {NonRepatableStage.DataElement1} - 
> SUM{RepeatableStage.DataElement2}
> 
> What I'm getting is the Indicator takes the value of the last event, but I 
> actually want the sum of the values of a particular DE of the events 
> (repeatable stages)
> 
> 
> Best regards
> 
> 
> -- 
> João X. Machiana
> Systems Analyst and Programmer
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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


Re: [Dhis2-devs] Expected "inter-stage" behaviour of ASSIGN program rule action

2017-05-22 Thread Markus Bekken
Hi Victor,
Sorry for the delayed response. 

The ASSIGN rules is only intended to affect the data that the user sees(the 
active/current event). This usually means that you can create helper fields, 
but they rely on the basis for your calculations being in the same event, or in 
previously registered data. The behavior you describe in 2.25 was not planned, 
and can be seen as a bug. 

There is two alternative options that can be pursued:
- Try creating a program indicator with analytics type "Enrollment"(introduced 
in 2.26). This will allow you to compare data from the latest event in each 
program stage across entire enrollments. Possibly this can take away the need 
for the helper fields.
- Make a helper field in second program stage, and make an assign rule that 
assigns "the other way". You will be able to query data from all other program 
stages when calculating and assigning values to helper fields.

Best regards,
Markus

> 22. mai 2017 kl. 16.32 skrev Victor Garcia :
> 
> Hi all,
> 
> does anyone have any insight about this issue? It is fundamental to 
> understand the behaviour of ASSIGN program rules in order to design the 
> programs.
> 
> Thanks,
> 
> Víctor
> 
> On 15 May 2017 at 17:26, Victor Garcia  > wrote:
> Hi all,
> 
> I have a question regarding the behaviour of ASSIGN activity type in program 
> rules when the program has several stages.
> 
> Our context is a program with three stages (opening, consultation, closure). 
> In analysis we want to show data from opening and closure stages in the same 
> table. Since currently it is not possible to do this kind of analysis in 
> Event Report, we have created some ASSIGN program rules to copy values from 
> closure stage to opening stage so that we have all the information we need 
> for analysis in the same stage.
> 
> In 2.25 we saw that it was possible to assign values to previous stages and 
> we created a setup relying on this behaviour. But it seems to have changed in 
> 2.26 and now the ASSIGN action only affects the "active" stage and does not 
> create any value in previous or following stages...
> 
> Since this point is not explicitely detailed in the documentation, we would 
> like to know what is the expected "inter-stage" behaviour of ASSIGN in order 
> to think about an strategy that will work in current and future releases. And 
> if there is a way to do this kind of assignments in 2.26.
> 
> Thank you a lot,
> 
> Víctor
> 
> ___
> 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


Re: [Dhis2-devs] Expected "inter-stage" behaviour of ASSIGN program rule action

2017-05-24 Thread Markus Bekken
Thank you for understanding. The primary focus going forward is to solve these 
usecases on the event aggregation / program indicator side. I would be happy to 
hear the other use cases you mentioned too.

Between the options below I hope you will be able to find a liveable solution.

Markus

> 23. mai 2017 kl. 12.18 skrev Victor Garcia :
> 
> Hi Markus,
> 
> thanks for the response. We suspected that this behavior could be something 
> non-expected, but we really relied on it because it allows us to analyse in a 
> more flexible way.
> 
> For example, one of our use cases is to create a table combining two 
> dataelements in different stages that are defined as optionSets. Let's say we 
> have "Main symptom" at first stage and "Condition at exit" at closure. We 
> need a table that displays the options in "Main symptom" as rows and the 
> options in "Condition at exit" as columns. 
> 
> - Following the first approarch, it would be required to create a program 
> indicator for each combination. We can create some of them (the most 
> important), but the number of combinations could be very large. And it would 
> not allow filtering by other dimensions like patient age or sex.
> 
> - The second approach will work in most of the cases. We could create a 
> helper field in the last stage that copies the value of "Main symptom" and 
> analyse in the last stage. But if somebody modifies the values in the first 
> stage when the last stage has already been registered, the values in the last 
> stage will remain outdated unless they open the last stage to trigger the 
> program rules. It is not usual but could happen sometimes.
> 
> We have a few more use cases where it would be useful to do assignments to 
> other stages. But we also know that this is a behaviour that was not 
> initially thought.
> 
> Thanks,
> 
> Víctor
> 
> On 22 May 2017 at 21:43, Markus Bekken  <mailto:mar...@dhis2.org>> wrote:
> Hi Victor,
> Sorry for the delayed response. 
> 
> The ASSIGN rules is only intended to affect the data that the user sees(the 
> active/current event). This usually means that you can create helper fields, 
> but they rely on the basis for your calculations being in the same event, or 
> in previously registered data. The behavior you describe in 2.25 was not 
> planned, and can be seen as a bug. 
> 
> There is two alternative options that can be pursued:
> - Try creating a program indicator with analytics type 
> "Enrollment"(introduced in 2.26). This will allow you to compare data from 
> the latest event in each program stage across entire enrollments. Possibly 
> this can take away the need for the helper fields.
> - Make a helper field in second program stage, and make an assign rule that 
> assigns "the other way". You will be able to query data from all other 
> program stages when calculating and assigning values to helper fields.
> 
> Best regards,
> Markus
> 
>> 22. mai 2017 kl. 16.32 skrev Victor Garcia > <mailto:vgarcia...@gmail.com>>:
>> 
>> Hi all,
>> 
>> does anyone have any insight about this issue? It is fundamental to 
>> understand the behaviour of ASSIGN program rules in order to design the 
>> programs.
>> 
>> Thanks,
>> 
>> Víctor
>> 
>> On 15 May 2017 at 17:26, Victor Garcia > <mailto:vgarcia...@gmail.com>> wrote:
>> Hi all,
>> 
>> I have a question regarding the behaviour of ASSIGN activity type in program 
>> rules when the program has several stages.
>> 
>> Our context is a program with three stages (opening, consultation, closure). 
>> In analysis we want to show data from opening and closure stages in the same 
>> table. Since currently it is not possible to do this kind of analysis in 
>> Event Report, we have created some ASSIGN program rules to copy values from 
>> closure stage to opening stage so that we have all the information we need 
>> for analysis in the same stage.
>> 
>> In 2.25 we saw that it was possible to assign values to previous stages and 
>> we created a setup relying on this behaviour. But it seems to have changed 
>> in 2.26 and now the ASSIGN action only affects the "active" stage and does 
>> not create any value in previous or following stages...
>> 
>> Since this point is not explicitely detailed in the documentation, we would 
>> like to know what is the expected "inter-stage" behaviour of ASSIGN in order 
>> to think about an strategy that will work in current and future releases. 
>> And if there is a way 

Re: [Dhis2-devs] [Dhis2-users] Program Indicator with Period as Condition

2017-06-01 Thread Markus Bekken
Hi there Stanley and Emma,
sorry for the delay.

For Emmas Question - To count wether someone has received services or not - but 
avoid counting them twice - you can make the following indicator:
Analytic type: Event
Aggregation operator: Count
Expression: V{tei_count}
Filter: V{program_stage_uid} == 'THE UID OF YOUR SERVICE PROGRAM STAGE'
(if you are using 2.25 or older, the last filter is not possible - you would 
have to make a filter checking one of the mandatory data elements in your 
program stage(s) used for giving services)

For the original two issues from Stanley:
The interval between two events of the same stage is not currently possible to 
calculate with the current program indicator functionality. We hope to make 
full support for this in a coming release. To work around this in the current 
solution, you would have to register the interval since the last event as a 
data element in the repeating program stage. This data element could be 
something that the data entry user calculates and enters, or it could be auto 
assigned by a program rule. The vulnerability with using a helper data element 
would be the fact that the interval is a part of the data, and if you already 
have data entered these older events would not have the correct value in this 
data element. If you change your mind or there is an error in the data, it 
would be manual work to go through and rectify them.

Finding all patients that is negative and with more than 120 days since the 
last service can be done in 2.26 and later with the following program indicator:
Analytic type: Enrollment
Aggreagation operator: Count
Expression: V{tei_count}
Filter: #{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and 
d2:daysBetween(V{event_date}, V{current_date}) > 120

Hope this helps.

Best regards
Markus


> 1. jun. 2017 kl. 09.43 skrev Stanley Kalyati :
> 
> Any update on this?
> 
> Eagerly waiting for ideas.
> 
> Stanley
> 
> On Wed, May 31, 2017 at 2:08 PM, Stanley Kalyati  <mailto:skaly...@gmail.com>> wrote:
> This another good observation.Let me also benefit from this.
> 
> Stanley
> 
> On Wed, May 31, 2017 at 1:26 PM, Immaculate Ayebazibwe  <mailto:ekass...@gmail.com>> wrote:
> Hi Markus,
> 
> Stanley, I hope I am not hijacking the conversation.
> 
> Is it possible to just count that some one received the HTC services in a 
> given period and not how many times they received this service.
> Like Stanley said, this is a service offered on a daily/weekly basis and in 
> order to avoid double counting I would just want to check if service is 
> provided in a given period despite the number of times.
> How do I accomplish this?
> 
> 
> 
> Thank you and Kind Regards
> Immarcqulate. A (Emma Kassy) 
> 
> "You miss 100% of the shots you don't take."
> 
> On Wed, May 31, 2017 at 12:54 PM, Stanley Kalyati  <mailto:skaly...@gmail.com>> wrote:
> Markus,
> 
> You have just hit the nail on the head.All those conditions are what am 
> looking for.
> 
> Please guide.
> 
> Thanks
> 
> Stanley
> 
> On May 31, 2017 9:50 AM, "Markus Bekken"  <mailto:mar...@dhis2.org>> wrote:
> Hey again,
> Do you want to evaluate the interval _between_ the visits in the HTC stage 
> for negative patients, and classify them depending on wether it was more or 
> less than 120 days since the last visit?
> 
> Or did you mean that you want to count patients currently negative, and where 
> the last HTC visit happened more than 120 days ago? (Patients that should 
> have come in for a repeat test)
> 
> Best 
> Markus
> 
> 
>> 31. mai 2017 kl. 06.54 skrev Stanley Kalyati > <mailto:skaly...@gmail.com>>:
>> 
>> Markus,
>> 
>> Thanks for coming through.
>> 
>> I have a program with 3 stages.HTC,ART,Viral Load.
>> 
>> HTC is set for daily since clients come for testing each day.And we also do 
>> analysis with regards to those that came to access HTC services per week.Now 
>> those that turn negative are supposed to return for a retest every 3 
>> months.So I want the system to able to identify if one was already tested 
>> like 120days ago or more than 120 days.And we call these repeat tests.
>> 
>> I hope this makes sense.
>> 
>> Secondly, if one tested negative,the two stages must be closed.Only those 
>> positive the other stages must be enabled.
>> 
>> 
>> I hope this makes sense.
>> 
>> Stanley
>> On May 30, 2017 10:46 PM, "Markus Bekken" > <mailto:mar...@dhis2.org>> wrote:
>> Hi Stanley,
>> 
>> It would be great if you can give some more specifics on your use case. 
>> Which program stages do you have, and what dates/inte

Re: [Dhis2-devs] [Dhis2-users] Potential Bug? (skip-logic rules fire on drop-down select but not on radio-button)

2017-06-01 Thread Markus Bekken
Hi there David!
I might also be a bit sleep deprived, but have independently confirmed what you 
describe below.

Will fix and get back to you!

Markus

> 1. jun. 2017 kl. 12.28 skrev David Hagan :
> 
> Hey there community ... 
> 
> Someone slap me if I've got this wrong ... 
> 
> ... been up nearly 24 hours with crazy travel today  and it doesn't help that 
> some studious drummers associated with Ramadan rituals are gleefully banging 
> their drums outside my hotel bedroom window for half an hour at 2AM every 
> morning since last Saturday 😵
> 
> Anyway ... got a simple event capture form with some skip logic to un-hide 
> some extra fields when certain options are selected. As drop-down lists, the 
> rules fire, but as radio buttons (the setting you can select for the overall 
> program), the same rule doesn't fire.
> 
> Anyone else experience this or can someone validate or not? 
> 
> Version details are: 
> 
> Version:
> 2.26
> Build revision:
> 09e4ed6
> Build date:
> 2017-05-22 13:50
> 
> Cheers
> 
> David Hagam
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Potential Bug? (skip-logic rules fire on drop-down select but not on radio-button)

2017-06-02 Thread Markus Bekken
Hey David,

a build is triggering now for 2.26 where this should be fixed.

Markus

> 1. jun. 2017 kl. 14.04 skrev Markus Bekken :
> 
> Hi there David!
> I might also be a bit sleep deprived, but have independently confirmed what 
> you describe below.
> 
> Will fix and get back to you!
> 
> Markus
> 
>> 1. jun. 2017 kl. 12.28 skrev David Hagan > <mailto:david.ha...@sagehagan.com>>:
>> 
>> Hey there community ... 
>> 
>> Someone slap me if I've got this wrong ... 
>> 
>> ... been up nearly 24 hours with crazy travel today  and it doesn't help 
>> that some studious drummers associated with Ramadan rituals are gleefully 
>> banging their drums outside my hotel bedroom window for half an hour at 2AM 
>> every morning since last Saturday 😵
>> 
>> Anyway ... got a simple event capture form with some skip logic to un-hide 
>> some extra fields when certain options are selected. As drop-down lists, the 
>> rules fire, but as radio buttons (the setting you can select for the overall 
>> program), the same rule doesn't fire.
>> 
>> Anyone else experience this or can someone validate or not? 
>> 
>> Version details are: 
>> 
>> Version:
>> 2.26
>> Build revision:
>> 09e4ed6
>> Build date:
>> 2017-05-22 13:50
>> 
>> Cheers
>> 
>> David Hagam
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> Post to : dhis2-devs@lists.launchpad.net 
>> <mailto:dhis2-devs@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~dhis2-devs 
>> <https://launchpad.net/~dhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp 
>> <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


Re: [Dhis2-devs] [Dhis2-users] Program Indicator with Period as Condition

2017-06-07 Thread Markus Bekken
Hey Stanley,
currently thats not possible to do exactly as defined below. When using the 
enrollment analytics type, the repeated events is "flattened", so you can only 
query the newest data value for each data element within each program stage. 
You would have to model your data for the purpose if you want to do something 
like this. For example by splitting into more program stages or by having 
certain data elements that gets filled in at patient status changes.

We are looking at ways to avoid this flattening and letting you query in the 
way you want here, but it is not tagged to a release yet.

Markus

> 6. jun. 2017 kl. 20.54 skrev Stanley Kalyati :
> 
> Hi Markus and All
> 
> thank you for your help with regards to program indicators evaluation between 
> period.i.e
> 
> Finding all patients that is negative and with more than 120 days since the 
> last service can be done in 2.26 and later with the following program 
> indicator:
> Analytic type: Enrollment
> Aggreagation operator: Count
> Expression: V{tei_count}
> Filter: #{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and 
> d2:daysBetween(V{event_date}, V{current_date}) > 120
> 
> However,how can i evaluate or add a condition of all those tested "negative" 
> 120 days ago but have tested "positive'' within 120 days after the first HIV 
> test?
> 
> Will it look like this?
> 
> Analytic type: Enrollment
> Aggreagation operator: Count
> Expression: V{tei_count}
> Filter: (#{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and 
> d2:daysBetween(V{event_date}, V{current_date}) > 120) and (#{DATA ELEMENT FOR 
> DIAGNOSIS} == 'Positive' and d2:daysBetween(V{event_date}, 
> V{current_date})<120)
> 
> Kindly assist
> 
> Stanley
> 
> 
> 
> On Fri, Jun 2, 2017 at 8:14 AM, Immaculate Ayebazibwe  <mailto:ekass...@gmail.com>> wrote:
> Thank you Markus,
> Will get back to you.
> 
> 
> 
> Thank you and Kind Regards
> Immarcqulate. A (Emma Kassy) 
> 
> "You miss 100% of the shots you don't take."
> 
> On Thu, Jun 1, 2017 at 1:04 PM, Markus Bekken  <mailto:mar...@dhis2.org>> wrote:
> Hi there Stanley and Emma,
> sorry for the delay.
> 
> For Emmas Question - To count wether someone has received services or not - 
> but avoid counting them twice - you can make the following indicator:
> Analytic type: Event
> Aggregation operator: Count
> Expression: V{tei_count}
> Filter: V{program_stage_uid} == 'THE UID OF YOUR SERVICE PROGRAM STAGE'
> (if you are using 2.25 or older, the last filter is not possible - you would 
> have to make a filter checking one of the mandatory data elements in your 
> program stage(s) used for giving services)
> 
> For the original two issues from Stanley:
> The interval between two events of the same stage is not currently possible 
> to calculate with the current program indicator functionality. We hope to 
> make full support for this in a coming release. To work around this in the 
> current solution, you would have to register the interval since the last 
> event as a data element in the repeating program stage. This data element 
> could be something that the data entry user calculates and enters, or it 
> could be auto assigned by a program rule. The vulnerability with using a 
> helper data element would be the fact that the interval is a part of the 
> data, and if you already have data entered these older events would not have 
> the correct value in this data element. If you change your mind or there is 
> an error in the data, it would be manual work to go through and rectify them.
> 
> Finding all patients that is negative and with more than 120 days since the 
> last service can be done in 2.26 and later with the following program 
> indicator:
> Analytic type: Enrollment
> Aggreagation operator: Count
> Expression: V{tei_count}
> Filter: #{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and 
> d2:daysBetween(V{event_date}, V{current_date}) > 120
> 
> Hope this helps.
> 
> Best regards
> Markus
> 
> 
>> 1. jun. 2017 kl. 09.43 skrev Stanley Kalyati > <mailto:skaly...@gmail.com>>:
>> 
>> Any update on this?
>> 
>> Eagerly waiting for ideas.
>> 
>> Stanley
>> 
>> On Wed, May 31, 2017 at 2:08 PM, Stanley Kalyati > <mailto:skaly...@gmail.com>> wrote:
>> This another good observation.Let me also benefit from this.
>> 
>> Stanley
>> 
>> On Wed, May 31, 2017 at 1:26 PM, Immaculate Ayebazibwe > <mailto:ekass...@gmail.com>> wrote:
>> Hi Markus,
>> 
>> Stanley, I hope I am not hijacking the conversation.
>> 
>>

Re: [Dhis2-devs] API - event coordinates not getting saved

2017-06-12 Thread Markus Bekken
Dear Harsh,
can you reproduce in play? Trying to reproduce through the event capture app, 
the only difference I see between the two payloads is the number of decimals in 
the coordinate captured. The apps uses only 6 decimals:
"coordinate":{"latitude":9.394871,"longitude":-11.487579}

Markus

> 12. jun. 2017 kl. 14.53 skrev Harsh Atal :
> 
> Hi
> 
> I am making events through API which include coordinates. But when posting 
> the event everything gets saved except coordinates.
> 
> URL : http://localhost:8090/dhis/api/events/ 
> 
> Pay Load : 
> {
> "coordinate": {"latitude": 13.1707428419558, "longitude": 79.6169626173919},
> "event": "O02d839dd7c",
> "eventDate": "2017-04-05T16:20:00.360+05:30",
> "orgUnit": "ZFMOv30Ab8b",
> "program": "Ml0ZNj9APN0",
> "programStage": "iWcQ5lxmsy4",
> "status": "COMPLETED"
> }
> 
> Import summary is all OK and rest of the data is saved. 
> 
> Version:
> 2.25
> Build revision:
> f20cd15
> Build date:
> 2017-06-12 17:23
> 
> Same happens in 26 and 27 also.
> 
> Regards
> harsh
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Skip-logic on Events with Option Codes - can't seem to get it to work...

2017-06-12 Thread Markus Bekken
Hi David!
There is a flag when you create the source field that lets you control wether 
the value or code should be used in the comparisons. Unfortunately the source 
fields is not editable once created until version 2.27 onwards. You can check 
the settings of your source field in the API:

https://play.dhis2.org/release1/api/programRuleVariables?paging=none&fields=name,programRuleVariableSourceType,useCodeForOptionSet&filter=name:eq:(sourceFieldName)

Also - what is the source type of the source field that behaves inconsistently?

Markus

> 13. jun. 2017 kl. 08.32 skrev David Hagan :
> 
> Hi,
> 
> Version: 2.26
> Build revision: a9c5994
> Build date: 2017-06-11 06:43
> 
> Has anyone else had problems with inconsistency in the execution of 
> skip-logic rules for Events? Sometimes the rules seems to work on the 'value' 
> ... sometimes they don't seem to work. But what I really need (since we are 
> doing this in two languages) is the rule to fire off the Code for an Option 
> Set (simple drop-down data-element with 4 values).
> 
> Any known issues with this?
> 
> Cheers
> 
> David
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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] [Bug 1490838] Re: tracker get not yet enrolled on opening record

2015-11-18 Thread Markus Bekken
This has not been observed for some time. Wont use time on trying to
repro unless it reemerges as a problem.

** Changed in: dhis2
   Status: New => Invalid

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1490838

Title:
  tracker get not yet enrolled on opening record

Status in DHIS:
  Invalid

Bug description:
  After a cache clean or when accessing the solution on a new browser
  for the first time, the first patient that is opened is sometimes not
  shown: "Not yet enrolled" is displayed. Workaround: Go back and reopen
  the record. Might be connected to slow internet.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1490838/+subscriptions

___
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] Program Rules are not working on Dropdowns(Event/Tracker )

2015-11-27 Thread markus . bekken
Hi Shourab!

Is your dropdown defined using a 'yes/no' data type, or in fact an option set?

For yes/no data types, the syntax would be:
> #{bcg} == false || #{bcg} == true

Or shorthand:
> !#{bcg} || #{bcg}


If it is an option set, the rule seems correct(but did you mean to hide the 
fields both when the dropdown is 'yes' and 'no'? In that case the dropdown also 
specifies other options than yes and no, your rule makes sense.

Markus

> Den 27. nov. 2015 kl. 12.17 skrev Sourabh Bhardwaj :
> 
> Hi,
> 
> Can anybody tell how to create program rules for dropdowns. As i am doing it 
> in following way:
> 
> If
> 
> #{bcg} == 'No' || #{bcg} == 'Yes'  then Hide some field.
> 
> No/Yes are values from dropdown. 
> 
> I am using https://play.dhis2.org/demo link. 
> 
> 
> But this expression is not working. I have tried on other dropdowns also but 
> doesn't get the output.
> 
> Thanks & Regrads,
> Sourabh Bhardwaj.
> 
> 
> 
> ___
> 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] [Bug 1420646] Re: tracker capture - optionsets at the end of sections getting clipped

2015-12-07 Thread Markus Bekken
** Changed in: dhis2
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1420646

Title:
  tracker capture - optionsets at the end of sections getting clipped

Status in DHIS:
  Fix Released

Bug description:
  Tested with tracker capture and a program using sections to divide the
  input fields. When placing a field with an option set in the form, the
  option set itself is getting displayed as a drop down with the
  eligable values when cliking into the field. If the option set field
  is placed at the end of a section, the dropdown is getting clipped at
  the end of the section, regardless if the whole dropdown fit inside.

  The problem was seen in 2.19 in Chrome, Safari and IE.

  A proposed css fix is commited in the folkehelsa branch: r15633

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1420646/+subscriptions

___
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] [Bug 1524306] [NEW] Program indicator data element selection

2015-12-09 Thread Markus Bekken
Public bug reported:

When adding or editing a program indicator:
To see data elements to add to the expression, it is necessary to select a 
program stage. When the program stage is selected, the data elements is 
displayed. So far so good.

Deselect the program stage(select "Please select"). The data elements is
not cleared from the list, but when clicking the data element names, an
erroneus entry is added to the expression: "#{[ Select program stage
].VGRhSr5vvTP}"

We should either blank the list of data elements when program stage is
deselected, or make sure that the data elements added to the expression
always reflects the program stage last selected.

** Affects: dhis2
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1524306

Title:
  Program indicator data element selection

Status in DHIS:
  New

Bug description:
  When adding or editing a program indicator:
  To see data elements to add to the expression, it is necessary to select a 
program stage. When the program stage is selected, the data elements is 
displayed. So far so good.

  Deselect the program stage(select "Please select"). The data elements
  is not cleared from the list, but when clicking the data element
  names, an erroneus entry is added to the expression: "#{[ Select
  program stage ].VGRhSr5vvTP}"

  We should either blank the list of data elements when program stage is
  deselected, or make sure that the data elements added to the
  expression always reflects the program stage last selected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1524306/+subscriptions

___
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] [Bug 1530140] [NEW] (Tracker Capture) Registration - no error message when email format is invalid

2015-12-30 Thread Markus Bekken
Public bug reported:

If supplying an invalid email in a tracked entity attribute field for
email, the underlying registration fails but no error message is given
to the end user.

** Affects: dhis2
 Importance: Medium
 Assignee: Markus Bekken (markus-bekken)
 Status: Fix Committed

** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

** Changed in: dhis2
   Status: New => Fix Committed

** Changed in: dhis2
   Status: Fix Committed => In Progress

** Changed in: dhis2
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1530140

Title:
  (Tracker Capture) Registration - no error message when email format is
  invalid

Status in DHIS:
  Fix Committed

Bug description:
  If supplying an invalid email in a tracked entity attribute field for
  email, the underlying registration fails but no error message is given
  to the end user.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1530140/+subscriptions

___
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] Issue with program rule in build 20987

2016-01-04 Thread Markus Bekken
Hi Ese!
Thanks for reporting. I am able to reproduce this in the cases where the name 
of the program rule is already taken, but the other program rule is in a 
different program. Will work on a fix for this, but can you verify wether your 
case is the same - alternatively send me some more info on your case?

Best regards,
Markus

> 4. jan. 2016 kl. 22.26 skrev Ese Egerega :
> 
> Hi Devs,
> 
> You may want to check the program rule feature. Its appears the current build 
> version 20987 has a problem saving rules. When you create a rule and click on 
> Add, it disappears (e.g. it doesn't show up in your list of rules).
> 
> Thanks,
> Ese
> ___
> 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


Re: [Dhis2-devs] Issue with program rule in build 20987

2016-01-05 Thread Markus Bekken
Thanks Ese,
it is fixed and backported to 2.21 - revision 20989.

Markus

> 5. jan. 2016 kl. 05.43 skrev Ese Egerega :
> 
> Thats correct Markus. I just verified that is only happens where the name of 
> the program rule is already taken in a different program.
> 
> -Ese
> 
> On Mon, Jan 4, 2016 at 11:35 PM, Markus Bekken  <mailto:markus.bek...@gmail.com>> wrote:
> Hi Ese!
> Thanks for reporting. I am able to reproduce this in the cases where the name 
> of the program rule is already taken, but the other program rule is in a 
> different program. Will work on a fix for this, but can you verify wether 
> your case is the same - alternatively send me some more info on your case?
> 
> Best regards,
> Markus
> 
> > 4. jan. 2016 kl. 22.26 skrev Ese Egerega  > <mailto:e...@cis.com.ng>>:
> >
> > Hi Devs,
> >
> > You may want to check the program rule feature. Its appears the current 
> > build version 20987 has a problem saving rules. When you create a rule and 
> > click on Add, it disappears (e.g. it doesn't show up in your list of rules).
> >
> > Thanks,
> > Ese
> > ___
> > Mailing list: https://launchpad.net/~dhis2-devs 
> > <https://launchpad.net/~dhis2-devs>
> > Post to : dhis2-devs@lists.launchpad.net 
> > <mailto:dhis2-devs@lists.launchpad.net>
> > Unsubscribe : https://launchpad.net/~dhis2-devs 
> > <https://launchpad.net/~dhis2-devs>
> > More help   : https://help.launchpad.net/ListHelp 
> > <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


Re: [Dhis2-devs] Search person by incidence date range

2016-01-06 Thread Markus Bekken
Dear Nayeem,
at the moment you can do an advanced search based on enrollment date, but not 
incidence date. Would it cover your usecase if the advanced search accomodated 
the incidence date in the same way as enrollment date?

Markus

> 6. jan. 2016 kl. 12.02 skrev Nayeem Al Mifthah :
> 
> Dear All
> 
> I want to search a entities by incidence date range, Is it possible on 
> tracker?
> 
> 
> Nayeem Al Mifthah
> Consultant (Team Leader of HMIS)
> Management Information System
> Directorate General of Health Services (DGHS), Bangladesh
> Supported by: UNICEF-Bangladesh
> Email: n.mift...@gmail.com   | 
> nay...@mis.dghs.gov.bd 
> Cell:+8801914030574
> Skype: nayeem.a.m
> ___
> 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] [Bug 1524306] Re: Program indicator data element selection

2016-01-10 Thread Markus Bekken
** Changed in: dhis2
   Status: New => Fix Committed

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1524306

Title:
  Program indicator data element selection

Status in DHIS:
  Fix Committed

Bug description:
  When adding or editing a program indicator:
  To see data elements to add to the expression, it is necessary to select a 
program stage. When the program stage is selected, the data elements is 
displayed. So far so good.

  Deselect the program stage(select "Please select"). The data elements
  is not cleared from the list, but when clicking the data element
  names, an erroneus entry is added to the expression: "#{[ Select
  program stage ].VGRhSr5vvTP}"

  We should either blank the list of data elements when program stage is
  deselected, or make sure that the data elements added to the
  expression always reflects the program stage last selected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1524306/+subscriptions

___
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] [Bug 1532787] Re: Tracker Capture - Controls at bottom of first page not working

2016-01-12 Thread Markus Bekken
** Changed in: dhis2
   Status: New => Fix Committed

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1532787

Title:
  Tracker Capture - Controls at bottom of first page not working

Status in DHIS:
  Fix Committed

Bug description:
  The "No of rows per page" and "Jump to page" does not work in latest
  trunk (Version 2.22-SNAPSHOT, Build revision 21685).

  Jump to page does neither work by entering the page number, or by
  clicking on the page controls.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1532787/+subscriptions

___
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] DHIS V 2.22 : Tracker Capture Error

2016-01-16 Thread Markus Bekken
Dear Pamod,
thank you for reporting. There seems to be a sensitivity towards null values in 
the repeatable property of program stage.

Have made an update to 2.22 that makes the repeatable property false in the 
cases where it did not previously have a value. You can wait for the newest 
2.22 build(triggering now), or you can run the following sql on your local 
database;

update programstage set repeatable = false where repeatable is null;

Best regards,
Markus

> 16. jan. 2016 kl. 08.22 skrev Pamod Amarakoon :
> 
> Hi,
> 
> Upgraded an instance which was running on 2.21 to 2.22. There were no errors 
> starting up the instance. But when I tried to access tracker capture, it 
> doesn't show up list of programmes. When I checked the console it throws out 
> an error while trying to retrieve the following.
> 
> http://xxx.xxx.xxx:xxx/xxx/api/programs.json?filter=programType:eq:WITH_REGISTRATION&paging=false&fields=id,version,programTrackedEntityAttributes[trackedEntityAttribute[id,optionSet[id,version]]],programStages[id,version,programStageDataElements[dataElement[optionSet[id,version&_=1452926889280
> 
> The error goes as follows,
> 
> type Exception report
> 
> message Request processing failed; nested exception is 
> org.hibernate.PropertyAccessException: Null value was assigned to a property 
> of primitive type setter of org.hisp.dhis.program.ProgramStage.repeatable
> 
> description The server encountered an internal error that prevented it from 
> fulfilling this request.
> 
> exception
> 
> org.springframework.web.util.NestedServletException: Request processing 
> failed; nested exception is org.hibernate.PropertyAccessException: Null value 
> was assigned to a property of primitive type setter of 
> org.hisp.dhis.program.ProgramStage.repeatable
>   
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:977)
>   
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>   
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
>   
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
>   
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:88)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
>   
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>   
> org.hisp.dhis.security.filter.CustomAuthenticationFil

[Dhis2-devs] [Bug 1523838] Re: Decimal numbers lost in Event Capture

2016-01-18 Thread Markus Bekken
Fixed in trunk - R 21779

** Changed in: dhis2
   Status: Confirmed => Fix Committed

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1523838

Title:
  Decimal numbers lost in Event Capture

Status in DHIS:
  Fix Committed

Bug description:
  After storing decimal numbers in Event Capture, if you reload the
  Event Capture list of Events, the decimal value is lost.

  To recreate:
  - Create a single event program with a number data element as "display in 
list".
  - Create an event, and save a decimal value in the data element.
  - Save and go back.
  - Now you should see your event in the list, with the decimal value.
  - Reload the page. (The page refers to the page where you see a list of 
events, and where you select the program/org unit)
  - Now you will see the decimal number is lost, and only the integer is left.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1523838/+subscriptions

___
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] Reminder about a problem published in launchpad

2016-01-19 Thread Markus Bekken
Knut, perhaps it was marked as a request for more information?

> 19. jan. 2016 kl. 10.15 skrev Knut Staring :
> 
> Hi Navod,
> 
> Using this list is much better than posting on Launchpad. But I see that 
> Markus already applied to you on Launchpad, but his answer seems not to be 
> reflected in your question here on this list. 
> 
> Why is that?
> 
> Knut
> 
> On Tue, Jan 19, 2016 at 7:28 AM, navod neranjan  > wrote:
> Sir I  have posted a Issue  to Launchpad about a  data synchronization app  
> and we are still unable to found a proper solution for that.Can you just 
> please go through that Issue and provide answer for that Cause this project 
> is already delayed  ,very urgent One.
> We are again sending the attachment of the problem.
> Here is the link of the Issue
> https://answers.launchpad.net/dhis2/+question/281058 
> 
> -- 
> Navod Neranjan Thilakarathne
> Undergraduate
> University of Kelaniya.
> +94717661555 
> 
> 
> ___
> 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

___
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] [Bug 1537107] Re: 2.22 - events with audit history can not be deleted

2016-01-22 Thread Markus Bekken
Ths is solved temporarily in Tracker Capture by giving an informative
error message to the user that tries to delete an event with an audit
history. The ultimate plan is to make the event-delete just being a
soft-delete that keeps the event history, but until then we should make
an error message that explains what went wrong in the save. You can look
at the tracker implementation for the same.

** Changed in: dhis2
 Assignee: (unassigned) => Jiju K Jose (jijukjose)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1537107

Title:
  2.22 - events with audit history can not be deleted

Status in DHIS:
  New

Bug description:
  Events with an audit history cannot be deleted, trying to do so (over
  API or with EC) leads to an exception.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1537107/+subscriptions

___
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] [Bug 1514693] Re: Tracker Event Date changes to previous day on refresh

2016-01-29 Thread Markus Bekken
It seems the bug is happening when the server is run on a machine that
is not at UTC+0 time. Somehwere in the events API the date is
translatedfrom UTC to local time, and then it is  served to the client
as UTC. This is not happening when retreiving single events, only when
retreiving a list.

** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1514693

Title:
  Tracker Event Date changes to previous day on refresh

Status in DHIS:
  New
Status in Ubuntu:
  New

Bug description:
  I posted a complete description of the bug (with the subject "Issue
  with tracker - is it a feature or a bug?") on dhis2_devs with screen
  shots from Sierra Leone.  I also demonstrated this to Ola and Markus
  while in Livingstone, Zambia and they confirmed that this is a bug
  (not just incorrect configuration).

  In short: when creating an event, the initial event date is displayed
  correctly, but when refreshing the screen or going out of event
  capture and back in again the event date has changed to the previous
  event date minus 1 day.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1514693/+subscriptions

___
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] [Bug 1539772] [NEW] tracker compulsory dataelements not compulsory

2016-01-29 Thread Markus Bekken
Public bug reported:

The "compulsory" option in a tracker programstages dataelements does not
seem to have the wanted effect.  When a dataelement is added to a
program stage and marked as "compulsory" on a program stage that has the
flag for "Complete allowed only if validation passes", this combination
should require the user to fill the compulsory fields before completing
the program stage.

The problem has been observed in 2.21 and 2.22.

** Affects: dhis2
 Importance: Undecided
 Assignee: Jiju K Jose (jijukjose)
 Status: New

** Changed in: dhis2
 Assignee: (unassigned) => Jiju K Jose (jijukjose)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1539772

Title:
  tracker compulsory dataelements not compulsory

Status in DHIS:
  New

Bug description:
  The "compulsory" option in a tracker programstages dataelements does
  not seem to have the wanted effect.  When a dataelement is added to a
  program stage and marked as "compulsory" on a program stage that has
  the flag for "Complete allowed only if validation passes", this
  combination should require the user to fill the compulsory fields
  before completing the program stage.

  The problem has been observed in 2.21 and 2.22.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1539772/+subscriptions

___
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] Question on tracker dates and effecting limits on dates for which data may be captured

2016-02-05 Thread Markus Bekken
Hi Elmarie!

Interesting! 

The mentioned incident and enrollment dates is available in the program rules, 
with the syntax V{enrollment_date}, V{incident_date} and V{current_date}. See 
table 30.3 for the full list of supported "variables": 
http://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en_full.html

You want this rule to run on the TEI registration page, preventing the 
enrollment where there is a sufficiently big gap?

Best regards,
Markus

> 5. feb. 2016 kl. 12.12 skrev Elmarie Claasen :
> 
> Hi Devs,
>  
> I hope that someone will be able to assist with an issues around tracker. 
>  
> We want to limit users on the dates for which they can capture tracker/event 
> data both on the program event/incident date.
> DHIS 2 allows a setting to allow future dates but no limit on limiting past 
> dates. 
> For a few of our use cases it would be very useful to limit the data on a 
> program between 2 dates. The dates specified should have some fluidity to it 
> (can be adjusted) as time progress e.g. I would like to specify that users 
> may only enter data for the financial year between 1 April – 31 March of a 
> specific year and next year adjust those dates to the current year. No of 
> periods to allow would not really make sense because that depends on where 
> you are in the year. 
> The implication of leaving these types of dates open to select/enter anything 
> really allows users to capture data for the 1st Century or for 2 years ago 
> and you already concluded an annual report on the data captured for that 
> period which is now being altered by the user selecting an incorrect date. 
> One is not likely to run reports and unless you look for such data in the 
> backend you would never find it.
> I tried to set up a program rule to limit the date which a user can capture 
> to after a specific date but I see that it is only the data elements that is 
> exposed in the programrules. 
> Would it be possible to include the Enrollment date and Incident dates?
>  
> Regards,
>  
> Elmarie Claasen
> 
> Project Manager
> Health Information Systems Program
> Tel:  041-367 1027
> Cell: 082 374 2209
> E-mail: elma...@hisp.org 
> Skype:  elmarie.claasen52 
>  
>  
> This message and any attachments are subject to a disclaimer published at 
> http://www.hisp.org/policies.html#comms_disclaimer  
> .   Please read the 
> disclaimer before opening any attachment or taking any other action in terms 
> of this electronic transmission. 
> If you cannot access the disclaimer, kindly send an email to 
> disclai...@hisp.org  and a copy will be provided 
> to you. By replying to this e-mail or opening any attachment you agree to be 
> bound by the provisions of the disclaimer. 
> 
>  
> 
> This message and any attachments are subject to a disclaimer published at 
> http://www.hisp.org/policies.html#comms_disclaimer 
> .  Please read the 
> disclaimer before opening any attachment or taking any other action in terms 
> of this electronic transmission.  If you cannot access the disclaimer, kindly 
> send an email to disclai...@hisp.org  and a copy 
> will be provided to you. By replying to this e-mail or opening any attachment 
> you agree to be bound by the provisions of the disclaimer.
> 
> ___
> 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


Re: [Dhis2-devs] quick question re tracker capture

2016-02-09 Thread Markus Bekken
Hi Craig!
Tested now on the latest 2.22, and think I see the same: the "Date in future" 
column under "Select attributes" in "Edit program" does not seem to work. Will 
look into why, but it seems like a bug. 

Markus

> 8. feb. 2016 kl. 18.44 skrev Craig Hollingsworth :
> 
> Hi,
>  
> There is an option at program level to indicate whether future 
> enrolment/incident dates are allowed, however in my case I am creating an 
> attribute of type date and the widget does then not allow future dates.
>  
> The use case is that we are exploring use of tracker to manage some 
> contracts(donor grants) and therefore the attributes in question would be 
> grant start/end dates.
>  
> Not sure if the lack of future dates on date attributes is expected behaviour 
> or not.   Or I’m missing something  and the future date setting is elsewhere.
>  
>  
> Cheers
>  
> Craig
>  
>  
> From: Knut Staring [mailto:knu...@gmail.com ] 
> Sent: 05 February 2016 18:00
> To: Craig Hollingsworth
> Cc: DHIS 2 developers
> Subject: Re: [Dhis2-devs] quick question re tracker capture
>  
> You have to allow it I think
> 
> On Feb 5, 2016 9:32 PM, "Craig Hollingsworth"  > wrote:
> Hi,
>  
> Hope all are well and ready for the weekend!
>  
> I’ve created an attribute of type date for use in tracker (v2.22).  This 
> appears to be unable to accept future dates.  Is this expected behaviour?
>  
>  
> Cheers
>  
> Craig, NRC
>  
> 
> ___
> 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

___
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] Changing Org Unit of TEI

2016-02-09 Thread Markus Bekken
Hi Pamod!
It is not currently enabled in trunk, but we have made a implementation for 
something that might be similar in Palestine. We have made a "Referral" user 
interface that allows scheduling a visit at another orgunit than the TEI is 
registered at(and another than the logged in user has selected). In this dialog 
there is an option to permanently move the TEI(update the TEI orgunit to 
whatever the TEI is scheduled for). Would this referral dialog solve your use 
case, or is there something different in your case?

Screenshot:


Markus

P.S. The concept of "referral" is a bit patient-file specific - if anyone can 
suggest a more generic term it would be most welcome.


> 9. feb. 2016 kl. 18.54 skrev Pamod Amarakoon :
> 
> Dear All,
> 
> Is it possible to move a TEI to a different org unit. This is applicable when 
> a TEI moves to a different area physically and needs to be enrolled and 
> followed up in the same program while preserving the existing event data.
> 
> Thank you.
> 
> -- 
> Regards,
> Pamod Amarakoon
> 
> 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.
> 
> 
> 
> ___
> 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


Re: [Dhis2-devs] [Dhis2-users] Issue with the new data entry form in tracker capture

2016-02-16 Thread markus . bekken
Hi Ese, thanks for reporting.
This is a bug. It was fixed in trunk earlier, and will be backported.

Markus

> Den 17. feb. 2016 kl. 07.39 skrev Ese Egerega :
> 
> Hello Devs,
> 
> Many thanks for the new improvements in the tracker but there is something 
> you may want to look into. 
> 
> With the new design of the data entry form, the name of the program stage is 
> listed after "date" and "Org unit". This may cause problems during data entry 
> because the person entering data may not see the name of the program stage in 
> cases where you have a long org unit name (see snapshot below). 
> 
> The snapshot below is supposed to display "Birth" and "Baby Postnatal" but as 
> you can see, the program stage does not show up because of the length of the 
> org unit name.
> 
> In my opinion, the old design is better for the following reasons:
> The name of the program stage is displayed clearly
> Program stages are in different "boxes" so you can navigate events in a 
> program stage separate from other stages 
> Thanks,
> Ese 
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> 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] [Bug 1552106] [NEW] (Tracker Capture) Unchecked yes only fields

2016-03-01 Thread Markus Bekken
Public bug reported:

When a yes-only field is never checked, the program rules correctly sees
them as not having a value, and being false for evaluation purposes.
When they are checked, then unchecked again, they are correctly
evaluated to false - but they are incorrectly seen as having a value by
d2:hasValue

** Affects: dhis2
 Importance: Undecided
 Assignee: Markus Bekken (markus-bekken)
 Status: In Progress

** Changed in: dhis2
   Status: New => In Progress

** Changed in: dhis2
 Assignee: (unassigned) => Markus Bekken (markus-bekken)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1552106

Title:
  (Tracker Capture) Unchecked yes only fields

Status in DHIS:
  In Progress

Bug description:
  When a yes-only field is never checked, the program rules correctly
  sees them as not having a value, and being false for evaluation
  purposes. When they are checked, then unchecked again, they are
  correctly evaluated to false - but they are incorrectly seen as having
  a value by d2:hasValue

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1552106/+subscriptions

___
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] Clear Audit Log

2016-03-09 Thread Markus Bekken
Hi Pamod,
when the event has an audit log there is currently no means of deleting it 
through the api(and therefore not from the apps). It can be done by first 
deleting entries in the database table trackedentitydatavalueaudit.

Full support is coming, hopefully in 2.23. 

Markus

> 7. mar. 2016 kl. 18.41 skrev Pamod Amarakoon :
> 
> Dear All,
> 
> How do I clear audit log in 2.22. I want to delete a particular event from 
> tracker capture, it prevents me from deleting giving an error "The event 
> could not be deleted because it contains an auditlog.".
> 
> Thank you
> 
> -- 
> Regards,
> Pamod Amarakoon
> 
> 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.
> 
> 
> 
> ___
> 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


  1   2   3   >