← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Possibility of creating non numerical UID prefixes in tracker capture

 

Hi Aimee,

Isaiah is right re the UID format and you can find the docs here:

https://docs.dhis2.org/master/en/developer/html/webapi_system_resource.html#d0e11354

Note that the number of possible UID combinations are 5.2 x 10^19, or about
50 million trillion, so I would perhaps rather focus on generating properly
randomized UIDs and not worry so much about collisions.

best regards,

Lars







On 9 February 2018 at 02:17, Isaiah Nyabuto <isaiahnyabuto@xxxxxxxxx> wrote:

> Hi Aimee,
>
> What is the length of the UIDs? The dhis2 accepts UID length of 11 and can
> accept any other types (letters and numbers) so long as the first one is a
> letter.
>
> If you want to avoid duplication of UID, the easiest way is by generating
> them yourself using other tools or languages.
> See the following example on UID generation.
> https://github.com/jason-p-pickering/dhis2-data-munging/
> blob/master/bootstrap/bootstrap.Rmd
>
> Thank you.
> ==========================
> Isaiah Nyabuto
> +254729572616 <+254%20729%20572616>
> Bsc. Health Records Management and Informatics
>
>
> On Feb 8, 2018 16:32, "Aimee Edmondo" <aedmondo@xxxxxxxxx> wrote:
>
> Greetings all,
> In Zambia we are investigating the possibility of having sub instances of
> tracker capture that feed into a main instance, but we want to avoid the
> issue of duplicate UIDs coming from the sub instances. We were hoping to
> add a prefix onto the automatic UID generation - such as NG#######, where
> the prefix "NG" remains consistent and the numbers are automatically
> generated. We've experimented with the UID options and the system does not
> accept this pattern. Has anyone successfully done this before or have any
> ideas as to how to do this?
> Thanks,
> *Aimee Edmondo, MPH* | Informatics Associate
> aedmondo@xxxxxxxxx <acmartin@xxxxxxxxx> | +260.976.076524
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> 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
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>