[Top][All Lists]

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

[Gnumed-devel] Starting work on gnumed->LedgerSMB gateway

From: Chris Travers
Subject: [Gnumed-devel] Starting work on gnumed->LedgerSMB gateway
Date: Sun, 26 Feb 2012 07:18:41 -0800

Hi all;

So I have started ultimate design work on the gnumed->LSMB gateway.  I have decided to follow the previous advice in trying to do the minimum required (but I would do the best I can on that) and I have a lead on a project to cover the development costs and so....

Here's my thinking:

1)  A plugin that allows the doctor to export a patient or encounter to billing.  This would copy data into an export log, mark it as un-exported, and NOTIFY GNUMED_EXPORT;

2)  A script (probably in Python just for dependency reasons) whose logic is as follows:

   * poll for NOTIFY
   * when received, try to connect to LedgerSMB database
   * If connection fails, write to a log, sleep thirty seconds, and try again, repeat until connection is had
   * Once connection is had, select every outgoing record that has not been marked as exported is selected into memory and marked as exported.
   * These are then written to the import schema for LedgerSMB
   * Run a stored procedure to turn imported records into LedgerSMB items.
   * Use 2 phase commit to ensure everything on both sides is committed

The first version would be solely a connection from gnumed to LedgerSMB.  Adding customers would be disabled and bills would come in as sales orders.  Future versions might convert sales order to invoice automatically.  Future work may include a script from LedgerSMB to go the other way too.

The idea is that this approach would work with the LSMB and gnumed db's on the same server, or the same cluster, or separated over an unreliable internet connection.

Best Wishes.
Chris Travers

reply via email to

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