[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Consumable substances
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Consumable substances |
Date: |
Mon, 5 Sep 2011 10:51:52 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Sep 04, 2011 at 08:21:30PM -0700, Jim Busser wrote:
> Two suggestions after you would check the satisfactoriness of what I
> contributed:
This very much looks like a data pack. A few comments:
- a better name for "update_the_db()" might be "prepare_staging_area()"
- did you test update_the_db() ?
- it may be more straightforward to
- drop the staging table ignoring errors (does not exist)
(or check and drop if it exists)
- re-create the staging table
(if you don't you may end up with an existing-but-differently-columned
one)
this will also spare the truncate step
- since we are passing the SQL script to our gmPsql.py
(rather than the PostgreSQL supplied psql binary) we
UNFORTUNATELY cannot use $-quoting so far :-(
- you may want to drop the staging table when you are done
(side-note: a disinfectant with zero strength ??)
- you may need to investigate "\copy" (which
client/pycommon/gmPsql.py only partially and non-testedly
implements) over using the SQL level "copy" command (which
has certain conceptual limitations in that data files need
to live on the machine the copy is actually run on rather
than from where it is invoked - although no matter in local
installs)
- I am somewhat unsure about the meaning of ".exit" at the last-but-one line
> Therefore suggest to rename to
>
> 2011-ca-nonbranded-drugs.zip
Sure.
> 2. Suggest in data-packs.conf
>
> name = Canadian non-brand drug info 2011
>
> URL =
> http://www.gnumed.de/downloads/data/test/2011-ca-nonbranded-drugs.zip
> or
> URL =
> http://www.gnumed.de/downloads/data/drugs/2011-ca-nonbranded-drugs.zip
Sure. Let me know when you think it is ready to go up. Now's
the time to test live data packs.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
- Re: [Gnumed-devel] Consumable substances, (continued)
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/04
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/04
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/04
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/04
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/04
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/04
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05
- Re: [Gnumed-devel] Consumable substances,
Karsten Hilbert <=
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/05
- [Gnumed-devel] more data pack specification, Jim Busser, 2011/09/07
- Re: [Gnumed-devel] more data pack specification, Karsten Hilbert, 2011/09/07
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Jim Busser, 2011/09/05
- Re: [Gnumed-devel] Consumable substances, Karsten Hilbert, 2011/09/05