Saturday, September 26, 2009
GNUmed on Ubuntu 8.10 Intrepid Ibex
It seems quite a few people still use Ubuntu 8.10 aka Intrepid Ibex. When those users try to run GNUmed electronic medical record they are presented with a crash dialog right away.
GNUmed's crash handler catches those errors and sends them off for us to fix. So we did. Unfortunately there is no easy way to replace the broken GNUmed in Ubuntu or Kubuntu 8.10 with a fully fucntional one.
Ubuntu provides a place for updates. This is called a PPA and GNUmed provides updates for all major versions there.
Have a look at https://launchpad.net/~gnumed/+archive/ppa to find updates for Intrepid (8.10), Jaunty (9.04), Karmic (9.10).
This is obvious to techies but few users seems to be aware of it. I bet a lot of them think GNUmed crashes and that is it.
Users using Jaunty are in a similar situation. Karmic is the first release that ships a fairly stable version of GNUmed.
Hopefully many users will make the switch to Karmic to have a chance to evaluate GNUmed out of the box.
However, if you want the latest feature set even with Karmic be sure to visit
https://launchpad.net/~gnumed/+archive/ppa
GNUmed 0.5.1 has been release a few days ago and brings quite a few neew goodies.
GNUmed's crash handler catches those errors and sends them off for us to fix. So we did. Unfortunately there is no easy way to replace the broken GNUmed in Ubuntu or Kubuntu 8.10 with a fully fucntional one.
Ubuntu provides a place for updates. This is called a PPA and GNUmed provides updates for all major versions there.
Have a look at https://launchpad.net/~gnumed/+archive/ppa to find updates for Intrepid (8.10), Jaunty (9.04), Karmic (9.10).
This is obvious to techies but few users seems to be aware of it. I bet a lot of them think GNUmed crashes and that is it.
Users using Jaunty are in a similar situation. Karmic is the first release that ships a fairly stable version of GNUmed.
Hopefully many users will make the switch to Karmic to have a chance to evaluate GNUmed out of the box.
However, if you want the latest feature set even with Karmic be sure to visit
https://launchpad.net/~gnumed/+archive/ppa
GNUmed 0.5.1 has been release a few days ago and brings quite a few neew goodies.
Wednesday, September 23, 2009
GNUmed Live CD 0.5.1 available
GNUmed Live CD 0.5.1 is available from
http://www.gnumed.de/downloads/live-cd/gnumed-live-0.5.1.is
Sebastian
Saturday, September 19, 2009
Follow GNUmed on identi.ca
A new experiment.
Follow GNUmed on identi.ca
http://identi.ca/releasedude
Sebastian
GNUmed EMR server 'dead easy ' now available
Hi all,
Not everyone is a computer wiz. Moreover it seems that a lot of people are interested in GNUmed. Many of them do not handle the installation very well. While technically sound the installation up to this day required that you took the time to learn a bit about PCs and Operating systems. Over time we were drawn into a conversation along the lines 'Everyone else has an easier installation'. Engaging the user into a technical discussion is often pointless.
In the end I have decided to give the user what he or she wants. The current client and server installation packages now bring along everything needed. This has been the case for the client for quite some time and it has been largely successful.
Now the same is true for the server. GNUmed relies on the high quality database server PostgreSQL. It has always been the case that the administrator had to install and configure PostgreSQL. Most users are not administrator and failed right there. I therefore decided to take care of the PostgreSQL installation.
The advantage is that boostraping now runs without user interaction. The disadvantage is that I had to set a default password for the postgres account. I repeat I had to set a default password for the postgres account.
If you prefer to configure everything yourself (like you should) you still can.
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideWin
Sebastian
Not everyone is a computer wiz. Moreover it seems that a lot of people are interested in GNUmed. Many of them do not handle the installation very well. While technically sound the installation up to this day required that you took the time to learn a bit about PCs and Operating systems. Over time we were drawn into a conversation along the lines 'Everyone else has an easier installation'. Engaging the user into a technical discussion is often pointless.
In the end I have decided to give the user what he or she wants. The current client and server installation packages now bring along everything needed. This has been the case for the client for quite some time and it has been largely successful.
Now the same is true for the server. GNUmed relies on the high quality database server PostgreSQL. It has always been the case that the administrator had to install and configure PostgreSQL. Most users are not administrator and failed right there. I therefore decided to take care of the PostgreSQL installation.
The advantage is that boostraping now runs without user interaction. The disadvantage is that I had to set a default password for the postgres account. I repeat I had to set a default password for the postgres account.
If you prefer to configure everything yourself (like you should) you still can.
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideWin
Sebastian
Thera-Pi Physiotherapieprogramm kommt voran
Habe heute mal wieder auf den Seiten des Open Source Physiotherapieprogramms Thera-Pi.org herumgeschaut. Sieht vielversprechend aus. Im Forum ist ordentlich Aktivität, der Downloadbereich bietet eine aktuelle Version.
Wer es sich anschauen möchte sollte www.thera-pi.org besuchen. Wir wünschen Herrn Steinhilber viel Kraft bei der weiteren Umsetzung.
Sebastian Hilbert
Wer es sich anschauen möchte sollte www.thera-pi.org besuchen. Wir wünschen Herrn Steinhilber viel Kraft bei der weiteren Umsetzung.
Sebastian Hilbert
Wednesday, September 16, 2009
GNUmed server v11.1 is about to make its appearance
Windows is easier then Linux you say ? Think again.
On Linux all it takes is
'apt-get install gnumed-server'
'gm-bootstrap_server'
On Windows it is a pain in the behind. No automatic dependency resolution. 5 to 6 prerequisite packages to track down, download and install.
To make it short. The avarage user interested in GNUmed did not manage to pull it off despite video installation guides.
Times are about to change. After countless hours of testing a first version of all in one GNUmed server package is available internally and will be made available shortly. This packages detects all missing dependecies including PostgreSQL and will do a silent installation of PostgreSQL for you. It will then proceed to copy the GNUmed server files to the disk and will attempt to boostrap. When using the supplied install of PostgreSQL the config files will be patched to provide for a unattended bootstraping.
Stay tuned.
On Linux all it takes is
'apt-get install gnumed-server'
'gm-bootstrap_server'
On Windows it is a pain in the behind. No automatic dependency resolution. 5 to 6 prerequisite packages to track down, download and install.
To make it short. The avarage user interested in GNUmed did not manage to pull it off despite video installation guides.
Times are about to change. After countless hours of testing a first version of all in one GNUmed server package is available internally and will be made available shortly. This packages detects all missing dependecies including PostgreSQL and will do a silent installation of PostgreSQL for you. It will then proceed to copy the GNUmed server files to the disk and will attempt to boostrap. When using the supplied install of PostgreSQL the config files will be patched to provide for a unattended bootstraping.
Stay tuned.
GNUmed client 0.5.1 and server v11.1 now available
Hello all,
there's been precious little bugs in GNUmed 0.5 so far.
Fortunately, Thad recently found two which I fixed. So
there's the 0.5.1 release now:
Client changelog:
0.5.0 -> 0.5.1
FIX: be more careful when deleting measurement types - they could be in use
FIX: faulty access to "pk" column after creating measurement type from phrasewheel
FIX: missing "import os" in measurement widgets code
FIX: improved starting of new encounter from SOAP widget
NEW: install ARRIBA jar into /usr/local/bin
NEW: man page for gm-install_arriba
Database changelog:
11.0 -> 11.1
FIX: SQL: add missing view clin.v_narrative4search
If you wanted to search the EMR for a string you know you
need the database fix ;-)
Here are the tarballs:
http://www.gnumed.de/downloads/client/0.5/
http://www.gnumed.de/downloads/server/v11/
There is a fixup shell script provided with the server
tarball which when run will apply all the needed fixes.
Karsten
there's been precious little bugs in GNUmed 0.5 so far.
Fortunately, Thad recently found two which I fixed. So
there's the 0.5.1 release now:
Client changelog:
0.5.0 -> 0.5.1
FIX: be more careful when deleting measurement types - they could be in use
FIX: faulty access to "pk" column after creating measurement type from phrasewheel
FIX: missing "import os" in measurement widgets code
FIX: improved starting of new encounter from SOAP widget
NEW: install ARRIBA jar into /usr/local/bin
NEW: man page for gm-install_arriba
Database changelog:
11.0 -> 11.1
FIX: SQL: add missing view clin.v_narrative4search
If you wanted to search the EMR for a string you know you
need the database fix ;-)
Here are the tarballs:
http://www.gnumed.de/downloads/client/0.5/
http://www.gnumed.de/downloads/server/v11/
There is a fixup shell script provided with the server
tarball which when run will apply all the needed fixes.
Karsten
Monday, September 14, 2009
GNUmed EMR 0.5.0 Live CD is available for download
Hi all,
GNUmed EMR Live CD is available for download from
http://www.gnumed.de/downloads/live-cd/gnumed-live-0.5.0.iso
(md5sum 9af2a609b80a92109643c53b904896c1 gnumed-live-0.5.0.iso)
It includes a fully configured and bootstraped local database.
One can use this CD to testdrive the GNUmed EMR without installing anything or the need for an internet connection.
BTW. Thanks Andreas for the quick fixes to the GNUmed packages.
Take care,
Sebastian
Sunday, September 13, 2009
Vmware mouse grab problem and losing focus outside 640x480
I have been updating my system (OpenSUSE) and suddenly my Vmware virtual machines stoped working. I search the web but did not find a lot. The problem is that the virtual machine cannot get focus when clicking in it with the mouse. The only thing that help was Ctrl-G to grab the mouse but it would lose focus when moving the mouse outside the area of 640x480 pixels.
This apparently is a problem with Vmware and GTK. There is a fix as I have learned.
Use "export VMWARE_USE_SHIPPED_GTK=force" in a shell prior to starting vmplayer.
Details are here in the Vmware forums (but hard to find)
This apparently is a problem with Vmware and GTK. There is a fix as I have learned.
Use "export VMWARE_USE_SHIPPED_GTK=force" in a shell prior to starting vmplayer.
Details are here in the Vmware forums (but hard to find)
GNUmed client 0.5.0 and server v11.0 now available for Ubuntu
Hi all,
Apparently the call for packages did not yield any response. To provide existing users with upated packages I have taken the time to do it. Good part about it. There are now up to date packages. Sad part. Most likely Ubuntu will fall behind as I cannot promise I will have the resources to keep up in the future. That would really be a pity.
Anyway. For now add the GNUmed PPA to your sources list and install the GNUmed Open source electronic medical record.
More info visit the GNUmed website at wiki.gnumed.de
Apparently the call for packages did not yield any response. To provide existing users with upated packages I have taken the time to do it. Good part about it. There are now up to date packages. Sad part. Most likely Ubuntu will fall behind as I cannot promise I will have the resources to keep up in the future. That would really be a pity.
Anyway. For now add the GNUmed PPA to your sources list and install the GNUmed Open source electronic medical record.
More info visit the GNUmed website at wiki.gnumed.de
Monday, September 07, 2009
GNUmed Ubuntu packages
The GNUmed team has had Ubuntu packages for some time now. Fortunately version 0.4.7 of the client and v10 of the server will ship with Karmic. Those are pretty stable versions and hopefully this time it is diffent from Jaunty where GNUmed would crash on every user.
None of the core developers use Ubuntu on a day to day basis. Most of them use Debian which make Ubuntu packages a breeze since one can simply convert the Debian packages.
As more OSs and distros are supported the packaging job puts a heavy burden on a few people.
The GNUmed team is looking for a volunteer to spend around 30 minutes per release ( every 3 months or so) to Ubuntunize the Debian packages.
The procedure is laid out in the Wiki in the Ubuntu section. Any help is appreciated.
None of the core developers use Ubuntu on a day to day basis. Most of them use Debian which make Ubuntu packages a breeze since one can simply convert the Debian packages.
As more OSs and distros are supported the packaging job puts a heavy burden on a few people.
The GNUmed team is looking for a volunteer to spend around 30 minutes per release ( every 3 months or so) to Ubuntunize the Debian packages.
The procedure is laid out in the Wiki in the Ubuntu section. Any help is appreciated.
Sunday, September 06, 2009
GNUmed 0.5.0 ready for openSUSE and Debian
Hi all,
GNUmed client 0.5.0 and server v11 are now ready for download for openSUSE at
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort
Client 0.5.0 is ready for Debian at
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort
If you have any questions or problems don't hesitate to see
http://wiki.gnumed.de/bin/view/Gnumed/GettingHelp
What's new in GNUmed 0.5.0:
http://gnumed.blogspot.com/2009/08/gnumed-050-and-server-v11-released.html
Take care,
Sebastian

