gnumed-devel
[Top][All Lists]
Advanced

[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: Karsten Hilbert
Subject: Re: [Gnumed-devel] Re: GNUmed substance schema was Re: GNUmed and FreeDiams
Date: Tue, 4 Jan 2011 09:04:59 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Jan 03, 2011 at 03:18:21PM -0800, Jim Busser wrote:

> Whoa! Where did the v15 drug-related tables go to…
> 
>       ref.table.lnk-substance2brand

ref.lnk_substance2brand

>       clin.table.active-substance

gone

>       ref.table.consumable-substance

ref.consumable_substance

>       ref.table.branded-drug

ref.branded_drug

> - a source file could usefully (?) contain, where brand 2 is a combo drug, 
> something like
> 
> brand1name, +- brand1atc, external_code, external_code_type, substance1Name, 
> substanceStrength, substanceUnits, +- substanceATC
> brand2name, +- brand1atc, external_code, external_code_type,  substance1Name, 
> substanceStrength, substanceUnits, +- substanceATC
> brand2name, +- brand1atc, external_code, external_code_type,  substance2Name, 
> substanceStrength, substanceUnits, +- substanceATC
> 
> --> from this, we could populate the table
> 
>       ref.consumable.substances
> 
> with
> 
>       SELECT DISTINCT substanceName, strength, units
> 
> and then update (where substanceATC was available in source)
> 
>       UPDATE ref.consumable.substances
>       SET atc…
> 
> --> then populate the table branded-drug
> 
>       SELECT DISTINCT brandName, brandATC, external_code, external_code_type
> 
> --> then create links between
> 
>       branded-drug
>       consumable.substances
> 
>       where branded-drug keyed to source table links to
>               consumable.substances keyed to source table

Sounds about right.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

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