[Dhis2-devs] Fwd: user access to create program indicators

2016-09-29 Thread Dipali Sahu
Hi,, any hints will be helpful :)

-- Forwarded message --
From: Dipali Sahu 
Date: Wed, Sep 28, 2016 at 2:48 PM
Subject: user access to create program indicators
To: DHIS 2 Users list 


Hi

Is there a user access right to allow users to create/edit Program
indicators.

I have around 20 Programs and one of the user needs access only to one
program and create program indicator in it. The user is not able to 'View
program indicators' function on left clicking the program until I provide
'All' user rights to the user role.

Please advise

Thank you
Deepali
___
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] Additional Reporting Requirement (Bi-monthly and Bi-weekly)

2016-09-29 Thread Sadik Ngoa
Hi Devs,

Some of our projects require us to be able to collect and analyze data
bi-weekly and bi-monthly From the current

*Version: 2.22 *

*Build revision:22092*

We have been forced to select the "weekly" option for the bi-weekly dataset
and montly for the bi-monthly data sets.

The problem with such adjustments is that they make time graphs virtually
impossible; if for example I use a weekly period for the bi-weekly data
set, but fill in data only every other week, then when I plot the data over
time, every two weeks the line is going to drop down to zero, then zoom
back up the next week, making it unreadable.

Our request is have these reporting periods (Bi-weekly and Bi-monthly). If
so is it possible to be backported?

Regards,

Sadik
___
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] Fwd: user access to create program indicators

2016-09-29 Thread Elmarie Claasen
Diphali,

I have not tried it but if you give the relevant program permissions and
share the one program and all the dependencies like Attributes, Data
elements, optionsets etc with a group that user belongs to to "view and
edit" the user shohmd only be able to create program indicaors for that
program.

Elmarie

On 29 Sep 2016 17:10, "Dipali Sahu"  wrote:

> Hi,, any hints will be helpful :)
>
> -- Forwarded message --
> From: Dipali Sahu 
> Date: Wed, Sep 28, 2016 at 2:48 PM
> Subject: user access to create program indicators
> To: DHIS 2 Users list 
>
>
> Hi
>
> Is there a user access right to allow users to create/edit Program
> indicators.
>
> I have around 20 Programs and one of the user needs access only to one
> program and create program indicator in it. The user is not able to 'View
> program indicators' function on left clicking the program until I provide
> 'All' user rights to the user role.
>
> Please advise
>
> Thank you
> Deepali
>
>
> ___
> 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
>
>

-- 


*This message and any attachments are subject to a disclaimer published at 
http://www.hisp.org/policies.html#comms_disclaimer 
.  Please read the 
disclaimer before opening any attachment or taking any other action in 
terms of this electronic transmission.  If you cannot access the 
disclaimer, kindly send an email to disclai...@hisp.org 
 and a copy will be provided to you. By replying to 
this e-mail or opening any attachment you agree to be bound by the 
provisions of the disclaimer.*
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Exposing Program indicators in dataset

2016-09-29 Thread Prosper BT
Dear Team,

Just like aggregate query builder used to work, mapping queries to data
elements, what about having program indicators available when creating a
dataset.

I have seen use cases trying to assign program indicators to aggregate
indicators so they can use then in datasets for both display in aggregate
data entry and also dataset reports.

[image: Inline image 1]


-- 
Prosper Behumbiize, MPH
Global DHIS2 Implementation| HISP Uganda/University Of Oslo
+256 752 751 776 | +256 776 139 139
pros...@hispuganda.org  | pros...@dhis2.org | Skype:
prospertb
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Program translations are not working in 2.24

2016-09-29 Thread Anilkumar Kodi
Hi all,

Any Update on this?


On Tue, Sep 27, 2016 at 4:42 PM, Anilkumar Kodi 
wrote:

