Re: [Dhis2-devs] [Dhis2-users] Data Element/Indicators Dictionary

2014-05-20 Thread sumudu weerasinghe
What i feel in DHIS2 is, it itself behave as data dictionary . eg: data
element and indicators has all description you mention (Description , name
, short name, method of calculation)
 what we have to do is get them as summary table or pdf or excel out put .I
have no idea how to do it. Are there any one have idea of using data
dictionary option ?? ( in the documentation it is not clearly mention )


On Sun, May 18, 2014 at 6:55 AM, rin.chann...@gmail.com 
rin.chann...@gmail.com wrote:

 I mean not like that. I want that data dictionary is able store definition
 of data element or indicator, and store method of calculate of indicator.
 So easy for user to look to understand how indicator work and what is
 meaning of dataelement or indicator


 Brajesh Murari brajeshmur...@yahoo.in wrote:

 Channara,

 Working on indicators in DHIS2 application is quite easy work than
 calculating and doing various indicators based analysis. Four further
 understanding on making, creating indicators in DHIS 2,  i am recommending
 to follow the officially recommended process on link give below

 http://www.dhis2.org/doc/snapshot/en/user/html/ch13.html

 Thanks.


 Regards
 Brajesh Murari


 P please consider the environment before printing this email
   On Sunday, 18 May 2014 12:51 AM, sumudu weerasinghe sumudu...@gmail.com
 wrote:


 Hi channara,
 I am also confuse with the data dictionary in DHIS2, no idea. But in new  
 DHIS
 2 Demo - Sierra Leone site there is good example of data dictionary  .
 Follow this url
 http://apps.dhis2.org/apps//datadictionary_app_v1_0_jan//index.html



 On Tue, Apr 8, 2014 at 3:47 PM, channara rin rin.chann...@gmail.comwrote:

 HI all users,
 I confuse in DHIS2 has Data Dictionary.But seem mean not like i think. Any
 body know how can put Indicators' difinition, how to calculate, example
 into DHIS2.

 Thank you
 CHANNARA

 ___
 Mailing list: https://launchpad.net/~dhis2-users
 Post to : dhis2-us...@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-users
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~dhis2-users
 Post to: dhis2-us...@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-users
 More help  : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] Tracker - Identification number

2014-05-20 Thread sumudu weerasinghe
Thanks Emma and  Ola Hodne for your reply.
Both answers well explained and satisfactory.
I want to get printed out put of clinic number to apply on patient clinic
books, that including org unit and program eg: CP/GA/RA/PSY/2014/002 .
Is there any way of getting printed out put in a this format ?
Is it available in current version?




On Mon, May 19, 2014 at 1:30 PM, Ola Hodne Titlestad ol...@ifi.uio.nowrote:

 Hi Sumudu,

 Thanks Emma for the response. Just to add a bit more detail on the
 identifier issue.

 There is no way at the moment to automatically generate IDs on the format
 you suggest.
 What is possible, as Emma writes, is to define what we call uniqueness
 scope for attributes.

 So in your case I would create an attribute Clinic Number (the last part
 of your ID) with value type Number, then tick unique and select in
 program within organisation unit.

 This means that the users only deal with the Clinic Number, but in the
 back-end the system makes sure that there are no duplicate Clinic Numbers
 for any combination of program+organisation unit.

 So when you search for Clinic Number you might get multiple hits/persons,
 but not for the same organisation unit + program combination. You can then
 narrow the search by searching in only one organisation unit and one
 program, which will give you maximum 1 person for a full clinic number
 search. A typical clinician at a local clinic will only have access to one
 or a few programs and typically only one organisation unit, so the search
 scope is by default same or similar to the uniqueness scope, which makes
 it easier to quickly identify persons using the local Clinic Number (found
 at the patient/mother/child card or similar).

 We are planning to support period as part of this uniqueness scope as
 well, but that is not supported yet in 2.15. That will allow you to support
 the typical local practice of restarting the Clinic Number count in the
 paper registers at the beginning of every year (or financial year), so that
 duplicates will also be allowed for the same program+organisation unit as
 long as they are in separate periods (e.g. years) of your selected period
 type for uniqueness scope.

 On tracked entity, if your programs are about persons then add a tracked
 entity called Person and make sure to select that one when creating a new
 program. That's all.

 Ola
 ---


 --
 Ola Hodne Titlestad (Mr)
 HISP
 Department of Informatics
 University of Oslo

 Mobile: +47 48069736
 Home address: Eftasåsen 68, 0687 Oslo, Norway. Googlemaps 
 linkhttps://maps.google.com/maps?q=Eftas%C3%A5sen+68,+0687+Oslo,+Norgehl=enie=UTF8sll=59.893855,10.785116sspn=0.222842,0.585709oq=eftas%C3%A5sen+68,+0687+Oslo,+t=hhnear=Eftas%C3%A5sen+68,+%C3%98stensj%C3%B8,+0687+Oslo,+Norwayz=16


 On 19 May 2014 09:11, Emma Kassy ekass...@gmail.com wrote:

 Hi Sumudu,

 For version 2.15,
 There is a person Identifier, Go to  Program  Attributes select
 Attributes;
 You can make an ID unique by checking UNIQUE which will give you options
 like unique with in 1.whole system, 2. org unit, 3. program, or 4. program
 and orgunit. This means that you get to enter the clinic number on
 registration. (At some point IDs were automatically generated am not sure
 if that is still the case may be some one can provide more Information on
 this). Also it will be possible to see the orgunit and period as an output
 such as on Search Results.

 Tracked Entity: Helps to define the different objects that you would like
 to track with in your system (no longer limited to persons). This can be
 Persons for TB, HIV and ANC programs or ITEMS if one is interested in
 tracking drugs or any other Logistic Items.

 I hope this helps


 On Sun, May 18, 2014 at 4:01 PM, sumudu weerasinghe 
 sumudu...@gmail.comwrote:

 Dear All,
 I want to create a psychiatric patient identification number as

- it should contain initial code indicating org unit , program, and
year
- number need to be generate by system without manual entering




1. Is it possible in DHIS2 2.15  tracker ?
2. Is there Person Identifier in New version 2.15?
3. What is mean by Tracked entity  in new version 2.15?

 Regards
 Sumudu

 ___
 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




 --
 Thank you and Kind Regards
 *Immarcqulate. A (Emma Kassy) *

 *You miss 100% of the shots you don't take.*

 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net

Re: [Dhis2-devs] [Dhis2-users] Data Element/Indicators Dictionary

2014-05-20 Thread sumudu weerasinghe
Hi channara,
I am also confuse with the data dictionary in DHIS2, no idea. But in new  DHIS
2 Demo - Sierra Leone site there is good example of data dictionary  .
Follow this url
http://apps.dhis2.org/apps//datadictionary_app_v1_0_jan//index.html



On Tue, Apr 8, 2014 at 3:47 PM, channara rin rin.chann...@gmail.com wrote:

 HI all users,
 I confuse in DHIS2 has Data Dictionary.But seem mean not like i think. Any
 body know how can put Indicators' difinition, how to calculate, example
 into DHIS2.

 Thank you
 CHANNARA

 ___
 Mailing list: https://launchpad.net/~dhis2-users
 Post to : dhis2-us...@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-users
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] I cannot See my data

2014-05-20 Thread Bismarck Owusu
Dear Users and Developers,
I cannot see my data when i do pivot table and at the data visualizer despite 
the fact that i have updated my data mart.  When i go back to the data entry 
form am able to see all the data but when i try to do data pivot table and 
other reports the data does not show up. So please i need your help.
Thanks
Bismarck
 
 
Adusei Owusu Bismarck (MSc. Mathematics)
Monitoring  Evaluation Specialist
Management Science for Health
Accra, Ghana.
Mobile: +233 244995963
Email: obiz...@yahoo.com or 
  badu...@msh.org
Skype: bismarckadusei
___
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] Tracker - Identification number

2014-05-20 Thread sumudu weerasinghe
Dear All,
I want to create a psychiatric patient identification number as

   - it should contain initial code indicating org unit , program, and year
   - number need to be generate by system without manual entering




   1. Is it possible in DHIS2 2.15  tracker ?
   2. Is there Person Identifier in New version 2.15?
   3. What is mean by Tracked entity  in new version 2.15?

Regards
Sumudu
___
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] Problem with offline content on data entry module

2014-05-20 Thread J. Paul Mutali
Hi Thanh,

I have had the issue with the Org unit not loading, but I have realized
that it was due to outdated browsers.

*-*

*JEAN PAUL MUTALI*

Kigali - RWANDA

Skype: mutali.rw

http://mutali.rw/

If we don't learn to program, we risk being programmed ourselves... program
or be programmed

On Tue, May 20, 2014 at 10:07 AM, Ngoc Thanh Nguyen 
thanh.hispviet...@gmail.com wrote:

 Hi everyone

 We are suffering heavily with the localstorage problem in data entry
 module.
 When user login for the first time, the orgunit tree can not be loaded.

 This problem is only solved when we either clear the cache of the browser
 or re-assign orgunit for the users.

 As this happened for thousands of hospitals, answering phone call for
 support for that number of users become a nightmare. Have you experienced
 something similar or any to overcome this?

 Thanh

 ___
 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] Problem with offline content on data entry module

