[Dhis2-users] 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

Re: [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

Re: [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.o

Re: [Dhis2-users] UID generation via URL

2013-11-18 Thread Lars Helge Øverland
Hi there, I think the uid generation feature was introduced in version 2.12. It could be that you are testing on an older DHIS 2 version. Could you check the DHIS 2 version number from the about page? regards, Lars On Fri, Nov 15, 2013 at 2:32 PM, Ferdie Botha wrote: > Hi guys - just somet