GNUmed client 0.5.0 and server v11 are now ready for download for openSUSE at
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort
Client 0.5.0 is ready for Debian at
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort
If you have any questions or problems don't hesitate to see
http://wiki.gnumed.de/bin/view/Gnumed/GettingHelp
What's new in GNUmed 0.5.0:
http://gnumed.blogspot.com/2009/08/gnumed-050-and-server-v11-released.html
Take care,
Sebastian
Tuesday, August 25, 2009
GNUmed 0.5.0 for MacOS X released
The GNUmed team has started an effort to bring the latest release (0.5.0) to the Mac platform. This has resulted in beta quality packages which let any user try GNUmed on a Mac. It has been tested on Mac OS 10.4 aka Tiger and should work on Mac OS 10.5 as well.
Anyone willing to help out by improving the package and packaging future versions is welcome to join the team.
There are a few features that could potentially enhance the GNUmed on Mac OS experience such as an OSIRIX Dicome viewer integration but that is left to the inclined Mac user.
Download and enjoy GNUmed 0.5.0 from
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideMac
Direct download from:
http://www.gnumed.de/downloads/client/0.5/GNUmed-client-0.5.0.dmg

Anyone willing to help out by improving the package and packaging future versions is welcome to join the team.
There are a few features that could potentially enhance the GNUmed on Mac OS experience such as an OSIRIX Dicome viewer integration but that is left to the inclined Mac user.
Download and enjoy GNUmed 0.5.0 from
http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideMac
Direct download from:
http://www.gnumed.de/downloads/client/0.5/GNUmed-client-0.5.0.dmg
Wednesday, August 19, 2009
GNUmed Live CD 0.4.7
A new live CD that contains version 0.4.7 of the GNUmed client and a fully configured GNUmed database inside PostgreSQL has been released and can be gotten from
http://www.gnumed.de/downloads/live-cd/binary-0.4.7.iso
When using this Live CD no installation is neccessary. The PC and the operation system will not be altered in any way. Simply use the CD to boot up you PC and enjoy
Have fun discovering GNUmed.