2014-05-20 Thread Morten Olav Hansen
Thanh,

Can you give some more info. Which version of dhis2? which browser and
version? does it give you anything in the developer console?

In general dhis2 behaves a lot better in dhis 2.14/2.15 with regards to
browser storage, but there might still be some glitches here and there

--
Morten


On Tue, May 20, 2014 at 10:14 AM, J. Paul Mutali mut...@gmail.com wrote:

 Hi Thanh,

 I have had the issue with the Org unit not loading, but I have realized
 that it was due to outdated browsers.

 *-*

 *JEAN PAUL MUTALI*

 Kigali - RWANDA

 Skype: mutali.rw

 http://mutali.rw/
 
 If we don't learn to program, we risk being programmed ourselves... program
 or be programmed

 On Tue, May 20, 2014 at 10:07 AM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:

 Hi everyone

  We are suffering heavily with the localstorage problem in data entry
 module.
 When user login for the first time, the orgunit tree can not be loaded.

 This problem is only solved when we either clear the cache of the browser
 or re-assign orgunit for the users.

 As this happened for thousands of hospitals, answering phone call for
 support for that number of users become a nightmare. Have you experienced
 something similar or any to overcome this?

 Thanh

 ___
 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 15309: tei registration and enrollment - wip

2014-05-20 Thread noreply

revno: 15309
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 10:20:18 +0200
message:
  tei registration and enrollment - wip
modified:
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/registration.html
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/trackedEntityList.html


--
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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-19 14:00:19 +
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-20 08:20:18 +
@@ -162,7 +162,7 @@
 $scope.generateGridColumns = function(attributes){
 var columns = angular.copy(attributes);  
 
-//also add extra columns - orgunit for example
+//also add extra columns which are not part of attributes (orgunit for example)
 columns.push({id: 'orgUnitName', name: 'Organisation unit', type: 'string'});
 
 //generate grid column for the selected program/attributes
@@ -328,14 +328,12 @@
 $scope.trackedEntityList = [];
 $scope.attributes = AttributesFactory.getByProgram($scope.selectedProgram);
 }
