Re: [Dhis2-devs] Error in event capture

2015-01-29 Thread Abyot Gizaw
A bit strange to get that... are you also seeing the same in demo?

-
Thank you,
Abyot.

(sent from mobile)
On Jan 29, 2015 8:24 AM, "Jason Pickering" 
wrote:

> Hi Devs,
> On 2.18, getting this error with event capture.
>
>  Uncaught Error: [$injector:unpr]
>
> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
>
> After that, just a blank screen.
>
> Regards,
> Jason
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
> ___
> 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 event capture

2015-01-29 Thread Abyot Gizaw
Most probably you have run 2.17 first and then 2.18. Could it be a cache
issue?

-
Thank you,
Abyot.

(sent from mobile)
On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:

> A bit strange to get that... are you also seeing the same in demo?
>
> -
> Thank you,
> Abyot.
>
> (sent from mobile)
> On Jan 29, 2015 8:24 AM, "Jason Pickering" 
> wrote:
>
>> Hi Devs,
>> On 2.18, getting this error with event capture.
>>
>>  Uncaught Error: [$injector:unpr]
>>
>> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
>>
>> After that, just a blank screen.
>>
>> Regards,
>> Jason
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049
>>
>> ___
>> 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 event capture

2015-01-29 Thread Mark Polak
Not sure if the cleaning app also cleans app cache, but you could navigate to 
chrome://appcache-internals to clear the appcache for the event capture app 
only and then retry.

That error means that a dependency can’t be found. But as far as i’m aware that 
dependency is not there anymore, so Abyot is probably right that you might have 
cache of an older version. 

Kind regards,

Mark Polak
m...@thedutchies.com
mar...@ifi.uio.no
+47 970 36 752

On 29 Jan 2015, at 10:00, Abyot Gizaw  wrote:

> Most probably you have run 2.17 first and then 2.18. Could it be a cache 
> issue?
> 
> -
> Thank you,
> Abyot.
> 
> (sent from mobile)
> 
> On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:
> A bit strange to get that... are you also seeing the same in demo?
> 
> -
> Thank you,
> Abyot.
> 
> (sent from mobile)
> 
> On Jan 29, 2015 8:24 AM, "Jason Pickering"  
> wrote:
> Hi Devs,
> On 2.18, getting this error with event capture.
> 
>  Uncaught Error: [$injector:unpr]
> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
> 
> After that, just a blank screen.
> 
> Regards,
> Jason
> 
> 
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
> 
> ___
> 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 1415798] [NEW] aggregation does not escape ' from data element name

2015-01-29 Thread Olav P
Public bug reported:

When adding data entry, ' is allowed in the name (example "Alzheimer's
disease"). However, the tracker => aggregate aggregation queries fails
if one of the target/aggregate data elements have ' in the name:

SELECT '2188' as dataelementid, '1873' as categoryoptioncomboid, '16' as
attributeoptioncomboid, ou.organisationunitid as sourceid, '1453' as
periodid,'aggregated_from_tracker' as storedby, '20150101' as
periodIsoDate,[THIS WILL BREAK=>]'Alzheimer's disease, dementias' as
dataelementname, '(Male, ≥ 95 years)' as categoryoptioncomboname,
ou.name as organisationunitname,  count(psi.programinstanceid) as value
FROM  programinstance as pi ... etc

** 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/1415798

Title:
  aggregation does not escape ' from data element name

Status in DHIS 2:
  New

Bug description:
  When adding data entry, ' is allowed in the name (example "Alzheimer's
  disease"). However, the tracker => aggregate aggregation queries fails
  if one of the target/aggregate data elements have ' in the name:

  SELECT '2188' as dataelementid, '1873' as categoryoptioncomboid, '16'
  as attributeoptioncomboid, ou.organisationunitid as sourceid, '1453'
  as periodid,'aggregated_from_tracker' as storedby, '20150101' as
  periodIsoDate,[THIS WILL BREAK=>]'Alzheimer's disease, dementias' as
  dataelementname, '(Male, ≥ 95 years)' as categoryoptioncomboname,
  ou.name as organisationunitname,  count(psi.programinstanceid) as
  value FROM  programinstance as pi ... etc

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1415798/+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] Error in event capture

2015-01-29 Thread Abyot Gizaw
The cache cleaner app can not clear app cache. It only clears data stored
by DHIS2 in IndexedDB and Localstorage.

App cache is cleaned/updated automatically for each build revision.


---
Thank you,
Abyot.

On Thu, Jan 29, 2015 at 10:07 AM, Mark Polak  wrote:

> Not sure if the cleaning app also cleans app cache, but you could navigate
> to chrome://appcache-internals to clear the appcache for the event
> capture app only and then retry.
>
> That error means that a dependency can’t be found. But as far as i’m aware
> that dependency is not there anymore, so Abyot is probably right that you
> might have cache of an older version.
>
> Kind regards,
>
> Mark Polak
> m...@thedutchies.com
> mar...@ifi.uio.no
> +47 970 36 752
>
> On 29 Jan 2015, at 10:00, Abyot Gizaw  wrote:
>
> Most probably you have run 2.17 first and then 2.18. Could it be a cache
> issue?
>
> -
> Thank you,
> Abyot.
>
> (sent from mobile)
> On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:
>
>> A bit strange to get that... are you also seeing the same in demo?
>>
>> -
>> Thank you,
>> Abyot.
>>
>> (sent from mobile)
>> On Jan 29, 2015 8:24 AM, "Jason Pickering" 
>> wrote:
>>
>>> Hi Devs,
>>> On 2.18, getting this error with event capture.
>>>
>>>  Uncaught Error: [$injector:unpr]
>>>
>>> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
>>>
>>> After that, just a blank screen.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049
>>>
>>> ___
>>> 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] DataElements with long option sets are not saving its values (event capture)

2015-01-29 Thread Abyot Gizaw
Hi Jose,

Investigating here... will get back to you soon.


---
Thank you,
Abyot.

On Thu, Jan 29, 2015 at 7:30 AM, Jose Garcia Muñoz 
wrote:

>
> Hi devs,
>
> I know that the number of options displayed in one option set is limited
> to an specic number (25, 30?) when the user clicks on the Data Element.
> However the user can introduce some text and the combo will filter and
> search all correspondences with the text.
>
> The problem is that the value is not saved in the DataElement. For example
> in the following picture I am filtering by 'Caro', but when I select that
> option, its value is not saved (the DataElement appears witn no value).
>
> Any ideas?. I am using the 2.17 (last revision)
>
> Thanks
> Jose
>
> [image: Inline image 1]
>
> ___
> 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 1415798] Re: aggregation does not escape ' from data element name

2015-01-29 Thread Olav P
When adding data entry, was supposed to read "When adding a data
element"

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

Title:
  aggregation does not escape ' from data element name

Status in DHIS 2:
  New

Bug description:
  When adding data entry, ' is allowed in the name (example "Alzheimer's
  disease"). However, the tracker => aggregate aggregation queries fails
  if one of the target/aggregate data elements have ' in the name:

  SELECT '2188' as dataelementid, '1873' as categoryoptioncomboid, '16'
  as attributeoptioncomboid, ou.organisationunitid as sourceid, '1453'
  as periodid,'aggregated_from_tracker' as storedby, '20150101' as
  periodIsoDate,[THIS WILL BREAK=>]'Alzheimer's disease, dementias' as
  dataelementname, '(Male, ≥ 95 years)' as categoryoptioncomboname,
  ou.name as organisationunitname,  count(psi.programinstanceid) as
  value FROM  programinstance as pi ... etc

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1415798/+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] Build own DHIS2 server

2015-01-29 Thread rin.channara
Hi timothy,

Great, thank you for sharing, by the way, if I use Windows, do you know can we 
setup mail server for using with DHIS2. like notification, if the user filled 
dataset already, the DHIS2 will alert email to own email. and another problem 
is can we change the time for running datamart. coz the default, it run every 
mid-night.


Thank you





From: Timothy Harding
Sent: ‎Thursday‎, ‎January‎ ‎29‎, ‎2015 ‎9‎:‎26‎ ‎Morning
To: channara rin
Cc: DHIS 2 Developers list, DHIS 2 Users list





Channara,



As far as system specs, OS, and installation instructions, this is probably a 
good place to start:

https://www.dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e413


-and-

https://www.dhis2.org/doc/snapshot/en/implementer/html/ch08s02.html





I run a small dev server with less than 1.5GB of RAM and 2 processors shared 
with a host, but for anything production I would follow the recommendations. As 
for OS, I've used both Windows 7 and Ubuntu 14.04. The Ubuntu installation 
seemed to run a lot quicker given the same resources. I'm not sure on internet 
bandwidth requirements, so someone else on the dev list will need to chime in. 
Good luck!





Timothy Harding
PeaceCorps Volunteer

Republic of Vanuatu

hardi...@gmail.com

+678 5955137


On Thu, Jan 29, 2015 at 1:15 PM, channara rin  wrote:


Hi all DHIS2 developers,
How can i build own DHIS2 server, and what is system requirement of DHIS2 
server like OS, Internet speed, RAM, HDD, and 3rd party software?




Thank you

CHANNARA

___
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] Build own DHIS2 server

2015-01-29 Thread Alex Tumwesigye
Dear Channara,

Datamart schedule time can not be changed.It is hard coded. Also the
datamart had a bug which was causing it to run forever (I have no idea if
it was fixed). Consider using the analytics module and disable the
datamart, it is better than the datamart.

For email setup, you can setup a gmail account and use it, then set the
smtp server to the gmail one in the email settings. Gmail may be more
reliable than you email setup.

For windows [server edition] visit:
https://technet.microsoft.com/en-us/library/cc772058(v=ws.10).aspx


Alex




On Thu, Jan 29, 2015 at 12:47 PM,  wrote:

>  Hi timothy,
> Great, thank you for sharing, by the way, if I use Windows, do you know
> can we setup mail server for using with DHIS2. like notification, if the
> user filled dataset already, the DHIS2 will alert email to own email. and
> another problem is can we change the time for running datamart. coz the
> default, it run every mid-night.
>
> Thank you
>
> *From:* Timothy Harding 
> *Sent:* ‎Thursday‎, ‎January‎ ‎29‎, ‎2015 ‎9‎:‎26‎ ‎Morning
> *To:* channara rin 
> *Cc:* DHIS 2 Developers list , DHIS 2
> Users list 
>
> Channara,
>
> As far as system specs, OS, and installation instructions, this is
> probably a good place to start:
> https://www.dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e413
> -and-
> https://www.dhis2.org/doc/snapshot/en/implementer/html/ch08s02.html
>
> I run a small dev server with less than 1.5GB of RAM and 2 processors
> shared with a host, but for anything production I would follow the
> recommendations. As for OS, I've used both Windows 7 and Ubuntu 14.04. The
> Ubuntu installation seemed to run a lot quicker given the same resources.
> I'm not sure on internet bandwidth requirements, so someone else on the dev
> list will need to chime in. Good luck!
>
> Timothy Harding
> PeaceCorps Volunteer
> Republic of Vanuatu
> hardi...@gmail.com
> +678 5955137
>
> On Thu, Jan 29, 2015 at 1:15 PM, channara rin 
> wrote:
>
>> Hi all DHIS2 developers,
>> How can i build own DHIS2 server, and what is system requirement of DHIS2
>> server like OS, Internet speed, RAM, HDD, and 3rd party software?
>>
>> Thank you
>> CHANNARA
>>
>> ___
>> 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-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Alex Tumwesigye

Technical Advisor - DHIS2,
Ministry of Health/AFENET
Kampala
Uganda

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems -
DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161

"I don't want to be anything other than what I have been - one tree hill "
___
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] Reporting based on tracker data

2015-01-29 Thread Olav Poppe
Hi devs, 
I’m having some problems with making reports/dashboards/output based on tracker 
data.

We have made a «Cause of death» program, quite similar to the inpatient program 
on the demo instance and what is currently being used several places. Each case 
will have as a minimum age, sex and a cause of death (based on an ICD-10 based 
short list of about 120 diagnosis). 

Based on this data, we want to make reports that include as a minimum:
- number of cases by gender => can be done in ER/EV
- number of cases by diagnosis  => can be done in ER/EV
- number of cases by age group  => can NOT be done in ER/EV (unless 
I’ve missed something)
- number of cases by diagnosis group=> can NOT be done in ER/EV (unless 
I’ve missed something)
- combinations of the above, e.g. case by diagnosis and age group/sex => can 
NOT be done in ER/EV (unless I’ve missed something)

Since this output can quite easily be created based on aggregate data (it is 
similar to the OPD datasets), I decided to set up aggregation queries to make 
the reports we need. I therefore made a categorycombo with gender and age 
group, and one data element for each diagnosis. I then grouped the diagnosis 
into data element groups to be able make reports based on disease group. I 
tested this with a couple of queries, and it worked fine.

The problem with this approach is that 118 diagnosis * 2 sexes * 22 age group = 
4 956 aggregation queries, and this causes the aggregation to take a very long 
time. When I try to run manual aggregation for just one week with 4-500 cases, 
it takes about 10 minutes (4/8 core CPU, SSD, 3/6 GB memory for 
tomcat/postgres). Running the aggregation for the last 6 months would take a 
several hours. This might work for a cause of death program where the number of 
cases is relatively low, but to do similar analysis on an admission program 
(where I know some countries have 19000+ cases some weeks) is just not possible.

So I guess my question is whether there are any ideas on how this can be made 
to work. One obvious thing I see is that the aggregation only uses one CPU (as 
opposed to the analytics), could that be made more efficient? Or what would be 
even better was if ER/EV could support this type of analysis - the general 
requirement would be some sort of grouping functionality? That is something I 
think would be useful in many/most programs (e.g. grouping mothers by age group 
in ANC program)

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] Error in event capture

2015-01-29 Thread Jason Pickering
Yeah,I am sure this is what happened nd I did not clean the cache
enougb,but what is the fundamental issue with our caching ? If one looks
through the email list,so many issues are related to this. Can nothing be
done to improve upon the continual cleaning of the cache?
On Jan 29, 2015 12:07 PM, "Mark Polak"  wrote:

> Not sure if the cleaning app also cleans app cache, but you could navigate
> to chrome://appcache-internals to clear the appcache for the event
> capture app only and then retry.
>
> That error means that a dependency can’t be found. But as far as i’m aware
> that dependency is not there anymore, so Abyot is probably right that you
> might have cache of an older version.
>
> Kind regards,
>
> Mark Polak
> m...@thedutchies.com
> mar...@ifi.uio.no
> +47 970 36 752
>
> On 29 Jan 2015, at 10:00, Abyot Gizaw  wrote:
>
> Most probably you have run 2.17 first and then 2.18. Could it be a cache
> issue?
>
> -
> Thank you,
> Abyot.
>
> (sent from mobile)
> On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:
>
>> A bit strange to get that... are you also seeing the same in demo?
>>
>> -
>> Thank you,
>> Abyot.
>>
>> (sent from mobile)
>> On Jan 29, 2015 8:24 AM, "Jason Pickering" 
>> wrote:
>>
>>> Hi Devs,
>>> On 2.18, getting this error with event capture.
>>>
>>>  Uncaught Error: [$injector:unpr]
>>>
>>> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
>>>
>>> After that, just a blank screen.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049
>>>
>>> ___
>>> 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 event capture

2015-01-29 Thread Knut Staring
We HAVE done a lot - there is a new cache cleaning app in 2.18

On Thu, Jan 29, 2015 at 12:28 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Yeah,I am sure this is what happened nd I did not clean the cache
> enougb,but what is the fundamental issue with our caching ? If one looks
> through the email list,so many issues are related to this. Can nothing be
> done to improve upon the continual cleaning of the cache?
> On Jan 29, 2015 12:07 PM, "Mark Polak"  wrote:
>
>> Not sure if the cleaning app also cleans app cache, but you could
>> navigate to chrome://appcache-internals to clear the appcache for the
>> event capture app only and then retry.
>>
>> That error means that a dependency can’t be found. But as far as i’m
>> aware that dependency is not there anymore, so Abyot is probably right that
>> you might have cache of an older version.
>>
>> Kind regards,
>>
>> Mark Polak
>> m...@thedutchies.com
>> mar...@ifi.uio.no
>> +47 970 36 752
>>
>> On 29 Jan 2015, at 10:00, Abyot Gizaw  wrote:
>>
>> Most probably you have run 2.17 first and then 2.18. Could it be a cache
>> issue?
>>
>> -
>> Thank you,
>> Abyot.
>>
>> (sent from mobile)
>> On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:
>>
>>> A bit strange to get that... are you also seeing the same in demo?
>>>
>>> -
>>> Thank you,
>>> Abyot.
>>>
>>> (sent from mobile)
>>> On Jan 29, 2015 8:24 AM, "Jason Pickering" 
>>> wrote:
>>>
 Hi Devs,
 On 2.18, getting this error with event capture.

  Uncaught Error: [$injector:unpr]

 http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader

 After that, just a blank screen.

 Regards,
 Jason


 --
 Jason P. Pickering
 email: jason.p.picker...@gmail.com
 tel:+46764147049

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


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


Re: [Dhis2-devs] Reporting based on tracker data

2015-01-29 Thread Jason Pickering
Hi Olav,
I came across a similar case,but even worse with many more disaggregates
and and data elements . Short story is that's it was simply not feasible
with the aggregation query builder,but rather trivial with a script to pull
required data out of the database,aggregate it and then reimport it through
the API. Not surprisingly, I chose to use R,but am sure it could be done
with other languages. A map between the event data elements and aggregate
data elements was used to transform and aggregate from one domain to the
other. Robin brought up a similar request a while ago about this ,so looks
like something we should really have in the core as opposed to relying on
scripts.

Regards,
Jason
On Jan 29, 2015 1:36 PM, "Olav Poppe"  wrote:

> Hi devs,
> I’m having some problems with making reports/dashboards/output based on
> tracker data.
>
> We have made a «Cause of death» program, quite similar to the inpatient
> program on the demo instance and what is currently being used several
> places. Each case will have as a minimum age, sex and a cause of death
> (based on an ICD-10 based short list of about 120 diagnosis).
>
> Based on this data, we want to make reports that include as a minimum:
> - number of cases by gender => can be done in ER/EV
> - number of cases by diagnosis => can be done in ER/EV
> - number of cases by age *group*  => can NOT be done in ER/EV (unless
> I’ve missed something)
> - number of cases by diagnosis *group*  => can NOT be done in ER/EV
> (unless I’ve missed something)
> - combinations of the above, e.g. case by diagnosis and age group/sex =>
> can NOT be done in ER/EV (unless I’ve missed something)
>
> Since this output can quite easily be created based on aggregate data (it
> is similar to the OPD datasets), I decided to set up aggregation queries to
> make the reports we need. I therefore made a categorycombo with gender and
> age group, and one data element for each diagnosis. I then grouped the
> diagnosis into data element groups to be able make reports based on disease
> group. I tested this with a couple of queries, and it worked fine.
>
> The problem with this approach is that 118 diagnosis * 2 sexes * 22 age
> group = 4 956 aggregation queries, and this causes the aggregation to take
> a very long time. When I try to run manual aggregation for just one week
> with 4-500 cases, it takes about 10 minutes (4/8 core CPU, SSD, 3/6 GB
> memory for tomcat/postgres). Running the aggregation for the last 6 months
> would take a several hours. This *might* work for a cause of death
> program where the number of cases is relatively low, but to do similar
> analysis on an admission program (where I know some countries have 19000+
> cases some weeks) is just not possible.
>
> So I guess my question is whether there are any ideas on how this can be
> made to work. One obvious thing I see is that the aggregation only uses one
> CPU (as opposed to the analytics), could that be made more efficient? Or
> what would be even better was if ER/EV could support this type of analysis
> - the general requirement would be some sort of grouping functionality?
> That is something I think would be useful in many/most programs (e.g.
> grouping mothers by age group in ANC program)
>
> 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] Error in event capture