http://www.gnumed.de/downloads/live-cd/binary-0.4.7.iso
When using this Live CD no installation is neccessary. The PC and the operation system will not be altered in any way. Simply use the CD to boot up you PC and enjoy
Have fun discovering GNUmed.
Sunday, August 16, 2009
GNUmed 0.4.7 has been synced for Karmic
My sync request has been processed and we are happy to announce that the latest stable version in the 0.4.x series of GNUmed (0.4.7) has been synced for the Karmic release.
This is good news as this version is in good shape and will hopefully spare us from the many but reports that 0.3.9 in Jaunty has brought us.
For some reason it has been virtually impossible to refer users to the updated versions in the GNUmed PPA so it is most important that the version shiped in Karmic is in good shape.
------
GNUmed is an electronic medical record target at primary care physicians , physiotherapists and occupational therapists.
The GNUmed team
This is good news as this version is in good shape and will hopefully spare us from the many but reports that 0.3.9 in Jaunty has brought us.
For some reason it has been virtually impossible to refer users to the updated versions in the GNUmed PPA so it is most important that the version shiped in Karmic is in good shape.
------
GNUmed is an electronic medical record target at primary care physicians , physiotherapists and occupational therapists.
The GNUmed team
GNUmed 0.5.0 und Server v11 erschienen
GNUmed 0.5.0 wurde veröffentlicht. Die List an Neuerungen umfasst.
- kann Krankenhausaufenthalte verwalten
- kann Grundkrankheiten nach beliebigen Schlagworten gruppieren
- kann alle Besuche eines Patienten anzeigen / ändern
- kann einzelne Karteizeilen zwischen verschiedenen Patientenkontakten hin- und herbewegen
- kann Verlaufsnotizen (Karteieinträge) löschen
- kann Arbeitsplatzkonfigurationen (Anmeldung, Sprechzimmer ... ) via Oberfläche löschen
- kann aus dem Laborblatt ein (frei konfigurierbares ) Laborlexikon aufrufen
- kann Laborwerttypen verwalten
- kann Metatypen für (unterschiedlich benannte aber inhaltlich gleiche) Laborwerttypen verwalten
- kann einen externes Programm zur Berechnung des Myokardinfarkt / Schlaganfallrisikos starten
- kann ARRIBA Schlaganfallrechner installieren
- kann LOINC (http://www.dimdi.de/static/de/ehealth/loinc/index.htm) herunterladen und installieren
- kann ATC Daten importieren
- kann sich im Begrüssungsdialog der Datenbank abmelden
- kann Personen / Patienten ohne Geburtsdatum handhaben
- kann das Geburtsdatum/Sterbedatum einer Person besser handhaben
- kann Personen aus der Datenbank entfernen
- hat einen neuen/einfacherern Platzhalterstil für OpenOffice-Dokumente
- hat einen besseren Schutz gegen fehlerhafte Übersetzungen
- hat eine verbesserte Laborwertdarstellung
- hat eine verbesserte Programmfehler-Meldefunktionalität
- hat eine verbesserte Patienteneingabemaske
- die Krankheitsepisoden werden bessert formatiert angezeigt
- zeigt einen informativeren , konfigurierbaren Start/Datenbankdialog
- zeigt Änderungen der Karteikarte in der chronologischen Karteikarte
- ist robuster gegen fehlkonfigurierte Arbeitsplätze
- Windowspakete installieren und konfigurieren nun bei Bedarf den Datenbankserver
- Windowsversion und Sever laufen nun von einer Festplatte oder vom USB-Stick
Pakete erscheinen in den nächsten Tagen als Demo-CD, Windows-Version, Linuxversionen (Debian, Ubuntu, openSUSE) sowie MacOS X, USB-Stick-Mobilversion
Die neuesten Infos gibt es jeweils unter www.gnumed.de
- kann Krankenhausaufenthalte verwalten
- kann Grundkrankheiten nach beliebigen Schlagworten gruppieren
- kann alle Besuche eines Patienten anzeigen / ändern
- kann einzelne Karteizeilen zwischen verschiedenen Patientenkontakten hin- und herbewegen
- kann Verlaufsnotizen (Karteieinträge) löschen
- kann Arbeitsplatzkonfigurationen (Anmeldung, Sprechzimmer ... ) via Oberfläche löschen
- kann aus dem Laborblatt ein (frei konfigurierbares ) Laborlexikon aufrufen
- kann Laborwerttypen verwalten
- kann Metatypen für (unterschiedlich benannte aber inhaltlich gleiche) Laborwerttypen verwalten
- kann einen externes Programm zur Berechnung des Myokardinfarkt / Schlaganfallrisikos starten
- kann ARRIBA Schlaganfallrechner installieren
- kann LOINC (http://www.dimdi.de/static/de/ehealth/loinc/index.htm) herunterladen und installieren
- kann ATC Daten importieren
- kann sich im Begrüssungsdialog der Datenbank abmelden
- kann Personen / Patienten ohne Geburtsdatum handhaben
- kann das Geburtsdatum/Sterbedatum einer Person besser handhaben
- kann Personen aus der Datenbank entfernen
- hat einen neuen/einfacherern Platzhalterstil für OpenOffice-Dokumente
- hat einen besseren Schutz gegen fehlerhafte Übersetzungen
- hat eine verbesserte Laborwertdarstellung
- hat eine verbesserte Programmfehler-Meldefunktionalität
- hat eine verbesserte Patienteneingabemaske
- die Krankheitsepisoden werden bessert formatiert angezeigt
- zeigt einen informativeren , konfigurierbaren Start/Datenbankdialog
- zeigt Änderungen der Karteikarte in der chronologischen Karteikarte
- ist robuster gegen fehlkonfigurierte Arbeitsplätze
- Windowspakete installieren und konfigurieren nun bei Bedarf den Datenbankserver
- Windowsversion und Sever laufen nun von einer Festplatte oder vom USB-Stick
Pakete erscheinen in den nächsten Tagen als Demo-CD, Windows-Version, Linuxversionen (Debian, Ubuntu, openSUSE) sowie MacOS X, USB-Stick-Mobilversion
Die neuesten Infos gibt es jeweils unter www.gnumed.de
Thursday, August 13, 2009
GNUmed 0.5.0 and server v11 released
Dear colleagues,
I am proud to announce GNUmed 0.5.0 "The Lil' Louis" Release.
This has taken much longer than I would have hoped. There
has been a lot of functionality and usability testing going
on with tons of bugs getting fixed and lots of issues
straightened out.
Here's a rundown on what this new GNUmed version has to
offer:
- can track hospital stays
- can group health issues by arbitrary grouping tag
- can display/edit all encounters of a patient in a list
- can move individual soap rows between encounters
- can delete progress notes
- can delete workplaces from GUI
- can show measurements encyclopedia from grid
- can manage measurement types
- can list meta measurement types
- can start external MI/stroke risk assessment calculator
- can install ARRIBA MI/stroke risk assessment calculator
- can download and import LOINC data
- can import ATC data
- can disconnect from database welcome message dialog
- can handle persons without DOB
- can display deceased person's age properly
- can remove persons from the database
- new/simpler placeholder style for OOo documents
- protection against translation errors (%s-count mismatch in _())
- improved display of measurement types in grid
- improved sending of bug reports (log = attachment)
- improved new-patient dialog
- improved sorting of documents in formatted episode summary
- improved "About Database"/startup banner
- improved episode formatting
- has some revision info in EMR Journal view
- has built-in fallback workplace for problem situations
Beyond that there are a host of little improvements here and
there generally making GNUmed a better place to work in.
You can grab tarball packages here:
http://www.gnumed.de/downloads/client/0.5/
http://www.gnumed.de/downloads/server/v11/
Note that you will have to run the database upgrade
procedure if you want to keep using an existing database.
This is described here:
http://wiki.gnumed.de/bin/view/Gnumed/ServerUpgrade
You can upgrade from any v10 fixup level to v11.0.
So, please download and enjoy and report the bugs !
Karsten

I am proud to announce GNUmed 0.5.0 "The Lil' Louis" Release.
This has taken much longer than I would have hoped. There
has been a lot of functionality and usability testing going
on with tons of bugs getting fixed and lots of issues
straightened out.
Here's a rundown on what this new GNUmed version has to
offer:
- can track hospital stays
- can group health issues by arbitrary grouping tag
- can display/edit all encounters of a patient in a list
- can move individual soap rows between encounters
- can delete progress notes
- can delete workplaces from GUI
- can show measurements encyclopedia from grid
- can manage measurement types
- can list meta measurement types
- can start external MI/stroke risk assessment calculator
- can install ARRIBA MI/stroke risk assessment calculator
- can download and import LOINC data
- can import ATC data
- can disconnect from database welcome message dialog
- can handle persons without DOB
- can display deceased person's age properly
- can remove persons from the database
- new/simpler placeholder style for OOo documents
- protection against translation errors (%s-count mismatch in _())
- improved display of measurement types in grid
- improved sending of bug reports (log = attachment)
- improved new-patient dialog
- improved sorting of documents in formatted episode summary
- improved "About Database"/startup banner
- improved episode formatting
- has some revision info in EMR Journal view
- has built-in fallback workplace for problem situations
Beyond that there are a host of little improvements here and
there generally making GNUmed a better place to work in.
You can grab tarball packages here:
http://www.gnumed.de/downloads/client/0.5/
http://www.gnumed.de/downloads/server/v11/
Note that you will have to run the database upgrade
procedure if you want to keep using an existing database.
This is described here:
http://wiki.gnumed.de/bin/view/Gnumed/ServerUpgrade
You can upgrade from any v10 fixup level to v11.0.
So, please download and enjoy and report the bugs !
Karsten
Saturday, July 18, 2009
There is more than one way to write code
CVS systems are great. You can check in your work and others can change it e.g. for coding style. gmDeviceWidgets py was cleaned up by Karsten.
Change is here : http://cvsmonitor.gnumed.de/cvsmonitor.pl?cmd=viewBrowseVersion&version=1.14&file=gnumed/client/wxpython/gmDeviceWidgets.py&module=GNUmed.gnumed
Needless to say I did not even recognize it anymore since huge chunks of the code have been replaced :-)
Change is here : http://cvsmonitor.gnumed.de/cvsmonitor.pl?cmd=viewBrowseVersion&version=1.14&file=gnumed/client/wxpython/gmDeviceWidgets.py&module=GNUmed.gnumed
Needless to say I did not even recognize it anymore since huge chunks of the code have been replaced :-)
Friday, July 17, 2009
GNUmed plugin development - part 13
Be aware that some things have changed. The file GNUmedDeviceParserElementTree.py has been moved from test-area/shilbert/ to business/gmDevices.py
There are now four files involved in this plugin.
- gmDevices.py in /business - responsible for the XML data extraction part
- gmDeviceWidgets.py in /wxpython - responsible for calling gmDevices.py and compiling the ui widgets
- gmCardiacDevicePluginPnl.py in /wxGladeWidgets - is the python code representation of the ui widgets
- gmCardiacDevicePluginPnl.wxg in /wxg - is the xml representation of the ui widgets
If I need to change the plugin's appearance I need to touch first gmCardiacDevicePluginPnl.wxg with wxGlade and transfer it into the python code representation gmCardiacDevicePluginPnl.py. This files gets imported and the controls filled with data in gmDeviceWidgets.py. The business logic of data compilation from and to screen is handled in gmDevices.py
Next up is getting the device data from the database instead of an XML file. For the time being it was agreed that the xml file is simply stored as yet another document. To store it GNUmed was started and the plugin 'Document import' was used. I was asked for an associated episode. 'Routine postop cardiac device checkup' was entered. 'Device check up' was chosen as document type. This was entered via the menu item 'GNUmed>Manage master data>document types'.
A quick chat with Karsten revealed the basic code:
Currently the XML is entered via the default the 'attach document' plugin. There is a nifty solution to a problem. How to check for documents of a type that might not yet exist in the database ?
When the cardiac device plugin is initiated the document type is automatically added to the document types in the database. The file gmDeviceWidgets holds the following code for that.
There are now four files involved in this plugin.
- gmDevices.py in /business - responsible for the XML data extraction part
- gmDeviceWidgets.py in /wxpython - responsible for calling gmDevices.py and compiling the ui widgets
- gmCardiacDevicePluginPnl.py in /wxGladeWidgets - is the python code representation of the ui widgets
- gmCardiacDevicePluginPnl.wxg in /wxg - is the xml representation of the ui widgets
If I need to change the plugin's appearance I need to touch first gmCardiacDevicePluginPnl.wxg with wxGlade and transfer it into the python code representation gmCardiacDevicePluginPnl.py. This files gets imported and the controls filled with data in gmDeviceWidgets.py. The business logic of data compilation from and to screen is handled in gmDevices.py
Next up is getting the device data from the database instead of an XML file. For the time being it was agreed that the xml file is simply stored as yet another document. To store it GNUmed was started and the plugin 'Document import' was used. I was asked for an associated episode. 'Routine postop cardiac device checkup' was entered. 'Device check up' was chosen as document type. This was entered via the menu item 'GNUmed>Manage master data>document types'.
A quick chat with Karsten revealed the basic code:
pat = gmPerson.gmCurrentPatient()This returns a list of cMedDoc objects which can be parsed like that:
doc_folder = pat.get_document_folder()
docs = doc_folder.get_documents()
for doc in docs:doc_folder.get_documents() returns elements ordered by clin_when so the first element is the newest one I am looking for.
doc['comment'] = ... etc.
for doc in docs:To construct the line
if doc['type'] == 'cardiac device checkup report':
selected_docs.append(doc)
if not len(selected_docs) == 0:
# since get_documents() is sorted I simply get the first one as the most recent one
# for now assume that the xml file provide the cardiac device context.
# that pretty much means logical connection of leads and generator is provided in the xml
xml = selected_docs[0].get_parts()[0].export_to_file()
tree = etree.parse(xml)
DevicesDisplayed = gmDevices.device_status_as_text(tree)
for line in DevicesDisplayed:
text = text + line
else:
_log.info('There are no device checkup reports in the database')
text = _('There are no device checkup reports in the database')
xml = selected_docs[0].get_parts()[0].export_to_file()one has to take a good look at the file gmMedDoc.py in /business. Using that code it is now possible to get the XML from the database and display the current device status.
Currently the XML is entered via the default the 'attach document' plugin. There is a nifty solution to a problem. How to check for documents of a type that might not yet exist in the database ?
When the cardiac device plugin is initiated the document type is automatically added to the document types in the database. The file gmDeviceWidgets holds the following code for that.
def __init__(self, *args, **kwargs):The next step is to get rid of saving to a file and reading from that. Another issue is to get refresh going when entering new data.
# check if report types exist in db, if not create them
dtype = gmMedDoc.create_document_type('cardiac device checkup report')
dtype.set_translation(_('cardiac device checkup report'))
Thursday, July 09, 2009
GNUmed plugin development - part 12
Show me the code. Part 11 talked about the xml handling. I put everything in the CVS to make it available.
That was almost two months ago. Due to time constraints I only recently picked up again. I had to realize that my python skills are very rusty and that I had to learn to read and write at the same time.
In the meantime both the XML files as well as the Parser have gone through 2 rewrites. I threw the code out where I felt it became too complex for me to handle. Check out the latest version now.
now run:
Take a look at gmMeasurementsGridPlugin.py. The first few lines look like this.
That was almost two months ago. Due to time constraints I only recently picked up again. I had to realize that my python skills are very rusty and that I had to learn to read and write at the same time.
In the meantime both the XML files as well as the Parser have gone through 2 rewrites. I threw the code out where I felt it became too complex for me to handle. Check out the latest version now.
now run:
python GNUmedDeviceParserElementTree.pyand observe the following output:
-------------------------------------------------------------Now what you see here has been parsed from the XML. No more fake input. Next step is to first replace all hardcoded English strings with gettext-equivalents so translators can have a go at them. To achieve that we will take a look at other plugins that already have that feature.
Device(ICD): St. Jude Medical Atlas DR (active) Battery: St. Jude Medical (St. Jude Medical) Implanted: 23.03.2002
RA-lead in RA-position: Medtronic Sprint XL (active,no comment on lead) Implanted: 23.04.2009
last check: 23.04.2004 Sensing: 7mV Threshold 1.4mV Impedance: 300 Ohm
RV-lead in RV-position: Medtronic Sprint fidelis (inactive,no comment on lead) Implanted: 23.04.2009
last check: 23.04.2009" Sensing: 7mV Threshold 1.4mV Impedance: 300 Ohm
LV-lead in LV-position: St. Jude QuickSite XL (active,no comment on LV lead) Implanted: 23.04.2009
last check: 23.03.2004 Sensing: 7mV Threshold 1.4mV Impedance: 300 Ohm
Take a look at gmMeasurementsGridPlugin.py. The first few lines look like this.
import loggingAll of the above but the second and third line were added to the top of the parser. To tell gettext where to replace I marked them like this:
from Gnumed.wxpython import gmPlugin, gmMeasurementWidgets
from Gnumed.pycommon import gmI18N
_log = logging.getLogger('gm.ui')
_log.info(__version__)
_('this is a string that needs a translation') vs. 'this is a string that needs a translation'So the _() construct identifies the strings to gettext. The following lines were added to the main section.
from Gnumed.pycommon import gmI18NRunning the parser now displayes the same result even after all 'I am a string' occurences having been replaced by _('I am a string'). The next part will try to get the parser connected to gmCardiacDevicePlugin and get this plugin displayed in GNUmed. Once this has been accomplished the XML needs to be read from the database instead of a file.
gmI18N.activate_locale()
gmI18N.install_domain()
Subscribe to:
Posts (Atom)