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 23:10:12 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Jan 04, 2011 at 01:53:37PM -0800, Jim Busser wrote:

> >> *But* the column ref.lnk_substance2brand.pk *will* resolve it --- provided 
> >> the user *bothered* to specify/distinguish the Brand, right?
> > 
> > It may technically resolve it but it will mostly be wrong.
> > If you want to find the brand of a substance intake you need
> > to look at fk_drug_component rather than at fk_substance.
> 
> I was confirming whether
> 
>       in table clin.substance_intake
> 
> the value
> 
>       ref.lnk_substance2brand.pk
> 
> should resolve it, only I referred to it incorrectly as the column 
> 
>       fk_drug_component
> 
> when in fact ref.lnk_substance2brand.pk is the *FKEY* for the column 
> 
>       fk_drug_component
> 
> but in either case, given FK enforcement, then provided
> 
>       fk_drug_component is NOT NULL
> 
> then the correct BRAND will be identifiable (with its external_code e.g. 
> Canadian UID and external_code_type e.g. "FreeDiams::CA_HCDPD") ??

If you follow this chain:

clin.substance_intake.fk_drug_component
 -> ref.lnk_substance2brand.pk
 -> ref.lnk_substance2brand.fk_drug
  -> ref.branded_drug.pk

you will indeed arrive at the brand the patient is thought
to be taking (provided
clin.substance_intake.fk_drug_component is not null).

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]