> To add to the same, We could see the translations in 'translation' table,
> but we're guessing it should be available in objecttranslation table and
> there should have mapping in programtranslation or programstagetranslation
> to get translations in UI.
>
> On Tue, Sep 27, 2016 at 4:31 PM, Anilkumar Kodi  > wrote:
>
>> Hi Devs,
>>
>> Translations for programs, program stages and Program Stage sections are
>> not working in DHIS 2.24 version. Even if translations exist, they're not
>> showing up on the UI. But, the same is working in trunk.  Could you help
>> fix it in 2.24 as well.
>>
>>
>> Thanks,
>> Anil Kumar Kodi.
>>
>
>
___
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] Empty page when access the "Maintenance apps"

2016-09-29 Thread gérard Bisama
Chrome version: Version 53.0.2785.92 (64-bit)

2016-09-29 12:12 GMT+00:00 Knut Staring :

> Version of Chrome?
>
> On 29 Sep 2016 1:45 p.m., "gérard Bisama"  wrote:
>
>> Hi All,
>>
>> I  can not access to the Maintenance page after building DHIS2 form the
>> launchpad source code. I have seen a bug reporting concerning this issue.
>> Has it been solved if so how to fix it.
>>
>> Thank you
>>
>> --
>> Gérard Bisama
>> Tel:+243810890810
>>
>> ___
>> 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
>>
>>


-- 
Gérard Bisama
Tel:+243810890810
___
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] Empty page when access the "Maintenance apps"

2016-09-29 Thread Knut Staring
Version of Chrome?

On 29 Sep 2016 1:45 p.m., "gérard Bisama"  wrote:

> Hi All,
>
> I  can not access to the Maintenance page after building DHIS2 form the
> launchpad source code. I have seen a bug reporting concerning this issue.
> Has it been solved if so how to fix it.
>
> Thank you
>
> --
> Gérard Bisama
> Tel:+243810890810
>
> ___
> 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] CORS: accessing HTTP from HTTPS

2016-09-29 Thread Greg Rowles
Hi Jason

I'm not clued up on server configurations but I tried swapping http to
https - it's unsupported. I was hoping there's an easy ajax header setting
i need to add. As per your suggestion - i'll ask the guys to enable https
for that server...

Kind Regards,
Greg