-});
-
-$scope.showDashboard = function(){
-$scope.registerEntity();
-};
-
-$scope.registerEntity = function(){
+});
+
+
+$scope.registerEntity = function(showDashboard){
 
+//get selected entity
 var selectedTrackedEntity = '';
 if($scope.selectedProgram){
 selectedTrackedEntity = $scope.selectedProgram.trackedEntity.id;
@@ -344,6 +342,7 @@
 selectedTrackedEntity = $scope.trackedEntities.selected.id;
 }
 
+//get tei attributes and their values
 var registrationAttributes = [];
 angular.forEach($scope.attributes, function(attribute){
 if(!angular.isUndefined(attribute.value)){
@@ -352,38 +351,59 @@
 } 
 });   
 
-$scope.tei = {trackedEntity: selectedTrackedEntity, orgUnit: $scope.selectedOrgUnit.id, attributes: registrationAttributes };
-
-//Register TEI
+//prepare tei model and do registration
+$scope.tei = {trackedEntity: selectedTrackedEntity, orgUnit: $scope.selectedOrgUnit.id, attributes: registrationAttributes };   
+var teiId = '';
+
 TEIService.register($scope.tei).then(function(tei){
-if(tei.status === 'SUCCESS'){
-//check for enrollment
-if($scope.selectedProgram){
+
+if(tei.status === 'SUCCESS'){
+
+teiId = tei.reference;
+
+//registration is successful and check for enrollment
+if($scope.selectedProgram){
 //enroll TEI
-var enrollment = {trackedEntityInstance: tei.reference,
-program: $scope.selectedProgram.id,
-status: 'ACTIVE',
-dateOfEnrollment: $scope.enrollment.enrollmentDate,
-dateOfIncident: $scope.enrollment.incidentDate
-};
+var enrollment = {trackedEntityInstance: teiId,
+program: $scope.selectedProgram.id,
+status: 'ACTIVE',
+dateOfEnrollment: $scope.enrollment.enrollmentDate,
+dateOfIncident: $scope.enrollment.incidentDate
+};
 EnrollmentService.enroll(enrollment).then(function(data){
-if(data.status === 'SUCCESS'){
-$location.path('/dashboard').search({selectedEntityId: tei.reference,
-selectedProgramId: $scope.selectedProgram ? $scope.selectedProgram.id: null});   
+if(data.status != 'SUCCESS'){
+//enrollment has failed
+var dialogOptions = {
+  

Re: [Dhis2-devs] Problem with offline content on data entry module

2014-05-20 Thread Ngoc Thanh Nguyen
We use dhis2.4. This happened with all kinds of browsers: chrome, firefox,
safari.
For developer consoles, as it happened on users' machine, we did not taken
any snapshot. But from now, we try to collect that kind of information

Thanh



On Tue, May 20, 2014 at 3:18 PM, Morten Olav Hansen morte...@gmail.comwrote:

 Thanh,

 Can you give some more info. Which version of dhis2? which browser and
 version? does it give you anything in the developer console?

 In general dhis2 behaves a lot better in dhis 2.14/2.15 with regards to
 browser storage, but there might still be some glitches here and there

 --
 Morten


 On Tue, May 20, 2014 at 10:14 AM, J. Paul Mutali mut...@gmail.com wrote:

 Hi Thanh,

 I have had the issue with the Org unit not loading, but I have realized
 that it was due to outdated browsers.

 *-*

 *JEAN PAUL MUTALI*

 Kigali - RWANDA

 Skype: mutali.rw

 http://mutali.rw/
 
 If we don't learn to program, we risk being programmed ourselves... program
 or be programmed

 On Tue, May 20, 2014 at 10:07 AM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:

 Hi everyone

  We are suffering heavily with the localstorage problem in data entry
 module.
 When user login for the first time, the orgunit tree can not be loaded.

 This problem is only solved when we either clear the cache of the
 browser or re-assign orgunit for the users.

 As this happened for thousands of hospitals, answering phone call for
 support for that number of users become a nightmare. Have you experienced
 something similar or any to overcome this?

 Thanh

 ___
 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] Problem with offline content on data entry module

2014-05-20 Thread Morten Olav Hansen
That sounds weird. Could you try:
SERVERdhis-web-dataentry/getMetaData.action

and run the output through http://jsonlint.com/ ? just to make sure the
json is valid, sometimes a bad indicator or something might mess up the
output (although it doesn't seem like this is the problem here).

It would really help if you can give me the output from the developer
console it hard to debug without it.

--
Morten


On Tue, May 20, 2014 at 11:36 AM, Tien De Nguyen dent.j...@gmail.comwrote:

 Hi Morten,

 Here is screeen shot of dataentry form. The dataset combobox always
 loading...

 Sometime problem is resolved when we clear browser cache,  reassigne user
 to other orgunit or create new user with the same orgunit. But sometime one
 of them can not resolve problem.

 I also try to update the newest browser version but it still loading all
 of time.
 [image: Inline image 1]

 -
 Tiến Đệ
 Mobile: 091 686 3797


 On Tue, May 20, 2014 at 4:06 PM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:


 We use dhis2.4. This happened with all kinds of browsers: chrome,
 firefox, safari.
 For developer consoles, as it happened on users' machine, we did not
 taken any snapshot. But from now, we try to collect that kind of information

 Thanh



 On Tue, May 20, 2014 at 3:18 PM, Morten Olav Hansen 
 morte...@gmail.comwrote:

 Thanh,

 Can you give some more info. Which version of dhis2? which browser and
 version? does it give you anything in the developer console?

 In general dhis2 behaves a lot better in dhis 2.14/2.15 with regards to
 browser storage, but there might still be some glitches here and there

 --
 Morten


 On Tue, May 20, 2014 at 10:14 AM, J. Paul Mutali mut...@gmail.comwrote:

 Hi Thanh,

 I have had the issue with the Org unit not loading, but I have realized
 that it was due to outdated browsers.

 *-*

 *JEAN PAUL MUTALI*

 Kigali - RWANDA

 Skype: mutali.rw

 http://mutali.rw/
 
 If we don't learn to program, we risk being programmed ourselves... program
 or be programmed

 On Tue, May 20, 2014 at 10:07 AM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:

  Hi everyone

  We are suffering heavily with the localstorage problem in data entry
 module.
 When user login for the first time, the orgunit tree can not be
 loaded.

 This problem is only solved when we either clear the cache of the
 browser or re-assign orgunit for the users.

 As this happened for thousands of hospitals, answering phone call for
 support for that number of users become a nightmare. Have you experienced
 something similar or any to overcome this?

 Thanh

 ___
 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] Problem with offline content on data entry module

2014-05-20 Thread Ngoc Thanh Nguyen
Of course, when I run on my computer, it said valid json. Let me try to
spot the affected computers that has the problem and check that.

Thanh

On Tue, May 20, 2014 at 4:45 PM, Morten Olav Hansen morte...@gmail.comwrote:

 That sounds weird. Could you try:
 SERVERdhis-web-dataentry/getMetaData.action

 and run the output through http://jsonlint.com/ ? just to make sure the
 json is valid, sometimes a bad indicator or something might mess up the
 output (although it doesn't seem like this is the problem here).

 It would really help if you can give me the output from the developer
 console it hard to debug without it.

 --
 Morten


 On Tue, May 20, 2014 at 11:36 AM, Tien De Nguyen dent.j...@gmail.comwrote:

 Hi Morten,

 Here is screeen shot of dataentry form. The dataset combobox always
 loading...

 Sometime problem is resolved when we clear browser cache,  reassigne user
 to other orgunit or create new user with the same orgunit. But sometime one
 of them can not resolve problem.

 I also try to update the newest browser version but it still loading all
 of time.
 [image: Inline image 1]

 -
 Tiến Đệ
 Mobile: 091 686 3797


 On Tue, May 20, 2014 at 4:06 PM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:


 We use dhis2.4. This happened with all kinds of browsers: chrome,
 firefox, safari.
 For developer consoles, as it happened on users' machine, we did not
 taken any snapshot. But from now, we try to collect that kind of information

 Thanh



 On Tue, May 20, 2014 at 3:18 PM, Morten Olav Hansen 
 morte...@gmail.comwrote:

 Thanh,

 Can you give some more info. Which version of dhis2? which browser and
 version? does it give you anything in the developer console?

 In general dhis2 behaves a lot better in dhis 2.14/2.15 with regards to
 browser storage, but there might still be some glitches here and there

 --
 Morten


 On Tue, May 20, 2014 at 10:14 AM, J. Paul Mutali mut...@gmail.comwrote:

 Hi Thanh,

 I have had the issue with the Org unit not loading, but I have
 realized that it was due to outdated browsers.

 *-*

 *JEAN PAUL MUTALI*

 Kigali - RWANDA

 Skype: mutali.rw

 http://mutali.rw/
 
 If we don't learn to program, we risk being programmed ourselves... 
 program
 or be programmed

 On Tue, May 20, 2014 at 10:07 AM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:

  Hi everyone

  We are suffering heavily with the localstorage problem in data
 entry module.
 When user login for the first time, the orgunit tree can not be
 loaded.

 This problem is only solved when we either clear the cache of the
 browser or re-assign orgunit for the users.

 As this happened for thousands of hospitals, answering phone call for
 support for that number of users become a nightmare. Have you experienced
 something similar or any to overcome this?

 Thanh

 ___
 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 15310: minor

2014-05-20 Thread noreply

revno: 15310
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 12:17:13 +0200
message:
  minor
modified:
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html


--
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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html	2014-05-16 13:58:07 +
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html	2014-05-20 10:17:13 +
@@ -10,7 +10,7 @@
 /div
 div class=page id=mainPage ng-show=selectedOrgUnit
 h1
-span ng-if='!showRegistrationDiv'
+span ng-if='showSearchDiv || !showRegistrationDiv'
 {{selectedProgram.trackedEntity.name}} {{'search'| translate}}
 /span
 span ng-if='showRegistrationDiv'

___
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] Exclude dataEntryForm Nodes From dataSets

2014-05-20 Thread Morten Olav Hansen
Can you give me the URL you are trying? also, it will only work with a list
of dataSets, not at the /api/dataSets/ID endpoint

--
Morten


On Tue, May 20, 2014 at 12:14 PM, Edwin Mulwa eddi...@gmail.com wrote:

 Hi,

 I am extracting a list of dataSets from DHIS using the Web API and I would
 like to exclude the dataEntryForm node.

 I have tried using the exclude command as explained here:

 http://www.dhis2.org/doc/snapshot/en/user/html/ch28s07.html

 but this is not working.

 Any pointers on how to make this happen is welcome.

 Thanks!

 Edwin


 ___
 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] Exclude dataEntryForm Nodes From dataSets

2014-05-20 Thread Edwin Mulwa
Hi Morten,

here is the URL:

curl -H Accept: application/xml -u admin:district 
http://apps.dhis2.org/demo/api/dataSets.xml?viewClass=detailedexclude=dataEntryFormlinks=falsepaging=false


I want ALL the dataSets and its associated dataElements but I don't want
the dataEntryForm child node included (or any other child nodes for that
matter).

Edwin



On Tue, May 20, 2014 at 1:28 PM, Morten Olav Hansen morte...@gmail.comwrote:

 Can you give me the URL you are trying? also, it will only work with a
 list of dataSets, not at the /api/dataSets/ID endpoint

 --
 Morten


 On Tue, May 20, 2014 at 12:14 PM, Edwin Mulwa eddi...@gmail.com wrote:

 Hi,

 I am extracting a list of dataSets from DHIS using the Web API and I
 would like to exclude the dataEntryForm node.

 I have tried using the exclude command as explained here:

 http://www.dhis2.org/doc/snapshot/en/user/html/ch28s07.html

 but this is not working.

 Any pointers on how to make this happen is welcome.

 Thanks!

 Edwin


 ___
 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] Exclude dataEntryForm Nodes From dataSets

2014-05-20 Thread Morten Olav Hansen
http://apps.dhis2.org/demo/api/dataSets.json?exclude=dataEntryForm (admin /
district)

This will return pages output, you can add paging=false if you want to
remove it


--
Morten


On Tue, May 20, 2014 at 1:18 PM, Edwin Mulwa eddi...@gmail.com wrote:

 Thanks Morten.

 Could you give me a sample command using JSON that I could use to achieve
 my goal?


 On Tue, May 20, 2014 at 2:07 PM, Morten Olav Hansen morte...@gmail.comwrote:

 Hi

 Only JSON is supported right now, we hope to have other renderers
 available in DHIS 2.17. When you add .xml, the include/exclude
 functionality is bypassed.

 --
 Morten


 On Tue, May 20, 2014 at 1:03 PM, Edwin Mulwa eddi...@gmail.com wrote:

 Hi Morten,

 here is the URL:

 curl -H Accept: application/xml -u admin:district 
 http://apps.dhis2.org/demo/api/dataSets.xml?viewClass=detailedexclude=dataEntryFormlinks=falsepaging=false
 

 I want ALL the dataSets and its associated dataElements but I don't want
 the dataEntryForm child node included (or any other child nodes for that
 matter).

 Edwin



 On Tue, May 20, 2014 at 1:28 PM, Morten Olav Hansen 
 morte...@gmail.comwrote:

 Can you give me the URL you are trying? also, it will only work with a
 list of dataSets, not at the /api/dataSets/ID endpoint

 --
 Morten


 On Tue, May 20, 2014 at 12:14 PM, Edwin Mulwa eddi...@gmail.comwrote:

 Hi,

 I am extracting a list of dataSets from DHIS using the Web API and I
 would like to exclude the dataEntryForm node.

 I have tried using the exclude command as explained here:

 http://www.dhis2.org/doc/snapshot/en/user/html/ch28s07.html

 but this is not working.

 Any pointers on how to make this happen is welcome.

 Thanks!

 Edwin


 ___
 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] Exclude dataEntryForm Nodes From dataSets

2014-05-20 Thread Edwin Mulwa
Thanks Morten. I'll give it a try.


On Tue, May 20, 2014 at 2:35 PM, Morten Olav Hansen morte...@gmail.comwrote:

 http://apps.dhis2.org/demo/api/dataSets.json?exclude=dataEntryForm (admin
 / district)

 This will return pages output, you can add paging=false if you want to
 remove it


 --
 Morten


 On Tue, May 20, 2014 at 1:18 PM, Edwin Mulwa eddi...@gmail.com wrote:

 Thanks Morten.

 Could you give me a sample command using JSON that I could use to achieve
 my goal?


 On Tue, May 20, 2014 at 2:07 PM, Morten Olav Hansen 
 morte...@gmail.comwrote:

 Hi

 Only JSON is supported right now, we hope to have other renderers
 available in DHIS 2.17. When you add .xml, the include/exclude
 functionality is bypassed.

 --
 Morten


 On Tue, May 20, 2014 at 1:03 PM, Edwin Mulwa eddi...@gmail.com wrote:

 Hi Morten,

 here is the URL:

 curl -H Accept: application/xml -u admin:district 
 http://apps.dhis2.org/demo/api/dataSets.xml?viewClass=detailedexclude=dataEntryFormlinks=falsepaging=false
 

 I want ALL the dataSets and its associated dataElements but I don't
 want the dataEntryForm child node included (or any other child nodes for
 that matter).

 Edwin



 On Tue, May 20, 2014 at 1:28 PM, Morten Olav Hansen morte...@gmail.com
  wrote:

 Can you give me the URL you are trying? also, it will only work with a
 list of dataSets, not at the /api/dataSets/ID endpoint

 --
 Morten


 On Tue, May 20, 2014 at 12:14 PM, Edwin Mulwa eddi...@gmail.comwrote:

 Hi,

 I am extracting a list of dataSets from DHIS using the Web API and I
 would like to exclude the dataEntryForm node.

 I have tried using the exclude command as explained here:

 http://www.dhis2.org/doc/snapshot/en/user/html/ch28s07.html

 but this is not working.

 Any pointers on how to make this happen is welcome.

 Thanks!

 Edwin


 ___
 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 1321285] [NEW] repeatable program stage not stored

2014-05-20 Thread Adebusoye Anifalaje
Public bug reported:

I just discovered that you can no longer save repeatable stages for
Tracked Entities.

To replicate the problem on the demo

1) Choose Org unit

2) Select TB program

3) For any current record, go to dashboard

4) Create new event (TB Visit), save or not (complete or not) does not
matter

5) Go back to Tracked Entity Instance management page

