← Back to team overview

dhis2-devs team mailing list archive

Re: Shortname too short

 

On Fri, Apr 17, 2009 at 5:09 PM, Saptarshi Purkayastha <sunbiz@xxxxxxxxx>wrote:

> When importing dataelements, it becomes a problem that shornames have to be
>> both unique AND max 25 characters. I think we should loosen the second
>> requirement in the db. It must be up to the users to make their shortnames
>> sufficiently short, not a db constraint.
>>
> I disagree, it makes more sense to keep it the way it is... a reason its
> called short name ;-)
> and building boundaries on the data model is a best practice of sorts.
>

Yes, that is exactly why we made it the way it is.

Some other solution may just be able to solve the problem??
>

Let me describe the issue in some more detail: We want to import a database
which has 3000 data elements (survey questions), most of them considerably
longer than 25 characters, and many very similar, often differing mainly in
a few characters at the end. Shortname is restricted to be required, unique
and 25 characters. One possibility is to just use the dataelementid as
shortname, but that of course would mean it is completely useless, just a
filler to enable data to be imported.

We are now putting a high priority on import (of hierarchies, data elements,
and data) from a spreadsheet, and the import process could perhaps contain
intelligence suggesting possible shortnames, but it is quite hard to come up
with something generic that will make sense in most cases. One strategy is
to just take the 25 first characters of the name, and if the result exists
already, substitute a number for the last two characters (alternatively do
this for all). This is sort of workable, but it would in that case be
desirable to also mark the data element so that someone can go through
manually afterwards.

Another option would be to the uniquenesscheck in the spreadsheet first - or
go through all dataelements with length over 25 characters manually before
importing. It is actually easier to do it in the spreadsheet than in DHIS 2
- but we don't have that import functionality yet.

Knut




>
> ---
> Regards,
> Saptarshi PURKAYASTHA
> Director R & D, HISP India
> Health Information Systems Programme
>
> My Tech Blog:  http://sunnytalkstech.blogspot.com
> You Live by CHOICE, Not by CHANCE
>
>
>> Knut
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-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

Follow ups

References