[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Medication lists - Duration
From: |
Busser, Jim |
Subject: |
Re: [Gnumed-devel] Medication lists - Duration |
Date: |
Fri, 26 Jul 2013 16:47:12 +0000 |
On 2013-07-25, at 5:27 PM, Jim Busser <address@hidden> wrote:
> I very strongly think, therefore, that what we should be capturing is not
>
> "intended total duration"
>
> but
>
> 'duration into the future" = 'extension forward from now"
>
> which, in the case where we are starting the drug today, is the same as the
> total duration anyway. ***But*** we need to unambiguously provide for all the
> cases where the start date was earlier than now, including when it was
> unknown and not realistically possible to identify.
On the issue of whether "started" (clin_when) must be
NOT NULL
what I get from
psql -d gnumed_v18 -U gm-dbo -c '\d clin.substance_intake'
includes
clin_when | timestamp with time zone | not null default
now()
and so while I think it is helpful to default to 'now()' which covers the case
of newly-initiated medications, I think we should remove the NOT NULL
constraint which appears to me will not affect any of the check constraints nor
triggers. In fact, the only check constraint that even touches clin_when (which
none of the triggers do) is
"discontinued_after_started" CHECK (clin_when IS NULL OR
discontinued IS NULL OR discontinued >= clin_when AND discontinued <= now())
which even contemplated the possibility of
clin_when IS NULL
so can we agree to this one, and proceed to other considerations?
-- Jim
- [Gnumed-devel] Medication lists - Duration, Busser, Jim, 2013/07/25
- Re: [Gnumed-devel] Medication lists - Duration, Busser, Jim, 2013/07/25
- Re: [Gnumed-devel] Medication lists - Duration, Busser, Jim, 2013/07/25
- Re: [Gnumed-devel] Medication lists - Duration,
Busser, Jim <=
- Re: [Gnumed-devel] Medication lists - Duration - Started, Busser, Jim, 2013/07/29
- Re: [Gnumed-devel] Medication lists - Duration - Started, Karsten Hilbert, 2013/07/29
- Re: [Gnumed-devel] Medication lists - Duration - Started, Busser, Jim, 2013/07/29
- Re: [Gnumed-devel] Medication lists - Duration - Started, Karsten Hilbert, 2013/07/29
- Re: [Gnumed-devel] Medication lists - Duration - Started, Busser, Jim, 2013/07/29