gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] clin_episode constraint affecting input


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] clin_episode constraint affecting input
Date: Tue, 21 Sep 2004 01:54:10 +0200
User-agent: Mutt/1.3.22.1i

> >clin_episode_fk_health_issue_key unique btree (fk_health_issue, 
> >description)
> 
> this constraint stops entering several episodes of say "cough" in the 
> episode description for say the "xxxDEFAULTxxx"
> or the "cystic fibrosis" health issue, even in different encounters.
You are right. There may exist several episodes named (perhaps
not very aptly) "cough" even within a single health
issue/problem. Dropped. The other unique constraint
(fk_patient/description) exhibits the same nonsense thinking.
Dropped, too.

One might/should add a partial unique index on that, however,
which enforces unique descriptions per patient where
fk_health_issue is Null ...  Not sure how to do that, though.
It isn't strictly justifiable on clinical grounds but does
enforce "better" practice since it may be hard to quickly and
precisely separate those 5 "cough" episodes over the last 7
years that were never linked to any health issue (for good
reason). This may hold true for issue-linked "cough"s, too,
after all, as they are likely to be linked to the same health
issue. Hm. Well, it's a user problem so let's drop the
constraint for now.

> From the recent posts, this may be dropped by schema 
> restructuring ?
That too, eventually.

> I'm uploading a (pre-alpha) version of the web client that does the 
> structured input of health issues, clin episodes and clin narratives. 
> (insert only, no re-editing after commit yet ; shameless plugging to get 
> user feedback ).  I came across this constraint when trying to get data 
> in with blank episode description fields.
Not a good idea, do generate a name for it, say "dummy episode XXX"
where "XXX" is replaced by some random string. Humans usually
don't deal well with fake data they cannot even "see", eg.
whitespace.

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]