2015-01-29 Thread Abyot Gizaw
we are trying our best I think. it is also important to keep in mind the
issue here, we are fighting for a solution that works across all browsers -
which is almost an impossible task.


---
Thank you,
Abyot.

On Thu, Jan 29, 2015 at 12:33 PM, Knut Staring  wrote:

> We HAVE done a lot - there is a new cache cleaning app in 2.18
>
> On Thu, Jan 29, 2015 at 12:28 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Yeah,I am sure this is what happened nd I did not clean the cache
>> enougb,but what is the fundamental issue with our caching ? If one looks
>> through the email list,so many issues are related to this. Can nothing be
>> done to improve upon the continual cleaning of the cache?
>> On Jan 29, 2015 12:07 PM, "Mark Polak"  wrote:
>>
>>> Not sure if the cleaning app also cleans app cache, but you could
>>> navigate to chrome://appcache-internals to clear the appcache for the
>>> event capture app only and then retry.
>>>
>>> That error means that a dependency can’t be found. But as far as i’m
>>> aware that dependency is not there anymore, so Abyot is probably right that
>>> you might have cache of an older version.
>>>
>>> Kind regards,
>>>
>>> Mark Polak
>>> m...@thedutchies.com
>>> mar...@ifi.uio.no
>>> +47 970 36 752
>>>
>>> On 29 Jan 2015, at 10:00, Abyot Gizaw  wrote:
>>>
>>> Most probably you have run 2.17 first and then 2.18. Could it be a cache
>>> issue?
>>>
>>> -
>>> Thank you,
>>> Abyot.
>>>
>>> (sent from mobile)
>>> On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:
>>>
 A bit strange to get that... are you also seeing the same in demo?

 -
 Thank you,
 Abyot.

 (sent from mobile)
 On Jan 29, 2015 8:24 AM, "Jason Pickering" 
 wrote:

> Hi Devs,
> On 2.18, getting this error with event capture.
>
>  Uncaught Error: [$injector:unpr]
>
> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
>
> After that, just a blank screen.
>
> Regards,
> Jason
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
> ___
> 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
>>
>>
>
>
> --
> 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


Re: [Dhis2-devs] Error in event capture

2015-01-29 Thread Jason Pickering
Yes, I realize the new cleaner app will help, and there has been good
feedback from the community on this. I guess however, this is still a
manual process,and can be frustrating to end users who do not really
know to open up the JS debug console and look for java script errors.
Would be much better if DHIS 2 could tell when the cache is invalid
and recover from these sorts of errors automatically.

Regards,
Jason


On Thu, Jan 29, 2015 at 1:31 PM, Abyot Gizaw  wrote:
> we are trying our best I think. it is also important to keep in mind the
> issue here, we are fighting for a solution that works across all browsers -
> which is almost an impossible task.
>
>
> ---
> Thank you,
> Abyot.
>
> On Thu, Jan 29, 2015 at 12:33 PM, Knut Staring  wrote:
>>
>> We HAVE done a lot - there is a new cache cleaning app in 2.18
>>
>> On Thu, Jan 29, 2015 at 12:28 PM, Jason Pickering
>>  wrote:
>>>
>>> Yeah,I am sure this is what happened nd I did not clean the cache
>>> enougb,but what is the fundamental issue with our caching ? If one looks
>>> through the email list,so many issues are related to this. Can nothing be
>>> done to improve upon the continual cleaning of the cache?
>>>
>>> On Jan 29, 2015 12:07 PM, "Mark Polak"  wrote:

 Not sure if the cleaning app also cleans app cache, but you could
 navigate to chrome://appcache-internals to clear the appcache for the event
 capture app only and then retry.

 That error means that a dependency can’t be found. But as far as i’m
 aware that dependency is not there anymore, so Abyot is probably right that
 you might have cache of an older version.

 Kind regards,

 Mark Polak
 m...@thedutchies.com
 mar...@ifi.uio.no
 +47 970 36 752

 On 29 Jan 2015, at 10:00, Abyot Gizaw  wrote:

 Most probably you have run 2.17 first and then 2.18. Could it be a cache
 issue?

 -
 Thank you,
 Abyot.

 (sent from mobile)

 On Jan 29, 2015 9:49 AM, "Abyot Gizaw"  wrote:
>
> A bit strange to get that... are you also seeing the same in demo?
>
> -
> Thank you,
> Abyot.
>
> (sent from mobile)
>
> On Jan 29, 2015 8:24 AM, "Jason Pickering"
>  wrote:
>>
>> Hi Devs,
>> On 2.18, getting this error with event capture.
>>
>>  Uncaught Error: [$injector:unpr]
>>
>> http://errors.angularjs.org/1.2.26/$injector/unpr?p0=%24translateStaticFilesLoaderProvider%20%3C-%20%24translateStaticFilesLoader
>>
>> After that, just a blank screen.
>>
>> Regards,
>> Jason
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049
>>
>> ___
>> 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
>>>
>>
>>
>>
>> --
>> 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
>>
>



-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049

___
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] Issue on Data approval

2015-01-29 Thread nsanzumuhire venuste
Dear all,
I'm having issue where i had approved data set on previews periods,and now when 
users go to data entry,all data sets are unloked where now users can modify the 
data what ever they want.
When i'm checking in report>data approval,i can see all data sets are 
approved,I even went through the data set and approval data is Yes,But when 
users try to access the data entry they find the data set are not locked.
I'm using version 2.17 but on version 2.16 approval was ok.
Can some one help on this issue?
Thanks___
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] Issue on Data approval

2015-01-29 Thread nsanzumuhire venuste
Dear all,
I'm having issue where i had approved data set on previews periods,and now when 
users go to data entry,all data sets are unloked where now users can modify the 
data what ever they want.
When i'm checking in report>data approval,i can see all data sets are 
approved,I even went through the data set and approval data is Yes,But when 
users try to access the data entry they find the data set are not locked.
I'm using version 2.17 but on version 2.16 approval was ok.
Can some one help on this issue?
Thanks___
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] Reporting based on tracker data

2015-01-29 Thread Olav Poppe
Hi, 
I am really hoping to avoid custom scripts for this. What we’re trying to do is 
to set up a reusable meta data «packages» (input and output) for recording this 
data, and having to make «hacks» outside of DHIS (that then needs to be 
maintained) to make it work does not look great.. Especially because all the 
functionality is almost there: 1) the aggregation queries works, but isn’t 
optimized, whilst 2) ER and EV still miss a few things for aggregated analysis 
(which is available in PT and DV).

I’ve been experimenting a bit more with the aggregation queries, including 
deleting 90% of the cases (but keeping all the ≈ 5000 queries). That didn’t 
really speed up things, but looking at the CPU use, the java process was now 
using 100+% CPU whilst postgresql stayed around 40-50% - so most of the time 
seems to be spent preparing the queries rather than executing them. Also did a 
few stack traces (jstack), and about half of the time, it was doing something 
in HibernatePeriodStore.java:
at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)
at 
org.hisp.dhis.period.hibernate.HibernatePeriodStore.getPeriod(HibernatePeriodStore.java:73)
at 
org.hisp.dhis.period.hibernate.HibernatePeriodStore.reloadPeriod(HibernatePeriodStore.java:163)
at 
org.hisp.dhis.period.hibernate.HibernatePeriodStore.reloadForceAddPeriod(HibernatePeriodStore.java:171)
at 
org.hisp.dhis.period.DefaultPeriodService.reloadPeriod(DefaultPeriodService.java:278)
 

So perhaps (I’m only guessing here of course) some small optimizations is all 
it takes to make the aggregation feasible.

Olav



> 29. jan. 2015 kl. 13.16 skrev Jason Pickering :
> 
> Hi Olav,
> I came across a similar case,but even worse with many more disaggregates and 
> and data elements . Short story is that's it was simply not feasible with the 
> aggregation query builder,but rather trivial with a script to pull required 
> data out of the database,aggregate it and then reimport it through the API. 
> Not surprisingly, I chose to use R,but am sure it could be done with other 
> languages. A map between the event data elements and aggregate data elements 
> was used to transform and aggregate from one domain to the other. Robin 
> brought up a similar request a while ago about this ,so looks like something 
> we should really have in the core as opposed to relying on scripts.
> 
> Regards,
> Jason
> 
> On Jan 29, 2015 1:36 PM, "Olav Poppe"  > wrote:
> Hi devs, 
> I’m having some problems with making reports/dashboards/output based on 
> tracker data.
> 
> We have made a «Cause of death» program, quite similar to the inpatient 
> program on the demo instance and what is currently being used several places. 
> Each case will have as a minimum age, sex and a cause of death (based on an 
> ICD-10 based short list of about 120 diagnosis). 
> 
> Based on this data, we want to make reports that include as a minimum:
> - number of cases by gender   => can be done in ER/EV
> - number of cases by diagnosis=> can be done in ER/EV
> - number of cases by age group=> can NOT be done in ER/EV 
> (unless I’ve missed something)
> - number of cases by diagnosis group  => can NOT be done in ER/EV (unless 
> I’ve missed something)
> - combinations of the above, e.g. case by diagnosis and age group/sex => can 
> NOT be done in ER/EV (unless I’ve missed something)
> 
> Since this output can quite easily be created based on aggregate data (it is 
> similar to the OPD datasets), I decided to set up aggregation queries to make 
> the reports we need. I therefore made a categorycombo with gender and age 
> group, and one data element for each diagnosis. I then grouped the diagnosis 
> into data element groups to be able make reports based on disease group. I 
> tested this with a couple of queries, and it worked fine.
> 
> The problem with this approach is that 118 diagnosis * 2 sexes * 22 age group 
> = 4 956 aggregation queries, and this causes the aggregation to take a very 
> long time. When I try to run manual aggregation for just one week with 4-500 
> cases, it takes about 10 minutes (4/8 core CPU, SSD, 3/6 GB memory for 
> tomcat/postgres). Running the aggregation for the last 6 months would take a 
> several hours. This might work for a cause of death program where the number 
> of cases is relatively low, but to do similar analysis on an admission 
> program (where I know some countries have 19000+ cases some weeks) is just 
> not possible.
> 
> So I guess my question is whether there are any ideas on how this can be made 
> to work. One obvious thing I see is that the aggregation only uses one CPU 
> (as opposed to the analytics), could that be made more efficient? Or what 
> would be even better was if ER/EV could support this type of analysis - the 
> general requirement would be some sort of grouping functionality? That is 
> something I think would be us

