gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Getting Canadian drug data into FreeDiams
Date: Fri, 19 Feb 2010 22:47:56 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Feb 19, 2010 at 12:30:39PM -0800, Jim Busser wrote:

> Attached are two scripts. By running from the command line
> 
>       sh fetch_dpd.sh
> 
> This will
> - download source Canada files to the working directory
> - inflate them
> - substitute CSV into pipe-delimited which sqlite better parses

Tab-delimited ?

> - call sqlite and get it to
> -   create tables and import DPD data
> -   create FreeDiams tables
> - insert what data is easily inserted into the FreeDiams schema
> - keeps safe drugs.db (if in the directory) --> drugs.orig
> - copies the dpd.db to make a new drugs.db
> - exits sqlite

A few suggestions:

It would be useful to either have 3 scripts or 3
commandline options to the script that

1) download the data
2) create the dpd.db
3) install the dpd.db as drugs.db (and safekeep the original)

I would improve drugs.orig to $timestamp-drugs.db.bak

> FreeDiams seems presently usable if it lacks the column
data to which it is accustomed. The above scripts did not
fully solve to select from more-fully normalized (but
non-unique) Canadian data into the FreeDiams schema.

Just nitpicking: uniqueness is only a function of
normalization where it removes redundancy. Since the
non-unique records carry *different* information about the
same drug they don't automatically fall fould of
normalization (but they do because - AFAICT - they don't
ONLY carry non-redundant information plus a foreign key).

Well done !

This could well get included with FreeDiams as additional
helper scripts even if not otherwise integrated with the
application.

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]