gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] recalls


From: Horst Herb
Subject: Re: [Gnumed-devel] recalls
Date: Sun, 18 Jul 2004 11:47:40 +1000
User-agent: KMail/1.6.2

On Sun, 18 Jul 2004 10:44, Karsten Hilbert wrote:
> > > Where in the schema is recall data stored?
> >
> > It isn't. (yet)
> >
> > One table should do it,
>
> But we'd first need to define what we expect from it.

gnumed-mini has recalls:

create table clinical.recall(
        id serial primary key,
        id_responsible integer references addr.person default -1,
        id_patient integer references addr.person default NULL,
        id_encounter integer references clinical.encounter default NULL,
        urgency integer check(urgency>=0 and urgency<4) default 0,
        deadline_date date default NULL,
        deadline_time time default NULL,
        reason text,
        id_code integer references clinical.codes default NULL,
        done_date date default NULL,
        done_time time default NULL,
        done_by integer references addr.person default NULL,
        done_comment text
)inherits (clinical.root);

id_responsible can be -1 (= nobody) for practical reasons (=whole clinic is 
responsible)
id_patient can be -1 (= nobody) for general reminders (like send out annual 
vaccination invitation)
id_encounter can be NULL since not all recalls are related to a specific 
encounter
with urgency, I decided to keep it simple. 0=non urgent, 3 = most urgent

id_code needs some explanation: gnumed-mini has a "code container" where *any* 
type of code can be stored, and a foreign key points to 
clinical.coding_system telling me whether it is a disease code, a pathology 
code or whatever. VERY handy for recalls etc. but also handy if you use a 
variety of coding systems for studies etc.

Horst




reply via email to

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