Re: [Dhis2-devs] Reporting based on tracker data

2015-01-29 Thread Abyot Gizaw
Hi Tran,

Is there anything you could do on this?

Briefly looking at DefaultCaseAggregationConditionService, for example you
have nested loops and inside these loops you are calling periodService to
fetch period from db. I don't see the call to periodService depending on
data generated in the loops - is it not possible to prefetch the periods
and use them inside the loops?

---
Thank you,
Abyot.

On Thu, Jan 29, 2015 at 2:58 PM, Olav Poppe  wrote:

> Hi,
> I am really hoping to avoid custom scripts for this. What we’re trying to
> do is to set up a reusable meta data «packages» (input and output) for
> recording this data, and having to make «hacks» outside of DHIS (that then
> needs to be maintained) to make it work does not look great.. Especially
> because all the functionality is *almost* there: 1) the aggregation
> queries works, but isn’t optimized, whilst 2) ER and EV still miss a few
> things for aggregated analysis (which is available in PT and DV).
>
> I’ve been experimenting a bit more with the aggregation queries, including
> deleting 90% of the cases (but keeping all the ≈ 5000 queries). That didn’t
> really speed up things, but looking at the CPU use, the java process was
> now using 100+% CPU whilst postgresql stayed around 40-50% - so most of the
> time seems to be spent preparing the queries rather than executing them.
> Also did a few stack traces (jstack), and about half of the time, it was
> doing something in HibernatePeriodStore.java:
> at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)
> at
> org.hisp.dhis.period.hibernate.HibernatePeriodStore.getPeriod(HibernatePeriodStore.java:73)
> at
> org.hisp.dhis.period.hibernate.HibernatePeriodStore.reloadPeriod(HibernatePeriodStore.java:163)
> at
> org.hisp.dhis.period.hibernate.HibernatePeriodStore.reloadForceAddPeriod(HibernatePeriodStore.java:171)
> at
> org.hisp.dhis.period.DefaultPeriodService.reloadPeriod(DefaultPeriodService.java:278)
>
> So perhaps (I’m only guessing here of course) some small optimizations is
> all it takes to make the aggregation feasible.
>
> Olav
>
>
>
> 29. jan. 2015 kl. 13.16 skrev Jason Pickering  >:
>
> Hi Olav,
> I came across a similar case,but even worse with many more disaggregates
> and and data elements . Short story is that's it was simply not feasible
> with the aggregation query builder,but rather trivial with a script to pull
> required data out of the database,aggregate it and then reimport it through
> the API. Not surprisingly, I chose to use R,but am sure it could be done
> with other languages. A map between the event data elements and aggregate
> data elements was used to transform and aggregate from one domain to the
> other. Robin brought up a similar request a while ago about this ,so looks
> like something we should really have in the core as opposed to relying on
> scripts.
>
> Regards,
> Jason
> On Jan 29, 2015 1:36 PM, "Olav Poppe"  wrote:
>
>> Hi devs,
>> I’m having some problems with making reports/dashboards/output based on
>> tracker data.
>>
>> We have made a «Cause of death» program, quite similar to the inpatient
>> program on the demo instance and what is currently being used several
>> places. Each case will have as a minimum age, sex and a cause of death
>> (based on an ICD-10 based short list of about 120 diagnosis).
>>
>> Based on this data, we want to make reports that include as a minimum:
>> - number of cases by gender => can be done in ER/EV
>> - number of cases by diagnosis => can be done in ER/EV
>> - number of cases by age *group*  => can NOT be done in ER/EV (unless
>> I’ve missed something)
>> - number of cases by diagnosis *group*  => can NOT be done in ER/EV
>> (unless I’ve missed something)
>> - combinations of the above, e.g. case by diagnosis and age group/sex =>
>> can NOT be done in ER/EV (unless I’ve missed something)
>>
>> Since this output can quite easily be created based on aggregate data (it
>> is similar to the OPD datasets), I decided to set up aggregation queries to
>> make the reports we need. I therefore made a categorycombo with gender and
>> age group, and one data element for each diagnosis. I then grouped the
>> diagnosis into data element groups to be able make reports based on disease
>> group. I tested this with a couple of queries, and it worked fine.
>>
>> The problem with this approach is that 118 diagnosis * 2 sexes * 22 age
>> group = 4 956 aggregation queries, and this causes the aggregation to take
>> a very long time. When I try to run manual aggregation for just one week
>> with 4-500 cases, it takes about 10 minutes (4/8 core CPU, SSD, 3/6 GB
>> memory for tomcat/postgres). Running the aggregation for the last 6 months
>> would take a several hours. This *might* work for a cause of death
>> program where the number of cases is relatively low, but to do similar
>> analysis on an admission program (where I know some countries have 19000+
>> cases some weeks) is just not possible.
>>
>> So I guess my question 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18141: Fix F_USER_VIEW_WITHIN_MANAGED_GROUP text from 'View User' to 'View User Within Managed Group'

2015-01-29 Thread noreply

revno: 18141
committer: jimgr...@gmail.com
branch nick: dhis2
timestamp: Thu 2015-01-29 09:35:46 -0500
message:
  Fix F_USER_VIEW_WITHIN_MANAGED_GROUP text from 'View User' to 'View User 
Within Managed Group'
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2015-01-27 13:26:13 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2015-01-29 14:35:46 +
@@ -121,7 +121,7 @@
 F_USER_VIEW=View User
 F_USER_ADD_WITHIN_MANAGED_GROUP=Add/Update User Within Managed Group
 F_USER_DELETE_WITHIN_MANAGED_GROUP=Delete User
-F_USER_VIEW_WITHIN_MANAGED_GROUP=View User
+F_USER_VIEW_WITHIN_MANAGED_GROUP=View User Within Managed Group
 F_VALIDATIONRULE_ADD=Add/Update Validation Rule
 F_VALIDATIONRULE_DELETE=Delete Validation Rule
 F_VALIDATIONRULEGROUP_PUBLIC_ADD=Add/Update Public Validation Rule Group

___
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] Reporting based on tracker data

2015-01-29 Thread Olav Poppe
The database I have only contains dummy data, so I would be happy to share it 
if that can be of help.

Olav


> 29. jan. 2015 kl. 15.24 skrev Abyot Gizaw :
> 
> Hi Tran,
> 
> Is there anything you could do on this?
> 
> Briefly looking at DefaultCaseAggregationConditionService, for example you 
> have nested loops and inside these loops you are calling periodService to 
> fetch period from db. I don't see the call to periodService depending on data 
> generated in the loops - is it not possible to prefetch the periods and use 
> them inside the loops?
> 
> ---
> Thank you,
> Abyot.
> 
> On Thu, Jan 29, 2015 at 2:58 PM, Olav Poppe  > wrote:
> Hi, 
> I am really hoping to avoid custom scripts for this. What we’re trying to do 
> is to set up a reusable meta data «packages» (input and output) for recording 
> this data, and having to make «hacks» outside of DHIS (that then needs to be 
> maintained) to make it work does not look great.. Especially because all the 
> functionality is almost there: 1) the aggregation queries works, but isn’t 
> optimized, whilst 2) ER and EV still miss a few things for aggregated 
> analysis (which is available in PT and DV).
> 
> I’ve been experimenting a bit more with the aggregation queries, including 
> deleting 90% of the cases (but keeping all the ≈ 5000 queries). That didn’t 
> really speed up things, but looking at the CPU use, the java process was now 
> using 100+% CPU whilst postgresql stayed around 40-50% - so most of the time 
> seems to be spent preparing the queries rather than executing them. Also did 
> a few stack traces (jstack), and about half of the time, it was doing 
> something in HibernatePeriodStore.java:
> at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)
>   at 
> org.hisp.dhis.period.hibernate.HibernatePeriodStore.getPeriod(HibernatePeriodStore.java:73)
>   at 
> org.hisp.dhis.period.hibernate.HibernatePeriodStore.reloadPeriod(HibernatePeriodStore.java:163)
>   at 
> org.hisp.dhis.period.hibernate.HibernatePeriodStore.reloadForceAddPeriod(HibernatePeriodStore.java:171)
>   at 
> org.hisp.dhis.period.DefaultPeriodService.reloadPeriod(DefaultPeriodService.java:278)
>  
> 
> So perhaps (I’m only guessing here of course) some small optimizations is all 
> it takes to make the aggregation feasible.
> 
> Olav
> 
> 
> 
>> 29. jan. 2015 kl. 13.16 skrev Jason Pickering > >:
>> 
>> Hi Olav,
>> I came across a similar case,but even worse with many more disaggregates and 
>> and data elements . Short story is that's it was simply not feasible with 
>> the aggregation query builder,but rather trivial with a script to pull 
>> required data out of the database,aggregate it and then reimport it through 
>> the API. Not surprisingly, I chose to use R,but am sure it could be done 
>> with other languages. A map between the event data elements and aggregate 
>> data elements was used to transform and aggregate from one domain to the 
>> other. Robin brought up a similar request a while ago about this ,so looks 
>> like something we should really have in the core as opposed to relying on 
>> scripts.
>> 
>> Regards,
>> Jason
>> 
>> On Jan 29, 2015 1:36 PM, "Olav Poppe" > > wrote:
>> Hi devs, 
>> I’m having some problems with making reports/dashboards/output based on 
>> tracker data.
>> 
>> We have made a «Cause of death» program, quite similar to the inpatient 
>> program on the demo instance and what is currently being used several 
>> places. Each case will have as a minimum age, sex and a cause of death 
>> (based on an ICD-10 based short list of about 120 diagnosis). 
>> 
>> Based on this data, we want to make reports that include as a minimum:
>> - number of cases by gender  => can be done in ER/EV
>> - number of cases by diagnosis   => can be done in ER/EV
>> - number of cases by age group   => can NOT be done in ER/EV 
>> (unless I’ve missed something)
>> - number of cases by diagnosis group => can NOT be done in ER/EV 
>> (unless I’ve missed something)
>> - combinations of the above, e.g. case by diagnosis and age group/sex => can 
>> NOT be done in ER/EV (unless I’ve missed something)
>> 
>> Since this output can quite easily be created based on aggregate data (it is 
>> similar to the OPD datasets), I decided to set up aggregation queries to 
>> make the reports we need. I therefore made a categorycombo with gender and 
>> age group, and one data element for each diagnosis. I then grouped the 
>> diagnosis into data element groups to be able make reports based on disease 
>> group. I tested this with a couple of queries, and it worked fine.
>> 
>> The problem with this approach is that 118 diagnosis * 2 sexes * 22 age 
>> group = 4 956 aggregation queries, and this causes the aggregation to take a 
>> very long time. When I try to run manual aggregation for just one week with 
>> 4-

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18142: Fix F_USER_DELETE_WITHIN_MANAGED_GROUP text from 'Delete User' to 'Delete User Within Managed Group'