6) Select the same patient dashboard to see second TB visit

7) Even deleted.

This can't be good!


Version:
2.15
Build revision:
15053

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

Title:
  repeatable program stage not stored

Status in DHIS 2:
  New

Bug description:
  I just discovered that you can no longer save repeatable stages for
  Tracked Entities.

  To replicate the problem on the demo

  1) Choose Org unit

  2) Select TB program

  3) For any current record, go to dashboard

  4) Create new event (TB Visit), save or not (complete or not) does not
  matter

  5) Go back to Tracked Entity Instance management page

  6) Select the same patient dashboard to see second TB visit

  7) Even deleted.

  This can't be good!


  Version:
  2.15
  Build revision:
  15053

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1321285/+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 15311: a little timeout to ensure broadcasts are not missed between controllers

2014-05-20 Thread noreply

revno: 15311
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 15:24:54 +0200
message:
  a little timeout to ensure broadcasts are not missed between controllers
modified:
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-20 08:20:18 +
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-20 13:24:54 +
@@ -95,7 +95,7 @@
 }
 }
 }
-};
+};
 
 $scope.getProgramAttributes = function(program){ 
 $scope.trackedEntityList = null; 
@@ -122,10 +122,9 @@
 
 if($scope.selectedProgram){
 programUrl = 'program=' + $scope.selectedProgram.id;
-} 
-
-$scope.gridColumns = $scope.generateGridColumns($scope.attributes);
+}
 
+//check search mode
 if( mode === $scope.searchMode.freeText ){ 
 if(!$scope.searchText){
 $scope.emptySearchText = true;
@@ -156,9 +155,15 @@
 programUrl,
 attributeUrl.url).then(function(data){
 $scope.trackedEntityList = data;
+
+if($scope.trackedEntityList){
+$scope.gridColumns = $scope.generateGridColumns($scope.trackedEntityList.headers); 
+}  
+
 });
 };
 
+//generate grid columns from teilist attributes
 $scope.generateGridColumns = function(attributes){
 var columns = angular.copy(attributes);  
 
@@ -241,7 +246,7 @@
 
 $scope.hiddenGridColumns = 0;
 
-angular.forEach($scope.gColumns, function(gridColumn){
+angular.forEach($scope.gridColumns, function(gridColumn){
 if(!gridColumn.show){
 $scope.hiddenGridColumns++;
 }
@@ -330,7 +335,6 @@
 }
 });
 
-
 $scope.registerEntity = function(showDashboard){
 
 //get selected entity
@@ -408,12 +412,14 @@
 });
 };
 })
