[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Medication tweaks
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Medication tweaks |
Date: |
Tue, 21 Jun 2011 10:41:38 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jun 20, 2011 at 07:58:42PM -0700, Jim Busser wrote:
> If desiring to replace all existing drugs in
>
> ref.consumable_substance
>
> one must first (presumably) delete all which might be linked to the above, in
> for example
>
> ref.branded_drug
> ref.lnk_substance2brand
Yes.
> and -- before even doing this -- one must be willing to delete all cases
> where the drug is currently used with a patient (for example Kirk)
One could just not delete those which are in use.
> and so, *provided* there is complete certainty that there
> is no clinical data needed for any patients in the
> production database (in which Kirk's record might still
> live),
This assumption does not help the next time you would want
to update your list.
> can one do
>
> set default_transaction_read_only to off;
> DELETE FROM clin.lnk_substance2episode;
> DELETE FROM clin.substance_intake;
> DELETE FROM ref.consumable_substance;
> DELETE FROM ref.lnk_substance2brand;
> DELETE FROM ref.branded_drug;
> DELETE FROM ref.consumable_substance;
>
> and does the above then need a
>
> commit;
>
> ??
No, because it did not start with a BEGIN, which it should,
in which case it would.
> and after the above, would views such as the following
> need repairing
No, views are virtualy. They are but a query definition
with a name.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
- [Gnumed-devel] Medication tweaks, Jim Busser, 2011/06/17
- Re: [Gnumed-devel] Medication tweaks, Karsten Hilbert, 2011/06/17
- Re: [Gnumed-devel] Medication tweaks, Karsten Hilbert, 2011/06/17
- Re: [Gnumed-devel] Medication tweaks, Rogerio Luz Coelho, 2011/06/18
- Re: [Gnumed-devel] Medication tweaks, Jim Busser, 2011/06/22
- Re: [Gnumed-devel] Medication tweaks, Karsten Hilbert, 2011/06/22
- Re: [Gnumed-devel] Medication tweaks, Jim Busser, 2011/06/22
- Re: [Gnumed-devel] Medication tweaks, Karsten Hilbert, 2011/06/22
- Re: [Gnumed-devel] Medication tweaks, Jim Busser, 2011/06/20
- Re: [Gnumed-devel] Medication tweaks, Karsten Hilbert, 2011/06/21
- Re: [Gnumed-devel] Medication tweaks, Jim Busser, 2011/06/20
- Re: [Gnumed-devel] Medication tweaks, Karsten Hilbert, 2011/06/21