2015-01-29 Thread noreply

revno: 18142
committer: jimgr...@gmail.com
branch nick: dhis2
timestamp: Thu 2015-01-29 11:27:12 -0500
message:
  Fix F_USER_DELETE_WITHIN_MANAGED_GROUP text from 'Delete User' to 'Delete 
User Within Managed Group'
modified:
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2015-01-29 14:35:46 +
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2015-01-29 16:27:12 +
@@ -120,7 +120,7 @@
 F_USER_DELETE=Delete User
 F_USER_VIEW=View User
 F_USER_ADD_WITHIN_MANAGED_GROUP=Add/Update User Within Managed Group
-F_USER_DELETE_WITHIN_MANAGED_GROUP=Delete User
+F_USER_DELETE_WITHIN_MANAGED_GROUP=Delete User Within Managed Group
 F_USER_VIEW_WITHIN_MANAGED_GROUP=View User Within Managed Group
 F_VALIDATIONRULE_ADD=Add/Update Validation Rule
 F_VALIDATIONRULE_DELETE=Delete Validation Rule

___
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 1402244] [NEW] event report/visulizer: option set sort order not respocted

2015-01-29 Thread Jan Henrik Øverland
Olav, fixed in trunk and backported to 2.18.

On Tue, Jan 27, 2015 at 10:47 AM, Greg Rowles  wrote:

> Sorry - pls ignore - I see included the wrong parameters for OUlevels...
>
> On Tue, Jan 27, 2015 at 11:46 AM, Greg Rowles 
> wrote:
>
>> Hi Olav, Jan and Others
>>
>> I think I've replicated this bug on the Sierra Leone (demo) instance:
>>
>>
>> https://apps.dhis2.org/demo/api/analytics/events/aggregate/IpHINAT79UW.html?stage=A03MvHHogjR&dimension=ou:LEVEL-2;LEVEL-3;ImspTQPwCqd&dimension=pe:THIS_YEAR;LAST_YEAR&filter=UXz7xuGCEhU&displayProperty=NAME&asc=OUNAME
>>
>> OUnames are outputted non-alphabetical...
>>
>> Greg
>>
>>
>> On Sun, Jan 25, 2015 at 12:53 PM, Olav Poppe  wrote:
>>
>>> Hi,
>>> the issue is not that it doesn’t allow custom sorting (I didn’t know
>>> that was possible), but that it sorts options alphabetically rather than
>>> using the sort order specified for the option set.
>>>
>>> On the /demo for example, the option set for Gender has sort order Male
>>> - Female, but in ER and EV they are displayed as Female - Male. Not so
>>> important in the case of Gender, but if you have options like «Not
>>> applicable» or «Other» you might want to have those at the end of the list
>>> both in data entry and in analysis by default.
>>>
>>> Olav
>>>
>>>
>>>
>>> 23. jan. 2015 kl. 19.02 skrev Jan Henrik Øverland <
>>> janhenrik.overl...@gmail.com>:
>>>
>>> Olav,
>>>
>>> how/where can I reproduce it? This is what I tried (demo):
>>>
>>> - opened both ER and EV, selected Inpatient.. program, then Mode of
>>> discharge
>>> - selected a custom order, clicked update, but it worked as expected
>>>
>>> The demo is now 2.18, but nothing has been changed lately in this regard.
>>>
>>> Greg,
>>>
>>> seems adding "asc=OUNAME" does not have any effect (
>>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s22.html)
>>>
>>> Should be fixed, but please write a new bug report as it's an unrelated
>>> issue.
>>>
>>> On Thu, Jan 22, 2015 at 3:21 PM, Greg Rowles 
>>> wrote:
>>>
 Hi OIav/Devs

 Is this bug related to my observation:

 I cannot get event (aggregate) analytics to sort my data by column [OU]
 alphabetically ASC. Right now data is displayed with no apparent display
 order...

 Regards,
 Greg



 -- Forwarded message --
 From: Olav P <1402...@bugs.launchpad.net>
 Date: Sat, Dec 13, 2014 at 7:41 PM
 Subject: [Dhis2-devs] [Bug 1402244] [NEW] event report/visulizer:
 option set sort order not respocted
 To: dhis2-devs@lists.launchpad.net


 Public bug reported:

 Event report/visulizer apps do not respect the sort order that is set
 for option sets. 2.17.

 ** 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/1402244

 Title:
   event report/visulizer: option set sort order not respocted

 Status in DHIS 2:
   New

 Bug description:
   Event report/visulizer apps do not respect the sort order that is set
   for option sets. 2.17.

 To manage notifications about this bug go to:
 https://bugs.launchpad.net/dhis2/+bug/1402244/+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



 --
 *Health Information Systems Program - South Africa*
 *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - -
 - - *
 Mobile  :073 246 2992
 Landline:   021 554 3130
 Fax:  086 733 8432
 Skype:  gregory_rowles

 ___
 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


>>>
>>>
>>
>>
>> --
>> *Health Information Systems Program - South Africa*
>> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
>> - *
>> Mobile  :073 246 2992
>> Landline:   021 554 3130
>> Fax:  086 733 8432
>> Skype:  gregory_rowles
>>
>
>
>
> --
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
> - *
> Mobile  :073 246 2992
> Landline:   021 554 3130
> Fax:  086 733 8432
> Skype:  gregory_rowles
>
___
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 1402244] [NEW] event report/visulizer: option set sort order not respocted

2015-01-29 Thread Jan Henrik Øverland
And 2.17.

On Thu, Jan 29, 2015 at 5:36 PM, Jan Henrik Øverland <
janhenrik.overl...@gmail.com> wrote:

> Olav, fixed in trunk and backported to 2.18.
>
> On Tue, Jan 27, 2015 at 10:47 AM, Greg Rowles 
> wrote:
>
>> Sorry - pls ignore - I see included the wrong parameters for OUlevels...
>>
>> On Tue, Jan 27, 2015 at 11:46 AM, Greg Rowles 
>> wrote:
>>
>>> Hi Olav, Jan and Others
>>>
>>> I think I've replicated this bug on the Sierra Leone (demo) instance:
>>>
>>>
>>> https://apps.dhis2.org/demo/api/analytics/events/aggregate/IpHINAT79UW.html?stage=A03MvHHogjR&dimension=ou:LEVEL-2;LEVEL-3;ImspTQPwCqd&dimension=pe:THIS_YEAR;LAST_YEAR&filter=UXz7xuGCEhU&displayProperty=NAME&asc=OUNAME
>>>
>>> OUnames are outputted non-alphabetical...
>>>
>>> Greg
>>>
>>>
>>> On Sun, Jan 25, 2015 at 12:53 PM, Olav Poppe  wrote:
>>>
 Hi,
 the issue is not that it doesn’t allow custom sorting (I didn’t know
 that was possible), but that it sorts options alphabetically rather than
 using the sort order specified for the option set.

 On the /demo for example, the option set for Gender has sort order Male
 - Female, but in ER and EV they are displayed as Female - Male. Not so
 important in the case of Gender, but if you have options like «Not
 applicable» or «Other» you might want to have those at the end of the list
 both in data entry and in analysis by default.

 Olav



 23. jan. 2015 kl. 19.02 skrev Jan Henrik Øverland <
 janhenrik.overl...@gmail.com>:

 Olav,

 how/where can I reproduce it? This is what I tried (demo):

 - opened both ER and EV, selected Inpatient.. program, then Mode of
 discharge
 - selected a custom order, clicked update, but it worked as expected

 The demo is now 2.18, but nothing has been changed lately in this
 regard.

 Greg,

 seems adding "asc=OUNAME" does not have any effect (
 https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s22.html)

 Should be fixed, but please write a new bug report as it's an unrelated
 issue.

 On Thu, Jan 22, 2015 at 3:21 PM, Greg Rowles 
 wrote:

> Hi OIav/Devs
>
> Is this bug related to my observation:
>
> I cannot get event (aggregate) analytics to sort my data by column
> [OU] alphabetically ASC. Right now data is displayed with no apparent
> display order...
>
> Regards,
> Greg
>
>
>
> -- Forwarded message --
> From: Olav P <1402...@bugs.launchpad.net>
> Date: Sat, Dec 13, 2014 at 7:41 PM
> Subject: [Dhis2-devs] [Bug 1402244] [NEW] event report/visulizer:
> option set sort order not respocted
> To: dhis2-devs@lists.launchpad.net
>
>
> Public bug reported:
>
> Event report/visulizer apps do not respect the sort order that is set
> for option sets. 2.17.
>
> ** 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/1402244
>
> Title:
>   event report/visulizer: option set sort order not respocted
>
> Status in DHIS 2:
>   New
>
> Bug description:
>   Event report/visulizer apps do not respect the sort order that is set
>   for option sets. 2.17.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1402244/+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
>
>
>
> --
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- -
> - - - *
> Mobile  :073 246 2992
> Landline:   021 554 3130
> Fax:  086 733 8432
> Skype:  gregory_rowles
>
> ___
> 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
>
>


