[Top][All Lists]

[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 15:47:16 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

1) .clin_when (= .started) cannot easily be null because it
   is part of clin.clin_root_item

2) subject to the above perhaps being changed later I put
   the following logic into the view over the current medication:

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

So, while we currently don't allow .clin_when to become NULL
we can still achieve a similar effect by setting it to, say,
(today + 5 years) which would also nicely document the
duration of validity of our suggestion to eventually start
said medication :-)

Now, in Germany, there's administrative obstacles with this
approach: prescriptions lose their validity 10 days from the
date of issue, narcotics even earlier than that. The patient
could work around that by seeing the pharmacist in due time
and then stocking the medication at home - shelf live of
which is then limited (legally) by expiration date and
(medically) by (typically not easily known) decay to levels
below therapeutic substance concentrations.

Anyway, so there :-)

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

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