+
 //Controller for dashboard
 .controller('DashboardController',
 function($rootScope,
 $scope,
 $location,
 $modal,
+$timeout,
 storage,
 TEIService,  
 CurrentSelection,
@@ -439,6 +445,9 @@
 $rootScope.dashboardWidgets.smaller.push($rootScope.notesWidget);
 
 //selections
+$scope.selectedEntityId = null;
+$scope.selectedProgramId = null;
+
 $scope.selectedEntityId = ($location.search()).selectedEntityId; 
 $scope.selectedProgramId = ($location.search()).selectedProgramId; 
 $scope.selectedOrgUnit = storage.get('SELECTED_OU');
@@ -455,9 +464,11 @@
 //Fetch the selected entity
 TEIService.get($scope.selectedEntityId).then(function(data){  
 CurrentSelection.set({tei: data, pr: $scope.selectedProgram});
-
+ 
 //broadcast selected entity for dashboard controllers
-$rootScope.$broadcast('selectedEntity', {});
+$timeout(function() { 
+$rootScope.$broadcast('selectedEntity', {});
+}, 100);
 });   
 }   
 
@@ -503,10 +514,9 @@
 
 //listen for the selected entity
 $scope.$on('selectedEntity', function(event, args) { 
-
 var selections = CurrentSelection.get();
-$scope.selectedEntity = selections.tei;
-
+$scope.selectedEntity = selections.tei;
+  
 angular.forEach(storage.get('TRACKED_ENTITIES'), function(te){
 if($scope.selectedEntity.trackedEntity === te.id){
 $scope.trackedEntity = te;

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2014-05-20 08:20:18 +
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2014-05-20 13:24:54 +
@@ -238,13 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15312: Email settings, made the email from address configurable

2014-05-20 Thread noreply

revno: 15312
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 17:16:46 +0200
message:
  Email settings, made the email from address configurable
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSMTPSettingsAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSMTPSettingsAction.java
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemEmailSettings.vm


--
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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2014-05-15 16:58:37 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2014-05-20 15:16:46 +
@@ -68,6 +68,7 @@
 final String KEY_EMAIL_USERNAME = keyEmailUsername;
 final String KEY_EMAIL_PASSWORD = keyEmailPassword;
 final String KEY_EMAIL_TLS = keyEmailTls;
+final String KEY_EMAIL_SENDER = keyEmailSender;
 final String KEY_SCHEDULED_PERIOD_TYPES = keyScheduledPeriodTypes;
 final String KEY_SCHEDULED_TASKS = keySchedTasks;
 final String KEY_ORGUNITGROUPSET_AGG_LEVEL = orgUnitGroupSetAggregationLevel;
@@ -145,6 +146,8 @@
 String getEmailPassword();
 
 boolean getEmailTls();
+
+String getEmailSender();
 
 boolean accountRecoveryEnabled();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java	2014-05-08 07:37:31 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java	2014-05-20 15:16:46 +
@@ -44,6 +44,8 @@
 import org.hisp.dhis.user.UserService;
 import org.springframework.scheduling.annotation.Async;
 
+import static org.apache.commons.lang.StringUtils.defaultIfEmpty;
+
 /**
  * @author Lars Helge Overland
  */
@@ -52,7 +54,7 @@
 {
 private static final Log log = LogFactory.getLog( EmailMessageSender.class );
 private static final String FROM_ADDRESS = nore...@dhis2.org;
-private static final String FROM_NAME = DHIS2 Message [No reply];
+private static final String FROM_NAME = DHIS 2 Message [No reply];
 private static final String SUBJECT_PREFIX = [DHIS2] ;
 private static final String LB = System.getProperty( line.separator );
 
@@ -90,6 +92,7 @@
 String username = systemSettingManager.getEmailUsername();
 String password = systemSettingManager.getEmailPassword();
 boolean tls = systemSettingManager.getEmailTls();
+String from = systemSettingManager.getEmailSender();
 
 if ( hostName == null )
 {
@@ -104,7 +107,7 @@
 
 try
 {
-Email email = getEmail( hostName, port, username, password, tls );
+Email email = getEmail( hostName, port, username, password, tls, from );
 email.setSubject( SUBJECT_PREFIX + subject );
 email.setMsg( text );
 
@@ -141,12 +144,12 @@
 return null;
 }
 
-private Email getEmail( String hostName, int port, String username, String password, boolean tls )
+private Email getEmail( String hostName, int port, String username, String password, boolean tls, String sender )
 throws EmailException
 {
 Email email = new SimpleEmail();
 email.setHostName( hostName );
-email.setFrom( FROM_ADDRESS, FROM_NAME );
+email.setFrom( defaultIfEmpty( sender, FROM_ADDRESS ), FROM_NAME );
 email.setSmtpPort( port );
 email.setTLS( true );
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2014-05-15 16:58:37 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2014-05-20 15:16:46 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15313: Override annotations

2014-05-20 Thread noreply

revno: 15313
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 17:35:16 +0200
message:
  Override annotations
modified:
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/FacilityReportingServiceImpl.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-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-05-16 06:06:48 +
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-05-20 15:35:16 +
@@ -857,29 +857,6 @@
 }
 patientModel.setRelationships( relationshipList );
 
-// Set available enrollment relationships
-// ListRelationshipType enrollmentRelationshipList = new
-// ArrayListRelationshipType(
-// relationshipTypeService.getAllRelationshipTypes() );
-// Listorg.hisp.dhis.api.mobile.model.LWUITmodel.Relationship
-// enrollmentRelationshipMobileList = new
-// ArrayListorg.hisp.dhis.api.mobile.model.LWUITmodel.Relationship();
-// for ( RelationshipType enrollmentRelationship :
-// enrollmentRelationshipList )
-// {
-// org.hisp.dhis.api.mobile.model.LWUITmodel.Relationship
-// enrollmentRelationshipMobile = new
-// org.hisp.dhis.api.mobile.model.LWUITmodel.Relationship();
-// enrollmentRelationshipMobile.setId( enrollmentRelationship.getId() );
-// enrollmentRelationshipMobile.setName(
-// enrollmentRelationship.getName() );
-// enrollmentRelationshipMobile.setaIsToB(
-// enrollmentRelationship.getaIsToB() );
-// enrollmentRelationshipMobile.setbIsToA(
-// enrollmentRelationship.getbIsToA() );
-// enrollmentRelationshipMobileList.add( enrollmentRelationshipMobile );
-// }
-// patientModel.setRelationships( enrollmentRelationshipMobileList );
 return patientModel;
 }
 
@@ -1203,6 +1180,7 @@
 programsInfo += program.getId() + / + program.getName() + $;
 }
 }
+
 throw new NotAllowedException( programsInfo );
 }
 }
@@ -1401,6 +1379,7 @@
 }
 }
 
+@Override
 public CollectionTrackedEntityAttribute getPatientAtts( String programId )
 {
 CollectionTrackedEntityAttribute patientAttributes = null;
@@ -1418,6 +1397,7 @@
 return patientAttributes;
 }
 
+@Override
 public Collectionorg.hisp.dhis.api.mobile.model.PatientAttribute getAttsForMobile()
 {
 Collectionorg.hisp.dhis.api.mobile.model.PatientAttribute list = new HashSetorg.hisp.dhis.api.mobile.model.PatientAttribute();
@@ -1820,14 +1800,16 @@
 return mobilePatient;
 }
 
+// TODO remove, we cannot have state like this in a singleton
+
 private org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile;
 
-public org.hisp.dhis.api.mobile.model.LWUITmodel.Patient getPatientMobile()
+private org.hisp.dhis.api.mobile.model.LWUITmodel.Patient getPatientMobile()
 {
 return patientMobile;
 }
 
-public void setPatientMobile( org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile )
+private void setPatientMobile( org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile )
 {
 this.patientMobile = patientMobile;
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2014-05-17 12:04:42 +
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2014-05-20 15:35:16 +
@@ -61,6 +61,7 @@
 // ProgramService
 // -
 
+@Override
 public ListProgram getPrograms( OrganisationUnit unit, String localeString )
 {
 ListProgram programs = new ArrayListProgram();
@@ -73,6 +74,7 @@
 return programs;
 }
 
+@Override
 public Listorg.hisp.dhis.api.mobile.model.LWUITmodel.Program 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15314: Mobile, correct interface modifiers

2014-05-20 Thread noreply

revno: 15314
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 17:38:30 +0200
message:
  Mobile, correct interface modifiers
modified:
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/FacilityReportingService.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/IProgramService.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/NotAllowedException.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/TrackedEntityMobileSettingService.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-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java	2014-05-16 06:06:48 +
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java	2014-05-20 15:38:30 +
@@ -49,68 +49,68 @@
  */
 public interface ActivityReportingService
 {
-public ActivityPlan getCurrentActivityPlan( OrganisationUnit unit, String localeString );
-
-public ActivityPlan getAllActivityPlan( OrganisationUnit unit, String localeString );
-
-public void saveActivityReport( OrganisationUnit unit, ActivityValue activityValue, Integer programStageSectionId )
-throws NotAllowedException;
-
-public String findPatient( String name, int orgUnitId )
-throws NotAllowedException;
-
-public Patient findPatient( int patientId )
-throws NotAllowedException;
-
-public String findPatientInAdvanced( String keyword, int orgUnitId, int programId )
-throws NotAllowedException;
-
-public String saveProgramStage( ProgramStage programStage, int patientId, int orgUnitId )
-throws NotAllowedException;
-
-public Patient enrollProgram( String enrollInfo, Date incidentDate )
-throws NotAllowedException;
-
-public Collectionorg.hisp.dhis.trackedentity.TrackedEntityAttribute getPatientAtts( String programId );
-
-public CollectionPatientAttribute getAttsForMobile();
-
-public CollectionPatientAttribute getPatientAttributesForMobile( String programId );
-
-public Patient addRelationship( Relationship enrollmentRelationship, int orgUnitId )
-throws NotAllowedException;
-
-public Program getAllProgramByOrgUnit( int orgUnitId, String programType )
-throws NotAllowedException;
-
-public Program findProgram( String programInfo )
-throws NotAllowedException;
-
-public Patient findLatestPatient()
-throws NotAllowedException;
-
-public Integer savePatient( Patient patient, int orgUnitId, String programId )
-throws NotAllowedException;
-
-public String findLostToFollowUp( int orgUnitId, String programId )
-throws NotAllowedException;
-
-public Notification handleLostToFollowUp( LostEvent lostEvent )
-throws NotAllowedException;
-
-public Patient generateRepeatableEvent( int orgUnitId, String eventInfo )
-throws NotAllowedException;
-
-public String saveSingleEventWithoutRegistration( ProgramStage programStage, int orgUnitId )
-throws NotAllowedException;
-
-public String sendFeedback( Message message )
-throws NotAllowedException;
-
-public CollectionUser findUser( String keyword )
-throws NotAllowedException;
-
-public String sendMessage( Message message )
+ActivityPlan getCurrentActivityPlan( OrganisationUnit unit, String localeString );
+
+ActivityPlan getAllActivityPlan( OrganisationUnit unit, String localeString );
+
+void saveActivityReport( OrganisationUnit unit, ActivityValue activityValue, Integer programStageSectionId )
+throws NotAllowedException;
+
+String findPatient( String name, int orgUnitId )
+throws NotAllowedException;
+
+Patient findPatient( int patientId )
+throws NotAllowedException;
+
+String findPatientInAdvanced( String keyword, int orgUnitId, int programId )
+throws NotAllowedException;
+
+String saveProgramStage( ProgramStage programStage, int patientId, int orgUnitId )
+throws NotAllowedException;
+
+Patient enrollProgram( String enrollInfo, Date incidentDate )
+throws NotAllowedException;
+
+Collectionorg.hisp.dhis.trackedentity.TrackedEntityAttribute getPatientAtts( String programId );
+
+CollectionPatientAttribute getAttsForMobile();
+
+

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15315: Mobile, correct interface modifiers

2014-05-20 Thread noreply

revno: 15315
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 17:39:34 +0200
message:
  Mobile, correct interface modifiers
modified:
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/NotAllowedException.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-mobile/src/main/java/org/hisp/dhis/api/mobile/NotAllowedException.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/NotAllowedException.java	2014-05-20 15:38:30 +
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/NotAllowedException.java	2014-05-20 15:39:34 +
@@ -64,7 +64,7 @@
 this.reason = reason;
 }
 
-String getReason()
+public String getReason()
 {
 return reason;
 }

___
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 15316: Unused method

2014-05-20 Thread noreply

revno: 15316
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 17:42:40 +0200
message:
  Unused method
modified:
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java
  
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.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-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java	2014-05-20 15:38:30 +
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java	2014-05-20 15:42:40 +
@@ -56,9 +56,6 @@
 void saveActivityReport( OrganisationUnit unit, ActivityValue activityValue, Integer programStageSectionId )
 throws NotAllowedException;
 
-String findPatient( String name, int orgUnitId )
-throws NotAllowedException;
-
 Patient findPatient( int patientId )
 throws NotAllowedException;
 

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-05-20 15:35:16 +
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-05-20 15:42:40 +
@@ -416,39 +416,6 @@
 }
 
 @Override
-public String findPatient( String keyword, int orgUnitId )
-throws NotAllowedException
-{
-CollectionTrackedEntityInstance patients = attValueService.getTrackedEntityInstance( null, keyword );
-
-if ( patients.size() == 0 )
-{
-throw NotAllowedException.NO_BENEFICIARY_FOUND;
-}
-
-CollectionTrackedEntityAttribute displayAttributes = attributeService
-.getTrackedEntityAttributesDisplayInList();
-String resultSet = ;
-
-for ( TrackedEntityInstance patient : patients )
-{
-resultSet += patient.getId() + /;
-String attText = ;
-for ( TrackedEntityAttribute displayAttribute : displayAttributes )
-{
-
-TrackedEntityAttributeValue value = attValueService.getTrackedEntityAttributeValue( patient,
-displayAttribute );
-attText += value +  ;
-}
-attText = attText.trim();
-resultSet += attText + $;
-}
-
-return resultSet;
-}
-
-@Override
 public String saveProgramStage( org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStage mobileProgramStage,
 int patientId, int orgUnitId )
 throws NotAllowedException

___
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] Alerts...

2014-05-20 Thread Jerome Shaguy
Hi Friends...

Would appreciate some help with this: I am trying to create an alert. I
have a data element called Low Threshold... Values for low stocks will be
captured into this element. I have another Calculated element called stock
on hand, I need the Validation rule to check stock on hand and compare it
to Stock threshold and send out an alert; where stock on hand is lower than
the threshold... Any ideas anyone?
___
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 15317: more interaction in tei dashboard widgets such as editing, enrolling, event creation... - WIP

2014-05-20 Thread noreply

revno: 15317
committer: Abyot Asalefew Gizaw aby...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 17:56:10 +0200
message:
  more interaction in tei dashboard widgets such as editing, enrolling, event 
creation... - WIP
modified:
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/dataentry.html
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/enrollment.html
  
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/profile.html


--
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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json	2014-05-19 11:33:07 +
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json	2014-05-20 15:56:10 +
@@ -26,7 +26,8 @@
 next: Next,
 last: Last,
 dashboard: Go to Dashboard,
-edit: Edit Entity,
+edit: Edit,
+edit_profile: Edit profile,
 association: Manage Associations,
 change_location: Manage Location,
 details_history: Details/History,
@@ -35,6 +36,7 @@
 add_new: Add new,
 new_event: New event,
 create_new_event: Create new event,
+create_new_event_repeatable: Create new event from a repeatable stage,
 close_search: Close search,
 search_attributes: Search attributes,
 available_search_attributes: Available search attributes,
