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: Tue, 21 Jun 2011 21:39:37 -0700

On 2011-06-21, at 1:41 AM, Karsten Hilbert wrote:

> 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.


Questions on how to fit the above into a wider plan…

1) is it a reasonable generalization that any IT support who would (on behalf 
of a praxis) install a drug pack -- when such a drug pack is intended to 
replace records in the reference file -- may desire to prune out all substances 
that are not in use by a patient

i.e. an improved and more complete -- and tested -- version of what I began 
above (but which instead preserves already-used consumable substances), could 
form one among a number of "maintenance" scripts or sql files just like 
gm-remove_person.sh

2) what determines whether resources like "drug pruners" would be provided as 
.sh or as .sql ?

        .sh is run from the command line ?
        .sql may be called
                … by a shell script and/or
                … from inside something like psql ??

3) shall we put future drug packs (when they would be country-specific) under

        /server/sql/country.specific

and, when not country specific (or when 'generic' as what vaibhav provided) into

        /server/sql/country.nonspecific

-- Jim


reply via email to

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