[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] GnuMed/Archive // patient object
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] GnuMed/Archive // patient object |
Date: |
Mon, 20 Jan 2003 14:18:14 +0100 |
User-agent: |
Mutt/1.3.22.1i |
> If we would rely on a gobal variable to figure out which patient is the
> current one, ... how would we prevent safely inconsitency across modules? Not
> possible, IMHO.
I would have thought that upon being changed to another
patient the curr_patient objects notifies all registered
interested parties about its change of state via the
messenger/dispatcher.
If we don't use a "global object" at all for the patient we
loose most benefits of caching commonly accessed data. That
object may life in a broker of sorts, sure, but that still
makes it global albeit with more explicit synchronisation.
> - define a variable private to the module
> - define a callback function that registers interest in change of current
> patient with the messenger
> - this callback function then modifies that variable
>
> However, this approach has one flaw: if the current patient changes *while*
> the routine that makes use of the current patient obtained via variable is
> active, it would remain blissfully ignorant of that fact unless it polls for
> changes of the variable.
Well, of course would it do that ! That's what that variable
would be for after all ! Also note, the patient isn't
"obtained via variable" but rather "obtained WHEN variable
indicates change".
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
- Re: [Gnumed-devel] GnuMed/Archive // patient object, (continued)
- Re: [Gnumed-devel] GnuMed/Archive // patient object, Horst Herb, 2003/01/19
- Re: [Gnumed-devel] GnuMed/Archive // patient object, Ian Haywood, 2003/01/20
- Re: [Gnumed-devel] GnuMed/Archive // patient object, Karsten Hilbert, 2003/01/20
- Re: [Gnumed-devel] GnuMed/Archive // patient object, Karsten Hilbert, 2003/01/20
- Re: [Gnumed-devel] GnuMed/Archive // patient object, Horst Herb, 2003/01/20
- Re: [Gnumed-devel] GnuMed/Archive // patient object, Karsten Hilbert, 2003/01/20
- Re: [Gnumed-devel] GnuMed/Archive // patient object,
Karsten Hilbert <=
Re: [Gnumed-devel] GnuMed/Archive // patient object, Karsten Hilbert, 2003/01/30