@@ -78,6 +80,7 @@
 registration_error: Error in registration,
 category: Category,
 entity_type: Entity type,
+save: Save,
 save_and_add_new: Save and add new,
 save_and_go_back: Save and go back,
 save_and_continue: Save and continue,

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-20 13:24:54 +
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-20 15:56:10 +
@@ -507,6 +507,7 @@
 
 //attributes for profile
 $scope.attributes = {};
+$scope.editProfile = false;
 
 angular.forEach(storage.get('ATTRIBUTES'), function(attribute){
 $scope.attributes[attribute.id] = attribute;
@@ -522,7 +523,23 @@
 $scope.trackedEntity = te;
 }
 }); 
+
+$scope.entityAttributes = angular.copy($scope.selectedEntity.attributes);
 });
+
+$scope.showEdit = function(){
+  $scope.editProfile = !$scope.editProfile; 
+};
+
+$scope.save = function(){
+
+$scope.editProfile = !$scope.editProfile;
+};
+
+$scope.cancel = function(){
+$scope.selectedEntity.attributes = $scope.entityAttributes;  
+$scope.editProfile = !$scope.editProfile;
+};
 })
 
 //Controller for the enrollment section
@@ -540,6 +557,7 @@
 //programs for enrollment
 $scope.enrollments = [];
 $scope.programs = []; 
+$scope.showEnrollmentDiv = false;
 
 $scope.selectedOrgUnit = storage.get('SELECTED_OU');
 
@@ -601,6 +619,10 @@
 }
 };
 
+$scope.showEnrollment = function(){
+console.log('Enrollment', $scope.selectedEntity, ' ', $scope.selectedProgram);
+};
+
 $scope.enroll = function(){
 console.log('Enrollment', $scope.selectedEntity, ' ', $scope.selectedProgram);
 };
