← Back to team overview

dhis2-devs team mailing list archive

Re: unique codes

 

I think the only way may be to drop the code from 1.4, which neither
guarantees a code will be there or that it is unique or generate one
(a UUID for example) during import for anything which does not have a
code but does match on a name.



On Tue, Sep 6, 2011 at 6:33 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> On 6 September 2011 17:29, Knut Staring <knutst@xxxxxxxxx> wrote:
>> On Tue, Sep 6, 2011 at 6:26 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
>>>
>>> On 6 September 2011 17:01, Jason Pickering <jason.p.pickering@xxxxxxxxx>
>>> wrote:
>>> > Not sure, but it may have something to do with 1.4
>>> >
>>> > https://bugs.launchpad.net/dhis2/+bug/517047
>>> >
>>> > which includes an exchange between ourselves.
>>> >
>>> > It does not seem to make a lot of sense, other than to facilitate
>>> > imports from 1.4 where a (unique) code is not required.
>>>
>>> Alright.  That was it.  Wonder what they use code for?
>
> Well, the only options are
> (i) to drop that code on input
> (ii) postfix duplicate codes with _<Some random string>
>
> I guess either is possible.  I'm working around this for the moment,
> but would be good to meander back to unique codes soon.
>
>>
>> Whatever it is used for, I don't think that is a sufficiently good reason
>> for us to not make it unique.
>> Knut
>>
>>>
>>> >
>>> > Regards,
>>> > Jason
>>> >
>>> >
>>> > On Tue, Sep 6, 2011 at 11:24 AM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
>>> > wrote:
>>> >> Can someone point me back to the rationale for allowing non-unique
>>> >> codes for dataelements etc in the database model.  I'm struggling to
>>> >> understand this requirement.
>>> >>
>>> >> Cheers
>>> >> Bob
>>> >>
>>> >> _______________________________________________
>>> >> Mailing list: https://launchpad.net/~dhis2-devs
>>> >> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> >> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> >> More help   : https://help.launchpad.net/ListHelp
>>> >>
>>> >
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>> --
>> Cheers,
>> Knut Staring
>>
>


References