>>>
>>>
>>> --
>>> *Health Information Systems Program - South Africa*
>>> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - -
>>> - - *
>>> Mobile  :073 246 2992
>>> Landline:   021 554 3130
>>> Fax:  086 733 8432
>>> Skype:  gregory_rowles
>>>
>>
>>
>>
>> --
>> *Health Information Systems Program - South Africa*
>> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
>> - *
>> Mobile  :073 246 2992
>> Landline:   021 554 3130
>> Fax:  086 733 8432
>> Skype: 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18143: ER EV options order issue fixed.

2015-01-29 Thread noreply
Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revno: 18143 [merge]
committer: Jan Henrik Overland 
branch nick: dhis2
timestamp: Thu 2015-01-29 17:34:10 +0100
message:
  ER EV options order issue fixed.
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2014-11-03 15:01:20 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-01-29 16:31:21 +
@@ -1826,7 +1826,11 @@
 });
 }
 
-support.prototype.array.sort(objects, 'ASC', 'sortingId');
+// sort if not option set
+if (!header.optionSet) {
+support.prototype.array.sort(objects, 'ASC', 'sortingId');
+}
+
 header.ids = Ext.Array.pluck(objects, 'id');
 }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2014-10-30 16:29:02 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2015-01-29 16:31:21 +
@@ -1859,7 +1859,11 @@
 });
 }
 
-support.prototype.array.sort(objects, 'ASC', 'sortingId');
+// sort if not option set
+if (!header.optionSet) {
+support.prototype.array.sort(objects, 'ASC', 'sortingId');
+}
+
 header.ids = Ext.Array.pluck(objects, 'id');
 }
 }

___
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 1402244] [NEW] event report/visulizer: option set sort order not respocted

2015-01-29 Thread Olav Poppe
Great, thanks!

> 29. jan. 2015 kl. 17.36 skrev Jan Henrik Øverland 
> :
> 
> Olav, fixed in trunk and backported to 2.18.
> 
> On Tue, Jan 27, 2015 at 10:47 AM, Greg Rowles  > wrote:
> Sorry - pls ignore - I see included the wrong parameters for OUlevels...
> 
> On Tue, Jan 27, 2015 at 11:46 AM, Greg Rowles  > wrote:
> Hi Olav, Jan and Others
> 
> I think I've replicated this bug on the Sierra Leone (demo) instance:
> 
> https://apps.dhis2.org/demo/api/analytics/events/aggregate/IpHINAT79UW.html?stage=A03MvHHogjR&dimension=ou:LEVEL-2;LEVEL-3;ImspTQPwCqd&dimension=pe:THIS_YEAR;LAST_YEAR&filter=UXz7xuGCEhU&displayProperty=NAME&asc=OUNAME
>  
> 
> 
> OUnames are outputted non-alphabetical...
> 
> Greg
> 
> 
> On Sun, Jan 25, 2015 at 12:53 PM, Olav Poppe  > wrote:
> Hi, 
> the issue is not that it doesn’t allow custom sorting (I didn’t know that was 
> possible), but that it sorts options alphabetically rather than using the 
> sort order specified for the option set.
> 
> On the /demo for example, the option set for Gender has sort order Male - 
> Female, but in ER and EV they are displayed as Female - Male. Not so 
> important in the case of Gender, but if you have options like «Not 
> applicable» or «Other» you might want to have those at the end of the list 
> both in data entry and in analysis by default.
> 
> Olav
> 
> 
> 
>> 23. jan. 2015 kl. 19.02 skrev Jan Henrik Øverland 
>> mailto:janhenrik.overl...@gmail.com>>:
>> 
>> Olav,
>> 
>> how/where can I reproduce it? This is what I tried (demo):
>> 
>> - opened both ER and EV, selected Inpatient.. program, then Mode of discharge
>> - selected a custom order, clicked update, but it worked as expected
>> 
>> The demo is now 2.18, but nothing has been changed lately in this regard.
>> 
>> Greg,
>> 
>> seems adding "asc=OUNAME" does not have any effect 
>> (https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s22.html 
>> )
>> 
>> Should be fixed, but please write a new bug report as it's an unrelated 
>> issue.
>> 
>> On Thu, Jan 22, 2015 at 3:21 PM, Greg Rowles > > wrote:
>> Hi OIav/Devs
>> 
>> Is this bug related to my observation:
>> 
>> I cannot get event (aggregate) analytics to sort my data by column [OU] 
>> alphabetically ASC. Right now data is displayed with no apparent display 
>> order...
>> 
>> Regards,
>> Greg
>> 
>> 
>> 
>> -- Forwarded message --
>> From: Olav P <1402...@bugs.launchpad.net >
>> Date: Sat, Dec 13, 2014 at 7:41 PM
>> Subject: [Dhis2-devs] [Bug 1402244] [NEW] event report/visulizer: option set 
>> sort order not respocted
>> To: dhis2-devs@lists.launchpad.net 
>> 
>> 
>> Public bug reported:
>> 
>> Event report/visulizer apps do not respect the sort order that is set
>> for option sets. 2.17.
>> 
>> ** 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/1402244 
>> 
>> 
>> Title:
>>   event report/visulizer: option set sort order not respocted
>> 
>> Status in DHIS 2:
>>   New
>> 
>> Bug description:
>>   Event report/visulizer apps do not respect the sort order that is set
>>   for option sets. 2.17.
>> 
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/dhis2/+bug/1402244/+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 
>> 
>> 
>> 
>> 
>> -- 
>> Health Information Systems Program - South Africa
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
>> Mobile  :073 246 2992
>> Landline:   021 554 3130
>> Fax:  086 733 8432 
>> Skype:  gregory_rowles
>> 
>> ___
>> 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/ListHel

[Dhis2-devs] [Bug 1402244] Re: event report/visulizer: option set sort order not respocted

2015-01-29 Thread Jan Henrik Øverland
** 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/1402244

Title:
  event report/visulizer: option set sort order not respocted

Status in DHIS 2:
  Fix Committed

Bug description:
  Event report/visulizer apps do not respect the sort order that is set
  for option sets. 2.17.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1402244/+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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18144: program validation - WIP

2015-01-29 Thread noreply

revno: 18144
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-01-29 18:13:36 +0100
message:
  program validation - WIP
modified:
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js
  
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/controllers.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-01-28 19:03:29 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-01-29 17:13:36 +
@@ -1,5 +1,6 @@
 
-
+
+
 
 Event Capture
 
@@ -59,7 +60,7 @@
 
 
 
-
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-01-26 17:47:09 +
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-01-29 17:13:36 +
@@ -13,6 +13,7 @@
 storage,
 Paginator,
 OptionSetService,
+ProgramValidationService,
 ProgramFactory,
 ProgramStageFactory,
 DHIS2EventFactory,
@@ -85,6 +86,7 @@
 $scope.resetOu = false;
 $scope.selectedProgram = null;
 $scope.selectedProgramStage = null;
+$scope.programValidations = [];
 $scope.dhis2Events = [];
 $scope.currentEvent = {};
 $scope.currentEventOriginialValue = {};
@@ -109,14 +111,13 @@
 
 if(angular.isObject($scope.programs) && $scope.programs.length === 1){
 $scope.selectedProgram = $scope.programs[0];
-//$scope.loadEvents();
-$scope.getPrograms();
+$scope.getProgramDetails();
 }
 });
 }
 };
 
-$scope.getPrograms = function(){
+$scope.getProgramDetails = function(){
 
 $scope.selectedProgramStage = null;
 
@@ -128,7 +129,7 @@
 if( $scope.selectedProgram && 
 $scope.selectedProgram.programStages && 
 $scope.selectedProgram.programStages[0] && 
-$scope.selectedProgram.programStages[0].id){   
+$scope.selectedProgram.programStages[0].id){ 
 
 //because this is single event, take the first program stage
 ProgramStageFactory.get($scope.selectedProgram.programStages[0].id).then(function (programStage){
@@ -138,7 +139,7 @@
 angular.forEach($scope.selectedProgramStage.programStageSections, function(section){
 section.open = true;
 });
-
+
 $scope.customForm = CustomFormService.getForProgramStage($scope.selectedProgramStage);
 
 $scope.prStDes = [];  
@@ -185,18 +186,24 @@
 $scope.filterText[prStDe.dataElement.id]= {};
 }
 });
-
+
 if($scope.selectedProgramStage.captureCoordinates){
 $scope.newDhis2Event.coordinate = {};
 }
 $scope.newDhis2Event.eventDate = '';
-
+
 
 ErrorMessageService.setErrorMessages(errorMessages);
-
-$scope.loadEvents();
-
-});
+
+ProgramValidationService.getByProgram($scope.selectedProgram.id).then(function(pvs){
+
+$scope.programValidations = pvs;
+
+console.log('the validations:  ', $scope.programValidations);
+
+$scope.loadEvents();
+});
+});
 }
 };
 

[Dhis2-devs] Reconstructing a categoryoptioncombo (long story)

2015-01-29 Thread Bob Jolliffe
Hi

Here's a problem.  Apologies, its a long mail, but its a serious business
and needs to be untangled.

Two or more systems have matching dataelements, categorycombos, categories
and categoryoptions.  They could be matched on uid, name, code or what
ever.  Assuming they also have matching orgunit identifiers, those two
systems should be able to exchange data.  There is really no need for
either of them to know anything about the other's categoryoptioncombos.
Which is a good thing on a number of fronts.  Not least being that if
either one of the two is not dhis2 then it won't have the faintest notion
of a categoryoptioncombo anywat.  And even if they were both dhis2, we all
know that keeping these catoptcombos in synch is notoriously difficult.