@@ -622,9 +644,14 @@
 
 //listen for the selected items
 $scope.$on('dataentry', function(event, args) {  
+
+var today = moment();
+today = Date.parse(today);
+today = $filter('date')(today, '-MM-dd');
 
 $scope.currentEvent = null;
-
+$scope.allowEventCreation = false;
+$scope.repeatableStages = [];
 $scope.dhis2Events = [];   
 
 $scope.selectedEntity = args.selectedEntity;
@@ -642,7 +669,7 @@
 
 console.log('need to create new ones:  ', $scope.selectedEnrollment);
 
-if($scope.selectedEnrollment.status == 'ACTIVE'){
+

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15318: SmsMessageSender, simplified logic

2014-05-20 Thread noreply

revno: 15318
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:18:06 +0200
message:
  SmsMessageSender, simplified logic
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/SmsMessageSender.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-core/src/main/java/org/hisp/dhis/sms/SmsMessageSender.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/SmsMessageSender.java	2014-03-18 08:10:10 +
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/SmsMessageSender.java	2014-05-20 16:18:06 +
@@ -32,8 +32,10 @@
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.message.MessageSender;
@@ -48,8 +50,6 @@
 
 /**
  * @author Nguyen Kim Lai
- * 
- * @version SmsSender.java 10:29:11 AM Apr 16, 2013 $
  */
 public class SmsMessageSender
 implements MessageSender
@@ -57,6 +57,7 @@
 private static final Log log = LogFactory.getLog( SmsMessageSender.class );
 
 private static int MAX_CHAR = 160;
+private static final String GW_BULK = bulk_gw;
 
 // -
 // Dependencies
@@ -88,83 +89,67 @@
 {
 String message = null;
 
-if ( outboundSmsTransportService == null || outboundSmsTransportService.getGatewayMap() == null || !outboundSmsTransportService.isEnabled() )
+MapString, String gatewayMap = outboundSmsTransportService != null ? outboundSmsTransportService.getGatewayMap() : null;
+
+String gatewayId = StringUtils.trimToNull( outboundSmsTransportService.getDefaultGateway() );
+
+if ( gatewayMap == null || gatewayId == null || !outboundSmsTransportService.isEnabled() )
 {
-message = No gateway;
-return message;
+return No gateway;
 }
 
 SetUser toSendList = new HashSetUser();
 
-String gatewayId = outboundSmsTransportService.getDefaultGateway();
-
-if ( gatewayId != null  !gatewayId.trim().isEmpty() )
-{
-if( !forceSend )
-{
-for ( User user : users )
-{
-if ( currentUserService.getCurrentUser() != null )
-{
-if ( !currentUserService.getCurrentUser().equals( user ) )
-{
-if ( isQualifiedReceiver( user ) )
-{
-toSendList.add( user );
-}
-}
-}
-else if ( currentUserService.getCurrentUser() == null )
-{
-if ( isQualifiedReceiver( user ) )
-{
-toSendList.add( user );
-}
-}
-}
-}
-else
-{
-toSendList.addAll( users );
-}
-
-SetString phoneNumbers = null;
-
-phoneNumbers = getRecipientsPhoneNumber( toSendList );
-
-text = createMessage( subject, text, sender );
-
-// Bulk is limited in sending long SMS, need to cut into small
-// pieces
-if ( outboundSmsTransportService.getGatewayMap().get( bulk_gw ) != null
- outboundSmsTransportService.getGatewayMap().get( bulk_gw ).equals( gatewayId ) )
-{
-// Check if text contain any specific unicode character
-for ( char each : text.toCharArray() )
-{
-if ( !Character.UnicodeBlock.of( each ).equals( UnicodeBlock.BASIC_LATIN ) )
-{
-MAX_CHAR = 40;
-break;
-}
-}
-if ( text.length()  MAX_CHAR )
-{
-ListString splitTextList = new ArrayListString();
-splitTextList = splitLongUnicodeString( text, splitTextList );
-for ( String each : splitTextList )
-{
-if ( !phoneNumbers.isEmpty()  phoneNumbers.size()  0 )
-{
-message = sendMessage( each, phoneNumbers, gatewayId );
-}
-}
-  

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15319: Unused code

2014-05-20 Thread noreply

revno: 15319
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:20:35 +0200
message:
  Unused code
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.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-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-16 15:26:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:20:35 +
@@ -75,30 +75,6 @@
 CollectionTrackedEntityInstance getRepresentatives( TrackedEntityInstance instances );
 
 /**
- * Search the number of entityInstances who registered into an organisation
- * unit
- * 
- * @param organisationUnit Organisation unit
- * 
- * @return The number of entityInstances
- */
-//int countListTrackedEntityInstanceByOrgunit( OrganisationUnit organisationUnit );
-
-/**
- * Get the number of entityInstances who registered into a certain
- * organisation unit and enrolled into a program with active status
- * 
- * @param organisationUnit Organisation unit where entityInstances
- *registered
- * @param program Program. It's is used for getting attributes of this
- *program and put attribute values of entityInstances into the
- *result
- * 
- * @return The number of entityInstances
- */
-//int countGetTrackedEntityInstancesByOrgUnitProgram( OrganisationUnit organisationUnit, Program program );
-
-/**
  * Search entityInstances by phone number (performs partial search)
  * 
  * @param phoneNumber The string for searching by phone number
@@ -110,17 +86,6 @@
 CollectionTrackedEntityInstance getByPhoneNumber( String phoneNumber, Integer min, Integer max );
 
 /**
- * Search entityInstances who enrolled into a program with active status
- * 
- * @param program Program
- * @param min
- * @param max
- * 
- *return List of entityInstances
- */
-//CollectionTrackedEntityInstance getByProgram( Program program, Integer min, Integer max );
-
-/**
  * Validate entity-instances attribute values and validation criteria by
  * program before registering / updating information
  * 

___
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 15320: Tracker, removed unused methods

2014-05-20 Thread noreply

revno: 15320
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:30:51 +0200
message:
  Tracker, removed unused methods
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceDeletionHandler.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.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-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-16 15:26:10 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-20 16:30:51 +
@@ -89,6 +89,7 @@
  * /pre
  * 
  * @author Abyot Asalefew Gizaw
+ * @author Lars Helge Overland
  */
 public interface TrackedEntityInstanceService
 {
@@ -266,13 +267,4 @@
  * @return ValidationCriteria object which is violated
  */
 ValidationCriteria validateEnrollment( TrackedEntityInstance entityInstance, Program program, I18nFormat format );
-
-/**
- * Get entityInstances by {@link TrackedEntity}
- * 
- * @param trackedEntity {@link TrackedEntity}
- * 
- * @return List of entityInstance
- */
-CollectionTrackedEntityInstance getTrackedEntityInstances( TrackedEntity trackedEntity );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:20:35 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:30:51 +
@@ -111,24 +111,4 @@
  * @return ValidationCriteria object which is violated
  */
 ValidationCriteria validateEnrollment( TrackedEntityInstance entityinstance, Program program, I18nFormat format );
-
-/**
- * Validate instances attribute values and validation criteria by program
- * before registering / updating information
- * 
- * @param searchText The value of a TrackedEntityAttribute
- * @param attributeId The id of a TrackedEntityAttribute
- * 
- * @return TrackedEntityInstance list
- */
-CollectionTrackedEntityInstance getByAttributeValue( String searchText, int attributeId, Integer min, Integer max );
-
- /**
- * Get entityInstances by {@link TrackedEntity}
- * 
- * @param trackedEntity {@link TrackedEntity}
- * 
- * @return List of entityInstance
- */
-CollectionTrackedEntityInstance get( TrackedEntity trackedEntity );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java	2014-05-16 15:26:10 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java	2014-05-20 16:30:51 +
@@ -669,13 +669,11 @@
 
 for ( ProgramStageInstance programStageInstance : programStageInstances )
 {
-grid.addRow();
-grid.addValue(  );
-grid.addValue(  );
+grid.addRow().addEmptyValues( 2 );
 
 grid.addRow();
 grid.addValue( programStageInstance.getProgramStage().getName() );
-grid.addValue(  );
+grid.addEmptyValues( 1 );
 
 // -
 // due-date  report-date

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-16 15:26:10 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-20 16:30:51 +
@@ -606,10 +606,4 @@
 {
 return trackedEntityInstanceStore.validateEnrollment( instance, 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15321: Tracker, removed unused code

2014-05-20 Thread noreply

revno: 15321
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:40:25 +0200
message:
  Tracker, removed unused code
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java
  
dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.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-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:30:51 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:40:25 +
@@ -75,17 +75,6 @@
 CollectionTrackedEntityInstance getRepresentatives( TrackedEntityInstance instances );
 
 /**
- * Search entityInstances by phone number (performs partial search)
- * 
- * @param phoneNumber The string for searching by phone number
- * @param min
- * @param max
- * 
- * @return List of instances
- */
-CollectionTrackedEntityInstance getByPhoneNumber( String phoneNumber, Integer min, Integer max );
-
-/**
  * Validate entity-instances attribute values and validation criteria by
  * program before registering / updating information
  * 

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-05-20 16:30:51 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-05-20 16:40:25 +
@@ -421,25 +421,6 @@
 return getQuery( hql ).setEntity( representative, instance ).list();
 }
 
-@Override
-@SuppressWarnings( unchecked )
-public CollectionTrackedEntityInstance getByPhoneNumber( String phoneNumber, Integer min, Integer max )
-{
-Criteria criteria = getCriteria();
-criteria.createAlias( attributeValues, attributeValue );
-criteria.createAlias( attributeValue.attribute, attribute );
-criteria.add( Restrictions.eq( attribute.valueType, TrackedEntityAttribute.TYPE_PHONE_NUMBER ) );
-criteria.add( Restrictions.like( attributeValue.value, phoneNumber ) );
-
-if ( min != null  max != null )
-{
-criteria.setFirstResult( min );
-criteria.setMaxResults( max );
-}
-
-return criteria.list();
-}
-
 public String validate( TrackedEntityInstance instance, Program program, I18nFormat format )
 {
 if ( instance.getAttributeValues() != null  instance.getAttributeValues().size()  0 )

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java	2014-05-16 15:26:10 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java	2014-05-20 16:40:25 +
@@ -38,7 +38,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.program.ProgramInstanceService;
 import org.hisp.dhis.program.ProgramService;
-import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
 import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValueService;
 import org.hisp.dhis.validation.ValidationCriteriaService;
 import org.junit.Test;
@@ -158,33 +157,4 @@
 
 assertEquals( 2, entityInstanceStore.getRepresentatives( entityInstanceB1 ).size() );
 }
-
-@Test
-public void testGetByPhoneNumber()
-{
-entityInstanceStore.save( entityInstanceA1 );
-entityInstanceStore.save( entityInstanceB1 );
-
-TrackedEntityAttribute attribute = createTrackedEntityAttribute( 'C' );
-attribute.setValueType( TrackedEntityAttribute.TYPE_PHONE_NUMBER );
-attributeService.addTrackedEntityAttribute( attribute );
-
-TrackedEntityAttributeValue attributeValue = createTrackedEntityAttributeValue( 'A', entityInstanceA1,
-attribute );
-attributeValue.setValue( 123456789 );
-attributeValueService.addTrackedEntityAttributeValue( attributeValue );
-
- 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15322: TrackedEntityInstance, moved method from store to service layer

2014-05-20 Thread noreply

revno: 15322
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:53:40 +0200
message:
  TrackedEntityInstance, moved method from store to service layer
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.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-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-20 16:30:51 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-20 16:53:40 +
@@ -101,7 +101,7 @@
 
 public static final int ERROR_ENROLLMENT = 2;
 
-public static final String SAPERATOR = _;
+public static final String SEPERATOR = _;
 
 /**
  * Returns a grid with tracked entity instance values based on the given

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:40:25 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-20 16:53:40 +
@@ -33,10 +33,9 @@
 import java.util.Map;
 
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
-import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.program.Program;
-import org.hisp.dhis.validation.ValidationCriteria;
+import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
 
 /**
  * @author Abyot Asalefew Gizaw
@@ -75,29 +74,12 @@
 CollectionTrackedEntityInstance getRepresentatives( TrackedEntityInstance instances );
 
 /**
- * Validate entity-instances attribute values and validation criteria by
- * program before registering / updating information
- * 
- * @param entityinstance TrackedEntityInstance object
- * @param program Program which person needs to enroll. If this parameter is
- *null, the system check attribute values of the instances
- * @param format I18nFormat
- * 
- * @return Error code 0 : Validation is OK 1_duplicate-value : The
- * attribute value is duplicated 2_validation-criteria-id :
- * Violate validation criteria of the program
- */
-String validate( TrackedEntityInstance entityinstance, Program program, I18nFormat format );
-
-/**
- * Validate entity-instance enrollment
- * 
- * @param entityinstance TrackedEntityInstance object
- * @param program Program which person needs to enroll. If this parameter is
- *null, the system check identifiers of the patient
- * @param format I18nFormat
- * 
- * @return ValidationCriteria object which is violated
- */
-ValidationCriteria validateEnrollment( TrackedEntityInstance entityinstance, Program program, I18nFormat format );
+ * Returns null if valid, a descriptive, non-null string if invalid.
+ * 
+ * @param instance
+ * @param attributeValue
+ * @param program
+ * @return
+ */
+String validate( TrackedEntityInstance instance, TrackedEntityAttributeValue attributeValue, Program program );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-20 16:30:51 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-20 16:53:40 +
@@ -598,12 +598,91 @@
 @Override
 public String validateTrackedEntityInstance( TrackedEntityInstance instance, Program program, I18nFormat format )
 {
-return trackedEntityInstanceStore.validate( instance, program, format );
+if ( program != null )
+{
+ValidationCriteria validationCriteria = validateEnrollment( instance, program, format );
+
+if ( validationCriteria != null )
+{
+return TrackedEntityInstanceService.ERROR_ENROLLMENT + 

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 15323: Typo

2014-05-20 Thread noreply

revno: 15323
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:55:16 +0200
message:
  Typo
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.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-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-20 16:53:40 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-20 16:55:16 +
@@ -101,7 +101,7 @@
 
 public static final int ERROR_ENROLLMENT = 2;
 
-public static final String SEPERATOR = _;
+public static final String SEPARATOR = _;
 
 /**
  * Returns a grid with tracked entity instance values based on the given

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-20 16:53:40 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-20 16:55:16 +
@@ -604,7 +604,7 @@
 
 if ( validationCriteria != null )
 {
-return TrackedEntityInstanceService.ERROR_ENROLLMENT + TrackedEntityInstanceService.SEPERATOR
+return TrackedEntityInstanceService.ERROR_ENROLLMENT + TrackedEntityInstanceService.SEPARATOR
 + validationCriteria.getId();
 }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-05-20 16:53:40 +
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-05-20 16:55:16 +
@@ -41,6 +41,7 @@
 import static org.hisp.dhis.trackedentity.TrackedEntityInstanceQueryParams.ORG_UNIT_ID;
 import static org.hisp.dhis.trackedentity.TrackedEntityInstanceQueryParams.TRACKED_ENTITY_ID;
 import static org.hisp.dhis.trackedentity.TrackedEntityInstanceQueryParams.TRACKED_ENTITY_INSTANCE_ID;
+import static org.hisp.dhis.trackedentity.TrackedEntityInstanceService.*;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -448,13 +449,12 @@
 criteria.add( Restrictions.eq( programInstance.program, program ) );
 }
 
-Number rs = (Number) criteria.setProjection(
-Projections.projectionList().add( Projections.property( attribute.id ) ) ).uniqueResult();
+Number rs = (Number) criteria.setProjection( Projections.projectionList().add( 
+Projections.property( attribute.id ) ) ).uniqueResult();
 
 if ( rs != null  rs.intValue()  0 )
 {
-return TrackedEntityInstanceService.ERROR_DUPLICATE_IDENTIFIER
-+ TrackedEntityInstanceService.SEPERATOR + rs.intValue();
+return ERROR_DUPLICATE_IDENTIFIER + SEPARATOR + rs.intValue();
 }
 }
 

___
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 15324: Unused imports

2014-05-20 Thread noreply

revno: 15324
committer: Lars Helge Overland larshe...@gmail.com
branch nick: dhis2
timestamp: Tue 2014-05-20 18:56:12 +0200
message:
  Unused imports
modified:
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java
  
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java
  
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2014-05-14 15:14:18 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java	2014-05-20 16:56:12 +
@@ -28,8 +28,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
@@ -41,7 +48,6 @@
 import org.hisp.dhis.event.EventStatus;
 import org.hisp.dhis.i18n.I18nManager;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramInstance;
@@ -64,14 +70,8 @@
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.Assert;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 /**
  * @author Morten Olav Hansen morte...@gmail.com

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java	2014-05-13 08:03:15 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java	2014-05-20 16:56:12 +
@@ -28,6 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.hisp.dhis.attribute.Attribute;
 import org.hisp.dhis.chart.Chart;
 import org.hisp.dhis.common.BaseDimensionalObject;
@@ -79,16 +85,9 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.validation.ValidationCriteria;
 import org.hisp.dhis.validation.ValidationRule;
 import org.hisp.dhis.validation.ValidationRuleGroup;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
 /**
  * @author Morten Olav Hansen morte...@gmail.com
  */

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java	2014-05-12 08:45:52 +
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java	2014-05-20 16:56:12 +
@@ -28,16 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.MapperFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.dataformat.xml.XmlMapper;
-import 

[Dhis2-devs] [Bug 1321285] Re: repeatable program stage not stored

2014-05-20 Thread Adebusoye Anifalaje
As a follow up to the bug reported on repeatable program stages not
being stored, I have realised from the aggregation query results that
the data from the repeated program stage is actually not lost or
deleted, it's just not visible. So this is probably a more accurate
description.

** Summary changed:

- repeatable program stage not stored
+ repeatable program stage not visible in Tracker Dashboard

** Summary changed:

- repeatable program stage not visible in Tracker Dashboard
+ repeated program stage not visible in Tracker Dashboard

** Description changed:

  I just discovered that you can no longer save repeatable stages for
  Tracked Entities.
  
  To replicate the problem on the demo
  
  1) Choose Org unit
  
  2) Select TB program
  
  3) For any current record, go to dashboard
  
  4) Create new event (TB Visit), save or not (complete or not) does not
  matter
  
  5) Go back to Tracked Entity Instance management page
  
  6) Select the same patient dashboard to see second TB visit
  
- 7) Even deleted.
+ 7) Event deleted.
  
  This can't be good!
- 
  
  Version:
  2.15
  Build revision:
  15053

** Description changed:

  I just discovered that you can no longer save repeatable stages for
  Tracked Entities.
  
  To replicate the problem on the demo
  
  1) Choose Org unit
  
  2) Select TB program
  
  3) For any current record, go to dashboard
  
  4) Create new event (TB Visit), save or not (complete or not) does not
  matter
  
  5) Go back to Tracked Entity Instance management page
  
  6) Select the same patient dashboard to see second TB visit
  
