gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] I need some help


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] I need some help
Date: Thu, 6 Jul 2006 12:29:34 +0200
User-agent: Mutt/1.5.11+cvs20060403

On Wed, Jul 05, 2006 at 11:12:07AM +0300, Peter Damoc wrote:

> I'm trying to implement a patient management software for our practice,
> something kinda like GNUMed but much simpler
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

> I want to provide input access from multiple location in our clinic AND I
> need to find a way for this database to be mobile and by mobile I mean
> several notebooks that should somehow keep a copy of the central database
> and allow the doctor to work in another location, without connection to
> central server and with full access to all data up to the point where the
> last "update" was made. When the doctors return to the main clinic there
> should be some kind of mechanism to resync with the main database that might
> have been modified in the meantime.

As much as I hate to say this those two statements are
contradictory. Synchronization is never easy and simple.

We have only the basic concurrency protection and still
people find it hard to deal with (I agree it would be much
desirable to have simpler code).

But to add my thoughts:

> I'm trying to implement a patient management software for our practice,
> something kinda like GNUMed but much simpler, only some patient data and
> photos.
It's quite easy to use GNUmed in the 0.2 version for "just
some patient data and photos". Incidentally, that's the
exact purpose of that release. It doesn't do any of the
fancy distributed stuff you want out of the box.

If you want to approach this on your own: You might be able
to simplify the sync problem by this pattern:

Have a master database at your master site. Have slave
databases on the laptops. Sync those two via Slony
(PostgreSQL replication).

When a laptop is on the master site have it work against the
master database. It's slave database will be in sync via
Slony.

When the laptop is off-site make it *read* data from the
synced slave database which is a snapshot of the master from
the time of disconnect. Have all *writes* go into a second
schema in that database and reference the existing data from
it.



Or have a three schema database:

master                addon

        access

- "master" and "addon" have the same schema implemented in tables
- access has the the schema but implemented in views
- "master" on the master site will sync with Slony to "master" on the laptops

All queries always go to "access".

On the master site "access" will use rules to write directly
to "master".

On the laptops "access" will use rules to read from the
local "master" or "addon" (whichever has the newer data) and
write to the local "addon".

If laptops are at the master site they will connect to
"access" on the master database. Thereby they will write
directly to "master" on the master site.

If they are offsite they connect to their local copy of
"access" and thereby will read from the local "master" and
write to their local "addon".

If you then come back to the master site you have all the
additions nicely singled out in the local "addon" database
and could replay them into the master "master" schema.

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]