So I've been over some of this ground before, but now thinking about
implementation, there are some missing pieces in our model (and some
shortcomings of the java language) which makes this a bit trickier than it
should be.  Picture this datavalue being imported (using codes for
legibility):



1.  Once we know the dataelement we can immediately retrieve the
categorycombo, which tells us to expect two more attributes: sex and age in
this case.

2.  We could go the database at this point and query from the
 categoryoptioncombos_categoryoptions table, having first retrieved the
primary ids for the categoryoptions.  This would certainly work, but the
table might be quite big and the query would be required many times for a
large datavalueset.  Given that we know the categorycombo from 1 above, we
should only need to query from a very much smaller set of data contained in
an in-memory data structure.

3.  But what would such a data structure look like?  Essentially what is
required is a multidimensional associative array which is keyed along each
of its dimensions using the categoryoptions of a category.  For most of our
categorycombos this would be a 1 or 2 dimensional array, but with some
rarer cases of 3 or 4 categories.  That would allow lookups of the sort
getCatOptCombo(sex='M', age='u5', ...)

Such a dynamic associative array is a natural paradigm in languages like
perl, tcl, php, javascript, and probably R, but java leaves us a bit short.
The structure is not easily expressed, at least not efficiently.

4.  One alternative is to model it as a tree structure.  This has a minor
drawback that a tree has to put the categories (the layers of the tree) in
some order which is not implicit in our model, but that's not a very big
problem.  If you know the order they were put in, you can use the same
order to search them out.  A bit of xml below shows more or less what the
structure of that tree would be like for a typical age-sex combo:






























Note the xml is incidental.  The point is the tree structure. Mind you,
java doesn't have a built in tree type but it does have a DOM model which
could be used very adequately for this kind of structure (tip off
stackoverflow).  Assuming we had created such a DOM model for a particular
categorycombo, then we can answer our question of what the catoptcombo is
for age='<5' and sex='M' with a relatively simple XPath query like:

//categoryOption[@code='M']/category/categoryOption[@code='u5']/catoptcombo/@id

Given these categorycombo trees will each individually be relatively small,
these will in fact be quite efficient lookups.

So I'm left with a few questions.

1.  does it make sense to use a DOM tree for this rather than invent our
own custom tree structure?  I'm inclined to do the DOM first because its
easy and will definitely work.  But won't be the fastest.  Could optimize a
custom tree later.  Mind you, after considering 3 below, the DOM tree might
make more sense than appears at first pass.

2.  Am I missing something.  Is a tree the right way to do this?  Is there
something about java's  apparent lack of multi-associative-arrays which I
am just not getting?

3.  Looking at the XML above (which was meant to be incidental), I now
think it makes a lot more sense than what we actually output currently from
our resources api.  For example, cutting a few bits from
https://apps.dhis2.org/demo/api/categoryCombos/dzjKKQq0cSO:



  
  
  
  


  
  
  


This representation  in itself is actually not very useful and asks more
questions than it answers.  In particular, and this is important, how is
that list of categoryoptioncombos related to that list of categories.  And
even more particularly their categoryoptions.  A not inconsiderable number
of additional api requests would have to be made before reaching sensible
answers to this pretty fundamental question.  In fact th

Re: [Dhis2-devs] Numeric Data Elements are not allowing numeric TrackedEntityValues

2015-01-29 Thread Juan Manuel Alcantara Acosta
Hello Abyot
In addition to what Jose reported, I’d like to add a problem I had today. 
Testing the option selection bug in event capture I found that a number of 
options that Jose was able to see were not showing up for me, this was due to 
the cache not being updated, after clearing the cache in Chrome I tested again 
and the options were loaded correctly.
Best regards,
JM


> El 29/01/2015, a las 13:11, Jose Garcia Muñoz  escribió:
> 
> 
> Hi Abyot, Tran,
> 
> This may be related only when we are using custom forms for the stages. I 
> have found in our system 2 problems (in the 'KH RH FP - Clinical' program) 2 
> problems:
> 
> 1) when we are using a Text DataElement (as a free text, non with an option 
> set). So if we introduce a text, the box appears with a yellow color and we 
> get the following message in the JS console
> 
>  Uncaught TypeError: Cannot read property 'replace' of 
> undefinedcommons.js?_rev=__dev__:416 htmlEncodeentry.js?_rev=__dev__:261 
> ValueSaver.saveentry.js?_rev=__dev__:92 saveValtrackedEntityInstance.action:1 
> onchange
> 
> 2) When we are using a numeric DataElement (as I have described below).
> 
> Hope it helps, it is very urgent for us.
> 
> Many thanks
> Jose
> 
> On Thu, Jan 29, 2015 at 5:09 PM, Abyot Gizaw  > wrote:
> Hi Jose,
> 
> I am not able to reproduce with 2.17 (Version: 2.17; Build revision: 17735; 
> Build date: 2015-01-29 16:04).
> 
> Tran, is this something you can investigate further?
> 
> 
> ---
> Thank you,
> Abyot.
> 
> On Thu, Jan 29, 2015 at 3:34 PM, Jose Garcia Muñoz  > wrote:
> 
> Sorry, forgot to mention that we are working with the 2.17.
> 
> On Thu, Jan 29, 2015 at 3:21 PM, Jose Garcia Muñoz  > wrote:
> 
> Hi devs,
> 
> Can you take a look as soon as you can please? This issue is not allowing the 
> data entry for our users.
> 
> 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] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18145: individual-records-module - bug fix in custom data entry for number and text fields

2015-01-29 Thread noreply

revno: 18145
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-01-29 22:06:18 +0100
message:
  individual-records-module - bug fix in custom data entry for number and text 
fields
modified:
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2015-01-29 21:06:18 +
@@ -713,7 +713,7 @@
 private String populateCustomDataEntryForTextBox( DataElement dataElement, String inputHTML, String dataElementValue )
 {
 final String jsCodeForInputs = " name=\"entryfield\" tabIndex=\"$TABINDEX\" $DISABLED data=\"{compulsory:$COMPULSORY, deName:'$DATAELEMENTNAME', deType:'$DATAELEMENTTYPE'}\" options='$OPTIONS' maxlength=255 ";
-final String jsCodeForOnchange = " onchange=\"saveVal( '$DATAELEMENTID' )\" onkeypress=\"return keyPress(event, this)\" ";
+final String jsCodeForOnchange = " onchange=\"saveVal( '$DATAELEMENTID', this.value )\" onkeypress=\"return keyPress(event, this)\" ";
 
 // -
 // Insert value of data element in output code
@@ -881,4 +881,4 @@
 
 return result;
 }
-}
\ No newline at end of file
+}

___
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] Numeric Data Elements are not allowing numeric TrackedEntityValues

2015-01-29 Thread Abyot Gizaw
Hello Jose, Juan

The bug is fixed now in 2.17 (Rev. 17737), 2.18 and trunk.

About the cache clearing, unfortunately that is how it is currently -
especially with 2.17. But things have improved from 2.18 on.

---
Thank you,
Abyot.

On Thu, Jan 29, 2015 at 9:20 PM, Juan Manuel Alcantara Acosta <
jmalcanta...@gmail.com> wrote:

> Hello Abyot
> In addition to what Jose reported, I’d like to add a problem I had today.
> Testing the option selection bug in event capture I found that a number of
> options that Jose was able to see were not showing up for me, this was due
> to the cache not being updated, after clearing the cache in Chrome I tested
> again and the options were loaded correctly.
> Best regards,
> JM
>
>
> El 29/01/2015, a las 13:11, Jose Garcia Muñoz 
> escribió:
>
>
> Hi Abyot, Tran,
>
> This may be related only when we are using custom forms for the stages. I
> have found in our system 2 problems (in the 'KH RH FP - Clinical' program)
> 2 problems:
>
> 1) when we are using a Text DataElement (as a free text, non with an
> option set). So if we introduce a text, the box appears with a yellow color
> and we get the following message in the JS console
>
>  Uncaught TypeError: Cannot read property 'replace' of
> undefinedcommons.js?_rev=__dev__:416 htmlEncodeentry.js?_rev=__dev__:261
> ValueSaver.saveentry.js?_rev=__dev__:92
> saveValtrackedEntityInstance.action:1 onchange
>
> 2) When we are using a numeric DataElement (as I have described below).
>
> Hope it helps, it is very urgent for us.
>
> Many thanks
> Jose
>
> On Thu, Jan 29, 2015 at 5:09 PM, Abyot Gizaw  wrote:
>
>> Hi Jose,
>>
>> I am not able to reproduce with 2.17 (Version: 2.17; Build revision:
>> 17735; Build date: 2015-01-29 16:04).
>>
>> Tran, is this something you can investigate further?
>>
>>
>> ---
>> Thank you,
>> Abyot.
>>
>> On Thu, Jan 29, 2015 at 3:34 PM, Jose Garcia Muñoz 
>> wrote:
>>
>>>
>>> Sorry, forgot to mention that we are working with the 2.17.
>>>
>>> On Thu, Jan 29, 2015 at 3:21 PM, Jose Garcia Muñoz 
>>> wrote:
>>>

 Hi devs,

 Can you take a look as soon as you can please? This issue is not
 allowing the data entry for our users.

 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


Re: [Dhis2-devs] Reconstructing a categoryoptioncombo (long story)

2015-01-29 Thread Jim Grace
Hi Bob,

Good question. I like the idea of an in-memory cache for speed, as you
suggest. You might try using a HashTable where the key is an array of
option value Strings and the value of the HashTable is the optionCombo. As
you process the import, each time you get from the dataElement a
categoryCombo you haven't seen before, then get all the optionCombos for
this categoryCombo and put them into your HashTable. The order you put them
into the key array can be the same as the order of the
DataElementCategoryCombo.getCategories() method, since it returns a list.
When looking up a bunch of category values, just put them in the same order
into the array.

