[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Medication lists - Duration - Started
From: |
Busser, Jim |
Subject: |
Re: [Gnumed-devel] Medication lists - Duration - Started |
Date: |
Mon, 29 Jul 2013 17:39:40 +0000 |
On 2013-07-26, at 9:47 AM, Jim Busser <address@hidden> wrote:
> 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?
This existing requirement for me to input, in the case of medications initiated
*outside* the praxis, by some *outside* clinician, months or years ago,
clin_when (date started)
is continuing to prove highly frustrating for the sense of risk that it
creates around perpetuating within (and flowing outside) the praxis this
pseudo-accurate information ...
Until this issue is within GNUmed resolved, can I
1) remove the constraint clin_when NOT NULL, and
2) at my next GNUmed database upgrade,
replace all missing values for clin_when with January 1, 1900
reapply the constraint
perform the upgrade
remove the constraint
replace all values for clin_when with NULL where clin_when = January 1,
1900
?
-- 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, 2013/07/26
- Re: [Gnumed-devel] Medication lists - Duration - Started,
Busser, Jim <=
- 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