On Thu, Sep 29, 2016 at 1:38 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Maybe http://my-dhis2-analytics-call.json/?etc needs to be
> https://my-dhis2-analytics-call.json/?etc ?
>
> On Thu, Sep 29, 2016 at 1:09 PM, Greg Rowles 
> wrote:
>
>> Hi Devs
>>
>> Sorry, I'm running into all kinds of issues with CORS today:
>>
>> Mixed Content: The page at 'https://my-source-page.html' was loaded over
>> HTTPS, but requested an insecure XMLHttpRequest endpoint '
>> http://my-dhis2-analytics-call.json?etc'. This request has been blocked;
>> the content must be served over HTTPS.
>>
>> Any suggestions for amending my ajax call below? I'm accessing http from
>> https, guessing my headers:need to be configured correctly:
>>
>>
>>  $.ajax({
>> url: base + dxAPI,
>> headers: { "Authorization": 'Basic ' + btoa(user + ':' + pwd) },
>> timeout: 3,
>> crossDomain: true,
>> success : function(data){ ...etc
>>
>> Works wonderfully from regular HTTP.
>>
>> Regards,
>> Greg
>>
>>
>> --
>> *Health Information Systems Program - South Africa*
>> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
>> - *
>> Mobile  :073 246 2992
>> Landline:   021 851 2216
>> Skype:  gregory_rowles
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>



-- 
*Health Information Systems Program - South Africa*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :073 246 2992
Landline:   021 851 2216
Skype:  gregory_rowles
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Empty page when access the "Maintenance apps"

2016-09-29 Thread gérard Bisama
Hi All,

I  can not access to the Maintenance page after building DHIS2 form the
launchpad source code. I have seen a bug reporting concerning this issue.
Has it been solved if so how to fix it.

Thank you

-- 
Gérard Bisama
Tel:+243810890810
___
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] Connect DHIS2 development module with Postgres

2016-09-29 Thread gérard Bisama
Hi All, just want to say that I have solved the problem by creating the
config file in the current user session instead of the dhis user. It seems
to be related to the user privileges to have access to the
/home/dhis/config/dhis.conf.

Thank you

2016-09-23 12:52 GMT+00:00 gérard Bisama :

> Hi All,
>
> Thank you for your responses.
>
> I am using Ubuntu 14.04. I have done all the configurations concerning the
> DHIS2_HOME and  Java environment variables.
>
> Am not able to connect to the database.
>
> 2016-09-23 10:12 GMT+00:00 Knut Staring :
>
>> Hi Gérard,
>> What operating system are you on?
>>
>> DHIS2 will search for an environment variable called DHIS2_HOME. This will 
>> be a pointer to the folder where your
>> hibernate.properties (now better to use dhis.conf) file is located.
>>
>> For example:
>>
>> export DHIS2_HOME='/home/dhis/config'
>>
>> See the link below (search for DHIS2_HOME):
>> http://dhis2.github.io/dhis2-docs/2.24/en/implementer/html/d
>> his2_implementation_guide_full.html#d5274e948
>>
>> Knut
>>
>> On 23 Sep 2016 10:18 a.m., "gérard Bisama"  wrote:
>>
>>> Hi everyone,
>>>
>>> I am working actually on DHIS2 development and FHIR. I need to connect
>>> my development module with postgres instead of H2 but I am having issues.
>>> The instance still run on H2 even though I have followed the procedure
>>> described here https://github.com/se2/DHIS2.
>>>
>>>
>>> Thank you for your help
>>>
>>> --
>>> Gérard Bisama
>>> Tel:+243810890810
>>>
>>> ___
>>> 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
>>>
>>>
>
>
> --
> Gérard Bisama
> Tel:+243810890810
>



-- 
Gérard Bisama
Tel:+243810890810
___
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] CORS: accessing HTTP from HTTPS

2016-09-29 Thread Jason Pickering
Maybe http://my-dhis2-analytics-call.json/?etc needs to be
https://my-dhis2-analytics-call.json/?etc ?

On Thu, Sep 29, 2016 at 1:09 PM, Greg Rowles  wrote:

> Hi Devs
>
> Sorry, I'm running into all kinds of issues with CORS today:
>
> Mixed Content: The page at 'https://my-source-page.html' was loaded over
> HTTPS, but requested an insecure XMLHttpRequest endpoint '
> http://my-dhis2-analytics-call.json?etc'. This request has been blocked;
> the content must be served over HTTPS.
>
> Any suggestions for amending my ajax call below? I'm accessing http from
> https, guessing my headers:need to be configured correctly:
>
>
>  $.ajax({
> url: base + dxAPI,
> headers: { "Authorization": 'Basic ' + btoa(user + ':' + pwd) },
> timeout: 3,
> crossDomain: true,
> success : function(data){ ...etc
>
> Works wonderfully from regular HTTP.
>
> Regards,
> Greg
>
>
> --
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
> - *
> Mobile  :073 246 2992
> Landline:   021 851 2216
> Skype:  gregory_rowles
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Upgrading DHIS2 from 2.21 to 2.24 and using new exporter/importer

2016-09-29 Thread Aamer Mohammed
Hi,

For continuation of testing, we changed the metadata to ensure that a Group
can be part of only one GroupSet.
1) We got the below issue.
{"status":"ERROR","stats":{"total":1,"created":0,"updated":0,"deleted":0,"ignored":1},"typeReports":[{"klass":"org.hisp.dhis.indicator.Indicator","stats":{"total":1,"created":0,"updated":0,"deleted":0,"ignored":1},"objectReports":[{"klass":"org.hisp.dhis.indicator.Indicator","index":277,"uid":"oMbElS3lhOO","errorReports":[{"message":"Missing
required property
`numerator`.","mainKlass":"org.hisp.dhis.indicator.Indicator","errorKlass":"java.lang.String","errorCode":"E4000"}]}]}]}

which means that Numerator is required field for an indicator. This was not
the case in 2.21. This restriction was introduced in some version after
2.21. However, we modified the metadata for the indicator having this issue
and proceeded further.

2) Now we got the below issue.
{"httpStatus":"Internal Server
Error","httpStatusCode":500,"status":"ERROR","message":"ERROR: duplicate
key value violates unique constraint \"dataelement_operand_unique_key\"\n
 Detail: Key (dataelementid, categoryoptioncomboid)=(4497, 3576) already
exists."}

This means that you cannot have duplicate combination of (dataelementid,
categoryoptioncomboid) in dataelementoperand table. This constraint was not
present in 2.21 version.
When we see dataelementoperand table, there are lot of such duplicates. We
would like to understand more around this constraint and why it was
introduced.
*Is there any note which has the details about the constraints being
introduced in a DHIS version?*

3) Also this constraint (dataelement_operand_unique_key) is not present in
the instance which was upgraded from 2.21 to 2.24. But it is present in the
instance which is directly on 2.24. Any thoughts on this. Did the
constraint not get created in upgraded instance because the data was not
abiding to the constraint rules? What happens in a dhis upgrade if there is
any constraint being introduced and existing data does not confirm to the
constraint? Please suggest.


Thanks
Aamer.


On Sat, Sep 24, 2016 at 5:54 PM, Lars Helge Øverland  wrote:

> Hi Aamer,
>
> the problem here happens because the hibernate mapping between GroupSet
> and Group is one-to-many, ie. a Group can only be part of one GroupSet.
>
> There is a reason for this, but it is not very good ;) When we store
> favorites with group sets, we need to know which dimension (GroupSet) a
> dimension item (Group) is part of. If the Group is part of many GroupSets,
> we need another link object in between to represent which dimension it is
> part of. This can clearly be done and this is something we plan to fix, but
> it is a bit of work and it requires an upgrade routine to upgrade existing
> databases.
>
> So I am pretty sure that is why you see these duplicates: You have groups
> which are part of multiple group sets. In these cases, Hibernate will
> create duplicate GroupSets as a result of the database integrity issue.
>
> So short term solution is to change the metadata, long term we will fix
> this properly and allow for many-to-many between Group and GroupSet.
>
> regards,
>
> Lars
>
>
>
>
>
> On Thu, Sep 15, 2016 at 7:28 AM, Morten Olav Hansen 
> wrote:
>
>> Hi Aamer
>>
>> Lars knows what is wrong, he will provide a fix shortly :)
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Sep 15, 2016 at 12:26 PM, Aamer Mohammed > > wrote:
>>
>>> Thanks Morten. Let us know if any other details are required from our
>>> end in this regard.
>>>
>>> Thanks
>>> Aamer.
>>>
>>> On Mon, Sep 12, 2016 at 6:01 PM, Morten Olav Hansen 
>>> wrote:
>>>
 That's interesting.

 @Lars any suggestions why this happens? I guess there is something
 wrong with our mapping. Will have a look tomorrow.

 --
 Morten Olav Hansen
 Senior Engineer, DHIS 2
 University of Oslo
 http://www.dhis2.org

 On Mon, Sep 12, 2016 at 5:42 PM, Victor Garcia 
 wrote:

> Hi Morten, Sultan,
>
> I think we know the reason of duplicates: categoryOptionGroups are
> shared between categoryOptionGroupSets, for example, ">= 15" is used
> in three categoryOptionGroupSets (Paediatrics, HIV and general). In the
> API, categoryOptionGroups appear duplicated as many times as they are
> re-used.
>
> We don't know if sharing categoryOptionGroups is something to avoid,
> but it seems to be the cause of this issue.
>
> Regards,
>
> Víctor
>
> On 12 September 2016 at 09:41, Morten Olav Hansen 
> wrote:
>
>> Hi again
>>
>> Would it be possible to share your database with me? I haven't seen
>> this
>> issues anywhere else.
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of 

[Dhis2-devs] CORS: accessing HTTP from HTTPS

2016-09-29 Thread Greg Rowles
Hi Devs

Sorry, I'm running into all kinds of issues with CORS today:

Mixed Content: The page at 'https://my-source-page.html' was loaded over
HTTPS, but requested an insecure XMLHttpRequest endpoint '
http://my-dhis2-analytics-call.json?etc'. This request has been blocked;
the content must be served over HTTPS.

Any suggestions for amending my ajax call below? I'm accessing http from
https, guessing my headers:need to be configured correctly:


 $.ajax({
url: base + dxAPI,
headers: { "Authorization": 'Basic ' + btoa(user + ':' + pwd) },
timeout: 3,
crossDomain: true,
success : function(data){ ...etc

Works wonderfully from regular HTTP.

Regards,
Greg


-- 
*Health Information Systems Program - South Africa*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :073 246 2992
Landline:   021 851 2216
Skype:  gregory_rowles
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] UID generation

2016-09-29 Thread Morten Olav Hansen
A third alternative is to just get it from DHIS2 itself,

https://play.dhis2.org/dev/api/system/id.json?limit=1000
https://play.dhis2.org/dev/api/system/id.xml?limit=1000
https://play.dhis2.org/dev/api/system/id.csv?limit=1000

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Sep 29, 2016 at 5:00 PM, Arun Paul  wrote:

> Thanks Lars, Jason for the quick response !
> That solution worked for me.
>
> ​Regards
> ,
> - Arun Paul
>
> On Thu, Sep 29, 2016 at 2:55 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> If you are using Postgres to inject the data directly, you can use this
>>
>> https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/uid.sql
>>
>> Regards,
>> Jason
>>
>> On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
>> wrote:
>>
>>> In fact,  generateCode(); will do.
>>>
>>> Lars
>>>
>>>
>>> On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
>>> wrote:
>>>
 Hi Arun,

 if you are using the DHIS 2 Java service layers there is no need to
 manually generate and set UIDs. They will be automatically set before the
 object is saved.

 To generate UIDs you should use this class: 
 org.hisp.dhis.commonCodeGenerator
 -> generateCode( 11 );

 Javadoc:

 http://ci.dhis2.org/job/dhis2-2.24-javadoc/javadoc/org/hisp/
 dhis/common/CodeGenerator.html



 regards,

 Lars


 On Thu, Sep 29, 2016 at 11:17 AM, Arun Paul 
 wrote:

> Hello everyone,
>
> I am trying to import legacy data into a new DHIS2 installation using
> custom code.
>
> While adding new entries into a database table, I need to assign new
> UID values. What is the algorithm I should use to generated these IDs ? I
> tried using a postgresql extension called uuid-ossp and the
> function uuid_generate_v1() that comes with that extension. But it
> generates uuid of the format ebe87e56-8624-11e6-a4ce-040157be4e01 and
> it's bigger than what CHARACTER VARYING(11) can hold. Any idea what
> strategy should I follow here to easily generate UIDs while inserting
> database entries?
>
> Thanks in advance.
> - Arun Paul
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


 --
 Lars Helge Øverland
 Lead developer, DHIS 2
 University of Oslo
 Skype: larshelgeoverland
 l...@dhis2.org
 http://www.dhis2.org 


>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> l...@dhis2.org
>>> http://www.dhis2.org 
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+46764147049
>>
>
>
> ___
> 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] UID generation

2016-09-29 Thread Arun Paul
Thanks Lars, Jason for the quick response !
That solution worked for me.

​Regards
,
- Arun Paul

On Thu, Sep 29, 2016 at 2:55 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> If you are using Postgres to inject the data directly, you can use this
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/uid.sql
>
> Regards,
> Jason
>
> On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
> wrote:
>
>> In fact,  generateCode(); will do.
>>
>> Lars
>>
>>
>> On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
>> wrote:
>>
>>> Hi Arun,
>>>
>>> if you are using the DHIS 2 Java service layers there is no need to
>>> manually generate and set UIDs. They will be automatically set before the
>>> object is saved.
>>>
>>> To generate UIDs you should use this class: 
>>> org.hisp.dhis.commonCodeGenerator
>>> -> generateCode( 11 );
>>>
>>> Javadoc:
>>>
>>> http://ci.dhis2.org/job/dhis2-2.24-javadoc/javadoc/org/hisp/
>>> dhis/common/CodeGenerator.html
>>>
>>>
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> On Thu, Sep 29, 2016 at 11:17 AM, Arun Paul  wrote:
>>>
 Hello everyone,

 I am trying to import legacy data into a new DHIS2 installation using
 custom code.

 While adding new entries into a database table, I need to assign new
 UID values. What is the algorithm I should use to generated these IDs ? I
 tried using a postgresql extension called uuid-ossp and the
 function uuid_generate_v1() that comes with that extension. But it
 generates uuid of the format ebe87e56-8624-11e6-a4ce-040157be4e01 and
 it's bigger than what CHARACTER VARYING(11) can hold. Any idea what
 strategy should I follow here to easily generate UIDs while inserting
 database entries?

 Thanks in advance.
 - Arun Paul

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


>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> l...@dhis2.org
>>> http://www.dhis2.org 
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] UID generation

2016-09-29 Thread Jason Pickering
If you are using Postgres to inject the data directly, you can use this

https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/uid.sql

Regards,
Jason

On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
wrote:

> In fact,  generateCode(); will do.
>
> Lars
>
>
> On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
> wrote:
>
>> Hi Arun,
>>
>> if you are using the DHIS 2 Java service layers there is no need to
>> manually generate and set UIDs. They will be automatically set before the
>> object is saved.
>>
>> To generate UIDs you should use this class: org.hisp.dhis.commonCodeGenerator
>> -> generateCode( 11 );
>>
>> Javadoc:
>>
>> http://ci.dhis2.org/job/dhis2-2.24-javadoc/javadoc/org/hisp/
>> dhis/common/CodeGenerator.html
>>
>>
>>
>> regards,
>>
>> Lars
>>
>>
>> On Thu, Sep 29, 2016 at 11:17 AM, Arun Paul  wrote:
>>
>>> Hello everyone,
>>>
>>> I am trying to import legacy data into a new DHIS2 installation using
>>> custom code.
>>>
>>> While adding new entries into a database table, I need to assign new UID
>>> values. What is the algorithm I should use to generated these IDs ? I tried
>>> using a postgresql extension called uuid-ossp and the
>>> function uuid_generate_v1() that comes with that extension. But it
>>> generates uuid of the format ebe87e56-8624-11e6-a4ce-040157be4e01 and
>>> it's bigger than what CHARACTER VARYING(11) can hold. Any idea what
>>> strategy should I follow here to easily generate UIDs while inserting
>>> database entries?
>>>
>>> Thanks in advance.
>>> - Arun Paul
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-us...@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+46764147049
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] GIS Plugin Issue with Legend Set!

2016-09-29 Thread Sourabh Bhardwaj
Hi all,

I am using the GIS Plugin to generate Maps. Maps are generating fine but
there is one issue coming up with the legend set. On top of the legend set
Indicator id is coming instead of the name. Following is the screenshot for
same: [image: Inline image 2]

I have tried with predefined legend Set also. Have checked on the
documentation for plugins
http://dhis2.github.io/dhis2-docs/2.21/en/developer/html/ch01s24.html  but
didn't found anything related to filters for indicators/dataelements.

But if I generate same map from GIS Module then name is coming fine in the
legend set.

Anybody faced similar issue before with plugins?


Thanks & Regards,
Sourabh Bhardwaj.
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] UID generation

2016-09-29 Thread Lars Helge Øverland
In fact,  generateCode(); will do.

Lars


On Thu, Sep 29, 2016 at 11:23 AM, Lars Helge Øverland 
wrote:

> Hi Arun,
>
> if you are using the DHIS 2 Java service layers there is no need to
> manually generate and set UIDs. They will be automatically set before the
> object is saved.
>
> To generate UIDs you should use this class: org.hisp.dhis.commonCodeGenerator
> -> generateCode( 11 );
>
> Javadoc:
>
> http://ci.dhis2.org/job/dhis2-2.24-javadoc/javadoc/org/hisp/
> dhis/common/CodeGenerator.html
>
>
>
> regards,
>
> Lars
>
>
> On Thu, Sep 29, 2016 at 11:17 AM, Arun Paul  wrote:
>
>> Hello everyone,
>>
>> I am trying to import legacy data into a new DHIS2 installation using
>> custom code.
>>
>> While adding new entries into a database table, I need to assign new UID
>> values. What is the algorithm I should use to generated these IDs ? I tried
>> using a postgresql extension called uuid-ossp and the
>> function uuid_generate_v1() that comes with that extension. But it
>> generates uuid of the format ebe87e56-8624-11e6-a4ce-040157be4e01 and
>> it's bigger than what CHARACTER VARYING(11) can hold. Any idea what
>> strategy should I follow here to easily generate UIDs while inserting
>> database entries?
>>
>> Thanks in advance.
>> - Arun Paul
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-us...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] UID generation

2016-09-29 Thread Lars Helge Øverland
Hi Arun,

if you are using the DHIS 2 Java service layers there is no need to
manually generate and set UIDs. They will be automatically set before the
object is saved.

To generate UIDs you should use this
class: org.hisp.dhis.commonCodeGenerator -> generateCode( 11 );

Javadoc:

http://ci.dhis2.org/job/dhis2-2.24-javadoc/javadoc/org/hisp/dhis/common/CodeGenerator.html



regards,

Lars


On Thu, Sep 29, 2016 at 11:17 AM, Arun Paul  wrote:

> Hello everyone,
>
> I am trying to import legacy data into a new DHIS2 installation using
> custom code.
>
> While adding new entries into a database table, I need to assign new UID
> values. What is the algorithm I should use to generated these IDs ? I tried
> using a postgresql extension called uuid-ossp and the
> function uuid_generate_v1() that comes with that extension. But it
> generates uuid of the format ebe87e56-8624-11e6-a4ce-040157be4e01 and
> it's bigger than what CHARACTER VARYING(11) can hold. Any idea what
> strategy should I follow here to easily generate UIDs while inserting
> database entries?
>
> Thanks in advance.
> - Arun Paul
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] UID generation

2016-09-29 Thread Arun Paul
Hello everyone,

I am trying to import legacy data into a new DHIS2 installation using
custom code.

While adding new entries into a database table, I need to assign new UID
values. What is the algorithm I should use to generated these IDs ? I tried
using a postgresql extension called uuid-ossp and the
function uuid_generate_v1() that comes with that extension. But it
generates uuid of the format ebe87e56-8624-11e6-a4ce-040157be4e01 and it's
bigger than what CHARACTER VARYING(11) can hold. Any idea what strategy
should I follow here to easily generate UIDs while inserting database
entries?

Thanks in advance.
- Arun Paul
___
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] Mutiple items in CORS whitelist (v2.24)

2016-09-29 Thread Greg Rowles
Hi Devs

I'm testing API calls to a server from two different source locations (dev
& staging instances) but i'm unable to load the correct values (under
Access settings > CORS whitelist) for these calls to work from both
locations.

What are the limitations for CORS whitelist items? I've tried using a URL
separator (comma and semi-colon) but without success...

Kind Regards,
Greg

-- 
*Health Information Systems Program - South Africa*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :073 246 2992
Landline:   021 851 2216
Skype:  gregory_rowles
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] How to define data element with multiple input type ?

2016-09-29 Thread Brajesh Murari
Hello Devs,

I have a data element "Child Care Institutions (CCIs) that have submitted
quarterly report" with three different input type

1. Boolean ( Yes/No )
2. Number
3. Percentage

How should i define above data element that i can use it for capturing data
for above all the three different input types ?

-- 
Brajesh Murari
| Senior Technical Annalist | www.sdrc.co.in | Ph: (+91) -9430124938 |
Skype: brajesh.murari |
___
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