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 20:17:06 -0700

On 2011-06-20, at 5:38 AM, Karsten Hilbert wrote:

> The (SQL) format I used for vbanaits list can be seen here:
> 
>       
> http://gitorious.org/gnumed/gnumed/blobs/master/gnumed/gnumed/server/sql/v14-v15/fixups/v15-ref-consumable_substance-data-vbanait.sql


If it is possible and desirable to provide an atc_code where available, can the 
form (where it is not available) be a pair of single quotes without any content 
for example

        ''

permitting the following, or must the INSERT statements for those drugs which 
lack an ATC code remove the atc_code from the SQL statement?

INSERT INTO ref.consumable_substance (
        description,
        amount,
        unit,
        atc_code
)       SELECT
                'amoxicillin'::text,
                '500'::numeric,
                'mg'::text
                ''::text
        WHERE NOT EXISTS (
                SELECT 1 FROM ref.consumable_substance
                WHERE
                        description = 'amoxicillin'
                                AND
                        amount = '500'
                                AND
                        unit = 'mg'
        );

-- Jim




reply via email to

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