gnumed-devel
[Top][All Lists]
Advanced

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

[Gnumed-devel] Might ref.consumable substances need to allow an amount o


From: Jim Busser
Subject: [Gnumed-devel] Might ref.consumable substances need to allow an amount of zero?
Date: Sat, 03 Sep 2011 20:52:41 -0700

Some allergy testing (diagnostic) preparations are rated as having a strength 
of 0 units per mL. This makes sense when it would be the "base" against which 
other "live" products are tested. This explains 3 out of the 4 records from the 
Health Canada / FreeDiams records that failed (out of 6355).

1. shall the constraint be dropped from v16, or is it better to keep it, and 
simply let it be dropped by those having gm-dbo access (who have a sane reason 
to add such records)?

2. in terms of how (technically) to drop temporarily, I imagine I can borrow 
from

        
[...]/git/gnumed/gnumed/gnumed/server/sql/v14-v15/dynamic/v15-ref-consumable_substance-dynamic.sql

alter table ref.consumable_substance drop constraint ref_consumable_sane_amount 
cascade;

-- and, when finished:

alter table ref.consumable_substance
        add constraint ref_consumable_sane_amount
                check (amount > 0);

3. I am still learning about cascade … I was understanding it to be the action 
desired when a foreign key was attempted to be deleted, therefore can I be 
helped to understand its role above?

-- Jim




reply via email to

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