gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Medication tweaks


From: Jim Busser
Subject: Re: [Gnumed-devel] Medication tweaks
Date: Mon, 20 Jun 2011 19:58:42 -0700

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

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) 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), 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;

?? and after the above, would views such as the following need repairing, or would they auto-refresh

clin.v_pat_substance_intake

-- Jim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]