|
From: | Busser, Jim |
Subject: | Re: [Gnumed-devel] Medication lists - Duration - Started |
Date: | Tue, 6 Aug 2013 21:58:26 +0000 |
On 2013-07-29, at 12:48 PM, Karsten Hilbert <address@hidden> wrote:Until this issue is within GNUmed resolved, can I OK, I have removed this constraint in my v18 test database to see what happens:
ALTER TABLE clin.substance_intake ALTER COLUMN clin_when DROP NOT NULL;
Dropping the constraint does not, in and of itself, create a problem. I can still likely add and edit medications (untested), provided I did not actually try setting the dates to null in either the GUI or through psql..
OTOH if I *try* to set the values for clin_when to null (say, for Kirk's MetoPharm) within the Medication plugin,
- the null values are in fact saved, but …
- the Medication plugin immediately generates an unhandled exception trying to display the medication
- this persists even with a restart of the client
- MetoPharm however *does* still show in the Overview plugin, CAVE …
- its tooltip, when clin_when is NULL, will rely on modified_when and will report
Started … 2013 Aug 6 (see Screenshot)
If I then go into psql and re-set the start dates for both components of MetoPharm (which are part of encounter 1) to be 100 days ago:
update clin.substance_intake set clin_when = now()- interval '100 days' where fk_encounter =1;
the the tooltip immediately refreshes to display
Started: 2013 Apr 28
and although the Medication plugin did throw an exception when I immediately switched to it, a restart of the client found the Medication plugin to be again happy.
So... if there will be agreement to allow clin_when to be null, then the GUI will also need adjusting to support the display, edit and set-back of "Started" to NULL. I do agree it should still default to the current date, except without the time portion.
-- Jim
![]() |
[Prev in Thread] | Current Thread | [Next in Thread] |