[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams
From: |
Jim Busser |
Subject: |
Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams |
Date: |
Fri, 19 Feb 2010 03:12:08 -0800 |
Do you want to know something remarkable? I actually think I am close to done
(including scripts) for the current structure of FreeDiams, I only just still
have this problem populating the CIS table, as mapped at
http://wiki.gnumed.de/bin/view/Gnumed/FreeDiams
because it wants only a single record defining the drug's availability, whereas
Health Canada data provides a historical record of notices. Accordingly there
exist multiple values of
CURRENT_STATUS_FLAG
with varying ages of records, per drug. Presumably I need to make the SELECT
command ignore values *except* for the newest per drug else some way to first
delete the non-newest records per drug.
Below is where I got stuck:
INSERT INTO CIS (CIS, DENOMINATION, FORME, ADMINISTRATION, COMMERCIALISATION)
SELECT A1.DRUG_CODE, A1.BRAND_NAME, A2.PHARMACEUTICAL_FORM,
A3.ROUTE_OF_ADMINISTRATION, A4.CURRENT_STATUS_FLAG
FROM drug A1, form A2, route A3, status A4
WHERE A1.DRUG_CODE = A2.DRUG_CODE …
... also would the above fail if extended across >2 tables?
... does such a select need primary or other keys (indexing) ?
- [Gnumed-devel] Getting Canadian drug data into FreeDiams, Jim Busser, 2010/02/18
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Sebastian Hilbert, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Jim Busser, 2010/02/19
- [Gnumed-devel] Rethinking drug reference, Jim Busser, 2010/02/19
- Re: [Gnumed-devel] Rethinking drug reference, Karsten Hilbert, 2010/02/23
Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams,
Jim Busser <=
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Jim Busser, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Jim Busser, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Jim Busser, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
- Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
Message not availableRe: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Jim Busser, 2010/02/19
Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19
Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams, Karsten Hilbert, 2010/02/19