- 7) Event deleted.
+ 7) Event not visible.
  
- This can't be good!
  
  Version:
  2.15
  Build revision:
  15053

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

Title:
  repeated program stage not visible in Tracker Dashboard

Status in DHIS 2:
  New

Bug description:
  I just discovered that you can no longer save repeatable stages for
  Tracked Entities.

  To replicate the problem on the demo

  1) Choose Org unit

  2) Select TB program

  3) For any current record, go to dashboard

  4) Create new event (TB Visit), save or not (complete or not) does not
  matter

  5) Go back to Tracked Entity Instance management page

  6) Select the same patient dashboard to see second TB visit

  7) Event not visible.


  Version:
  2.15
  Build revision:
  15053

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1321285/+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] Problem with offline content on data entry module

2014-05-20 Thread Ngoc Thanh Nguyen
I have tried to put this dataset as Not Allowed Offline. Do you think it
helps?
We will watch out today to see whether any hospitals call for this support




*Nguyễn Ngọc Thành*



On Wed, May 21, 2014 at 4:40 AM, Ha Thai Son hathai_...@yahoo.com wrote:

 Có cách nào xử lý nhanh hơn,
 hôm qua anh đã nhận được yêu cầu cung cấp số liệu cho Bộ rồi,
 Lần này mà không có số liệu thì không còn gì để nói nữa

 Thực tế cho thấy không thể lấy số liệu chi tiết trong thời gian ngắn trên
 phạm vi toàn quốc được.
 Tập trung hoàn thiện hệ thống báo cáo tổng hợp trước,

 Hiện vẫn rất cần em thiết kế cột Cộng dồn, về logic thì có vẻ thừa, nhưng
 thực tiễn thì rất hiệu quả,
 bất cứ thời điểm nào cũng capture được tình hình dịch bệnh,
 Mình không có tiền làm tập huấn nên để hướng dẫn cho mọi người  nhập số
 liệu tồn vào một ngày là rất khó.

 Bs. Hà Thái Sơn
 Cục Quản lý khám chữa bệnh - Bộ Y tế





 On May 20, 2014, at 16:06, Ngoc Thanh Nguyen thanh.hispviet...@gmail.com
 wrote:


 We use dhis2.4. This happened with all kinds of browsers: chrome, firefox,
 safari.
 For developer consoles, as it happened on users' machine, we did not taken
 any snapshot. But from now, we try to collect that kind of information

 Thanh



 On Tue, May 20, 2014 at 3:18 PM, Morten Olav Hansen morte...@gmail.comwrote:

 Thanh,

 Can you give some more info. Which version of dhis2? which browser and
 version? does it give you anything in the developer console?

 In general dhis2 behaves a lot better in dhis 2.14/2.15 with regards to
 browser storage, but there might still be some glitches here and there

 --
 Morten


 On Tue, May 20, 2014 at 10:14 AM, J. Paul Mutali mut...@gmail.comwrote:

 Hi Thanh,

 I have had the issue with the Org unit not loading, but I have realized
 that it was due to outdated browsers.

 *-*

 *JEAN PAUL MUTALI*
 Kigali - RWANDA
 Skype: mutali.rw

 http://mutali.rw/
 
 If we don't learn to program, we risk being programmed ourselves... program
 or be programmed

 On Tue, May 20, 2014 at 10:07 AM, Ngoc Thanh Nguyen 
 thanh.hispviet...@gmail.com wrote:

 Hi everyone

  We are suffering heavily with the localstorage problem in data entry
 module.
 When user login for the first time, the orgunit tree can not be loaded.

 This problem is only solved when we either clear the cache of the
 browser or re-assign orgunit for the users.

 As this happened for thousands of hospitals, answering phone call for
 support for that number of users become a nightmare. Have you experienced
 something similar or any to overcome this?

 Thanh

 ___
 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] Screenshots of data entry module - could not load the orgtree

2014-05-20 Thread Ngoc Thanh Nguyen
Document was loaded from Application Cache with manifest
https://hny.vn/sarus/dhis-web-commons/cacheManifest.action index.action:1
Application Cache Checking event index.action:1
Application Cache NoUpdate event index.action:1
Uncaught TypeError: Cannot read property 'transaction' of undefined
dhis2.storage.idb.js?_rev=13700:244
Application Cache Checking event index.action:1
Application Cache NoUpdate event index.action:1
event.returnValue is deprecated. Please use the standard
event.preventDefault() instead.
___
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-core] Calendar / DatePicker updates

2014-05-20 Thread Jim Grace
Excellent, thanks Morten.


On Tue, May 20, 2014 at 7:50 AM, Morten Olav Hansen morte...@gmail.comwrote:

 Hi guys

 As you have probably noticed, I have been working on implementing support
 for a more generic calendar in DHIS 2 (to support my ongoing work to have
 the Nepali calendar supported).

 This work is happening in branch
 https://code.launchpad.net/~dhis2-devs-core/dhis2/localized-calendar (I
 hope to have it merged soon).

 What is working:
 - Calendar and date format can be set in general settings - calendar
 - Data entry is updated to show proper local dates, will be converted to
 iso periods when saved
 - Add/edit orgUnit opening/closed date is using localized date picker

 To have this working, I have implemented:

 Java:
 - A new Calendar interface with multiple implementations
 - A new CalendarService which gives you current calendar and current date
 format

 JavaScript:
 - A new Period generator has been implemented which uses the system
 calendar to generate periods
 - A new localized date picker have been implemented which uses system
 generator

 If you use main.vm to bootstrap your page, you can use these two new
 global variables:
 dhis2.period.generator
 dhis2.period.picker

 And you can find more information about the API in dhis2.period.js (in
 commons)

 What I need from you guys:
 - If you want to get todays date, please use calendar.today(), and not jdk
 Calendar / Date since these are not localized
 - For any kind of date / calendar manipulation, please use calendar again
 (it has plusDays, plusWeeks etc)
 - If you use jquery ui date picker, please use the global date picker
 instead
 - When saving dates to the database, please convert to iso first
 (calendar.toIso), and convert to local when getting values out
 (calendar.fromIso)

 Jan: for extjs, please have a look at how the extjs date picker can be
 customized, you should be able to use the generator, but I'm not sure about
 the date picker..

 For 2.16 I think we will stop at input, all outputs will be implemented in
 2.17

 Please, if you have any questions / bug reports, please write directly and
 I will have a look

 --
 Morten

 --
 Mailing list: https://launchpad.net/~dhis2-devs-core
 Post to : dhis2-devs-core@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs-core
 More help   : https://help.launchpad.net/ListHelp


-- 
Mailing list: https://launchpad.net/~dhis2-devs-core
Post to : dhis2-devs-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs-core
More help   : https://help.launchpad.net/ListHelp