dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04634
Re: Greetings + new DHIS patient module
2010/3/4 Bob Jolliffe <bobjolliffe@xxxxxxxxx>
> I agree depending on the uniqueness of names is not a good idea. I
> saw John said that facilities in India do have codes - the 16 digit
> ones which are built hierarchicly (is that a word?).
>
OK I wasn't aware of this code.. Certainly if we could generate a string
based on the orgunit code plus its ancestors it will be unique. How does one
generate a fixed-length alphanumeric string based on this sequence of names
btw?
>
> Is it possible to for a patient id to continue this hierarchy so that
> a patient might have say a 6-8 digit local identifier - preferably
> Base30 as I see Saptarshi has just chimed in. But his
> "fully-qualified" id would be the 16 digit one + the local part. I
> can see that generation and allocation of these might be problematic
> and the internal uuid might be a good (if expensive) failsafe. How
> does openmrs deal with this? Saptarshi, is at as you have suggested?
> I would be a bit concerned that management of a pool of ids strikes me
> as something which could easily fall apart. Isn't it better to
> generate them on demand from some random source and test for
> uniqueness before inserting into the database? If its not unique then
> it simply tries another till its happy?
>
> Bob
>
>
> 2010/3/4 Lars Helge Øverland <larshelge@xxxxxxxxx>:
> >
> >
> > Been chatting a bit with John and he expressed concern about the
> > orgunit-randomnumber apprach. In India there are multiple installations
> and
> > one cannot know for sure that an orgunit name will be unique. How do we
> deal
> > with this?
> > Using a globally unique identifier could be a solution, but the standard
> > Java implementation (UUID) uses 32 characters and is a bit long. Is
> > implementing our own, shorter one an option?
> >
> > Lars
> >
> >
>
Follow ups
References