[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Re: GNUmed substance schema was Re: GNUmed and FreeDi

From: Jim Busser
Subject: Re: [Gnumed-devel] Re: GNUmed substance schema was Re: GNUmed and FreeDiams
Date: Wed, 05 Jan 2011 00:15:01 -0800

On 2011-01-04, at 12:10 PM, Karsten Hilbert wrote:

>> why, in branded-drugs, do we need UNIQUE (description, preparation) meaning 
>> UNIQUE (brand_name, form) ?
> Hm, let me think. Likely because there's no more fields
> to sanely be unique on:
> description 
> preparation
> atc_code
> is_fake
> fk_data_source
> external_code
> external_code_type
> One *really* wants to be unique on the name itself but then
> people will complain about not being able to enter
> "Paracetamol" as tablets as well as solution or
> suppositories.

Were we agreed to update column name "description" to "brand_name" and can we 
make the table name ref.brand-drugs (in place of current ref.branded-drugs) 
because congruency will cut down errors in coding? Or does it make too much 
work to adjust the code?

Is the purpose of is_fake to allow pseudo-brands to define pseudo-combo 

I did some experimenting on uniqueness in the Canadian brand names, and even if 
I convert

        brand_name --> concat (brand_name, strength)

the Canadian brands are still not unique… only 12489 of 12756 become distinct, 
because some "generic" companies do not care to make a unique brand name, thus 
two or more manufacturers can achieve the same {brand_name, strength}. I would 
really much prefer to *not* have to make fake Brand names as concat 
(brand_name, FreeDiams unique ID) …

How about

        UNIQUE (description, preparation, external_code, external_code_type)

this way, in the absence of {external_code, external_code_type} the check falls 
equivalent to the original requirement

        UNIQUE (description, preparation)

but in the presence of {external_code, external_code_type} we can enable to 
exist a brand name / preparation distinguished by these other attributes.

-- Jim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]