Obviously once you've built the values->combo lookup, you will want to
reuse it as much as possible. You could put this into a
com.google.common.cache.Cache so that it can be resued not only by
subsequent record in the same import, but by other imports that come before
the cache entry ages out. The only danger of this in theory is that someone
could extend a category combo or add new option values, and then try an
import before the cache expires. Although this is extremely unlikely, you
can protect against it: If a values->combo lookup fails, remove the cached
HashTable for this categoryCombo and rebuild it. If it still fails, then
you've got a real error. :)

Cheers,
Jim


On Thu, Jan 29, 2015 at 1:38 PM, Bob Jolliffe  wrote:

> Hi
>
> Here's a problem.  Apologies, its a long mail, but its a serious business
> and needs to be untangled.
>
> Two or more systems have matching dataelements, categorycombos, categories
> and categoryoptions.  They could be matched on uid, name, code or what
> ever.  Assuming they also have matching orgunit identifiers, those two
> systems should be able to exchange data.  There is really no need for
> either of them to know anything about the other's categoryoptioncombos.
> Which is a good thing on a number of fronts.  Not least being that if
> either one of the two is not dhis2 then it won't have the faintest notion
> of a categoryoptioncombo anywat.  And even if they were both dhis2, we all
> know that keeping these catoptcombos in synch is notoriously difficult.
>
> So I've been over some of this ground before, but now thinking about
> implementation, there are some missing pieces in our model (and some
> shortcomings of the java language) which makes this a bit trickier than it
> should be.  Picture this datavalue being imported (using codes for
> legibility):
>
> 
>
> 1.  Once we know the dataelement we can immediately retrieve the
> categorycombo, which tells us to expect two more attributes: sex and age in
> this case.
>
> 2.  We could go the database at this point and query from the
>  categoryoptioncombos_categoryoptions table, having first retrieved the
> primary ids for the categoryoptions.  This would certainly work, but the
> table might be quite big and the query would be required many times for a
> large datavalueset.  Given that we know the categorycombo from 1 above, we
> should only need to query from a very much smaller set of data contained in
> an in-memory data structure.
>
> 3.  But what would such a data structure look like?  Essentially what is
> required is a multidimensional associative array which is keyed along each
> of its dimensions using the categoryoptions of a category.  For most of our
> categorycombos this would be a 1 or 2 dimensional array, but with some
> rarer cases of 3 or 4 categories.  That would allow lookups of the sort
> getCatOptCombo(sex='M', age='u5', ...)
>
> Such a dynamic associative array is a natural paradigm in languages like
> perl, tcl, php, javascript, and probably R, but java leaves us a bit short.
> The structure is not easily expressed, at least not efficiently.
>
> 4.  One alternative is to model it as a tree structure.  This has a minor
> drawback that a tree has to put the categories (the layers of the tree) in
> some order which is not implicit in our model, but that's not a very big
> problem.  If you know the order they were put in, you can use the same
> order to search them out.  A bit of xml below shows more or less what the
> structure of that tree would be like for a typical age-sex combo:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Note the xml is incidental.  The point is the tree structure. Mind you,
> java doesn't have a built in tree type but it does have a DOM model which
> could be used very adequately for this kind of structure (tip off
> stackoverflow).  Assuming we had created such a DOM model for a particular
> categorycombo, then we can answer our question of wha

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 18146: minor

2015-01-29 Thread noreply

revno: 18146
committer: Abyot Asalefew Gizaw 
branch nick: dhis2
timestamp: Thu 2015-01-29 23:06:36 +0100
message:
  minor
modified:
  
dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java	2015-01-17 07:41:26 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java	2015-01-29 22:06:36 +
@@ -126,7 +126,7 @@
 {
 String expected = "";
++ "maxlength=255  onchange=\"saveVal( \'DeA\', this.value )\" onkeypress=\"return keyPress(event, this)\"  />";
 String actual = programDataEntryService.prepareDataEntryFormForAdd( htmlCode, mockI18n, stageA );
assertEquals( expected, actual );
 }

___
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] Reconstructing a categoryoptioncombo (long story)

2015-01-29 Thread Bob Jolliffe
Yes I've been thinking a bit about HashTables and hashMaps.  Effectively
that's the closest thing you get to an associative array.  And can simulate
a tree.  If we concede the ordering of keys then a simple
HashMap would even do the trick if we concatenate the
categoryoption identifiers together, like for example (a 2 dimensional
categorycombo):

catcomboMap.put( "HbIugXRzrcK.mBl2TUqeODx",43);
catcomboMap.put( "HbIugXRzrcK.h5uidbruf8nJ",44);


where the "value" is the internal id of the catoptcombo, which is all we
need to perform the insert.

This is effectively a tree with keys on the branches :-) A more efficient
variant would be some sort of radix tree like what routers use to process
IP addresses, but maybe the above would be "good enough".

We could leave these things around in a cache, but I doubt if its a huge
overhead to build up a few small maps during the import. One reason for
doing them on the fly is that you need to cater for different identifier
schemes being used.  So the above will work for uids, but if the import was
using names or codes you'd want to make different maps.

Agree with what you say about constructing them on encountering each new
categorycombo.  This is also what I was suggesting.

On 29 January 2015 at 22:07, Jim Grace  wrote:

> Hi Bob,
>
> Good question. I like the idea of an in-memory cache for speed, as you
> suggest. You might try using a HashTable where the key is an array of
> option value Strings and the value of the HashTable is the optionCombo. As
> you process the import, each time you get from the dataElement a
> categoryCombo you haven't seen before, then get all the optionCombos for
> this categoryCombo and put them into your HashTable. The order you put them
> into the key array can be the same as the order of the
> DataElementCategoryCombo.getCategories() method, since it returns a list.
> When looking up a bunch of category values, just put them in the same order
> into the array.
>
> Obviously once you've built the values->combo lookup, you will want to
> reuse it as much as possible. You could put this into a
> com.google.common.cache.Cache so that it can be resued not only by
> subsequent record in the same import, but by other imports that come before
> the cache entry ages out. The only danger of this in theory is that someone
> could extend a category combo or add new option values, and then try an
> import before the cache expires. Although this is extremely unlikely, you
> can protect against it: If a values->combo lookup fails, remove the cached
> HashTable for this categoryCombo and rebuild it. If it still fails, then
> you've got a real error. :)
>
> Cheers,
> Jim
>
>
> On Thu, Jan 29, 2015 at 1:38 PM, Bob Jolliffe 
> wrote:
>
>> Hi
>>
>> Here's a problem.  Apologies, its a long mail, but its a serious business
>> and needs to be untangled.
>>
>> Two or more systems have matching dataelements, categorycombos,
>> categories and categoryoptions.  They could be matched on uid, name, code
>> or what ever.  Assuming they also have matching orgunit identifiers, those
>> two systems should be able to exchange data.  There is really no need for
>> either of them to know anything about the other's categoryoptioncombos.
>> Which is a good thing on a number of fronts.  Not least being that if
>> either one of the two is not dhis2 then it won't have the faintest notion
>> of a categoryoptioncombo anywat.  And even if they were both dhis2, we all
>> know that keeping these catoptcombos in synch is notoriously difficult.
>>
>> So I've been over some of this ground before, but now thinking about
>> implementation, there are some missing pieces in our model (and some
>> shortcomings of the java language) which makes this a bit trickier than it
>> should be.  Picture this datavalue being imported (using codes for
>> legibility):
>>
>> 
>>
>> 1.  Once we know the dataelement we can immediately retrieve the
>> categorycombo, which tells us to expect two more attributes: sex and age in
>> this case.
>>
>> 2.  We could go the database at this point and query from the
>>  categoryoptioncombos_categoryoptions table, having first retrieved the
>> primary ids for the categoryoptions.  This would certainly work, but the
>> table might be quite big and the query would be required many times for a
>> large datavalueset.  Given that we know the categorycombo from 1 above, we
>> should only need to query from a very much smaller set of data contained in
>> an in-memory data structure.
>>
>> 3.  But what would such a data structure look like?  Essentially what is
>> required is a multidimensional associative array which is keyed along each
>> of its dimensions using the categoryoptions of a category.  For most of our
>> categorycombos this would be a 1 or 2 dimensional array, but with some
>> rarer cases of 3 or 4 categories.  That would allow lookups of the sort
>> getCatOptCombo(sex='M', age='u5', ...)
>>
>> Such a dynamic associative array is a natural paradigm in lang

Re: [Dhis2-devs] Error saving an Event report (Individual cases)

2015-01-29 Thread Jose Garcia Muñoz
Sorry for asking you again, but do you have any updates related to this
issue?

We would need the solution also in the 2.17 version.

Many thanks
Jose

On Wed, Jan 28, 2015 at 7:00 AM, Jose Garcia Muñoz 
wrote:

>
> Hi devs,
>
> we are getting the following error each time we want to save an Event
> Report (Individual cases). It is working fine with aggregated. This issue
> is happening in the 2.18 (the Sierra Leona demo) and the 2.17 (PSI servers).
>
> As we are running some trainings based on event reports, will be great
> having this issue solved asap. Please add the potential solution to the War
> file
>
> Many thanks
> Jose
>
> [image: Inline image 1]
>
___
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 on Data approval

2015-01-29 Thread nsanzumuhire venuste
Any Help on the issue of approval data in version 2.17?All data set have been 
unloked after upgrading from 2.16 to 2.17.I have tried to lock again but it did 
not work.users can modify what ever they want.
Any Help will be appreciated.
regards.
  De : nsanzumuhire venuste 
 À : DHIS 2 developers ; 
"dhis2-us...@lists.launchpad.net"  
 Envoyé le : Jeudi 29 janvier 2015 15h53
 Objet : Issue on Data approval
   
Dear all,
I'm having issue where i had approved data set on previews periods,and now when 
users go to data entry,all data sets are unloked where now users can modify the 
data what ever they want.
When i'm checking in report>data approval,i can see all data sets are 
approved,I even went through the data set and approval data is Yes,But when 
users try to access the data entry they find the data set are not locked.
I'm using version 2.17 but on version 2.16 approval was ok.
Can some one help on this issue?
Thanks

  ___
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