gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Filing documents under episodes


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Filing documents under episodes
Date: Fri, 9 Aug 2013 01:13:04 +0200 (CEST)

> When a document addresses more than one problem, the current 'force' to 
> select *one* episode
> under which to attach it is contextually wrong. Not 100% wrong, just partly 
> wrong.

It is not "wrong" at all IMO but rather insufficient.

For which reason the additional table linking more episodes to documents
has been invented (but then not gotten frontend support).

A better, albeit somewhat laborious, approach would be a link table for
*every* episode (not just *other* ones) linked to a document.

The next best approach is to use an array of integers and enforce them
as FKs by way of manual triggers (which is a lot of SQL).

The final approach will be ARRAY FOREIGN KEY which is slated for PG 9.4.

> It makes more sense to file them under the encounter to which they pertain,

Thereby making them seem to the pertain to all episodes touched
upon during that encounter ?

Also, which encounter ?  The one that lead to whatever lead to
generation of the document ?  The one that the document was
first introduced to the patient-clinician interaction or the
one it was physically introduced into the database ?

Karsten



reply via email to

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