gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Re: Medication viewing


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Re: Medication viewing
Date: Fri, 30 Oct 2009 17:05:58 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Oct 30, 2009 at 03:47:16PM +0100, Karsten Hilbert wrote:

>       (case
>               when csi.started is null then false
>               -- from here on csi.started cannot be null
>               when csi.started > current_timestamp is True then false
>               -- from here on csi.started must be < current_timestamp and not 
> null
>               when is_long_term is True then true
>               -- from here on csi.is_long_term must be false or null
>               when (csi.started + csi.duration > current_timestamp) is True 
> then true
>               when (csi.started + csi.duration < current_timestamp) is True 
> then false
>               -- from here on csi.duration must be null
>               else null
>       end) as is_currently_active::boolean

.started would be .clin_when, of course

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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