Tuesday, April 20, 2010

GNUmed plugin development - part 1 reloaded

If you are just getting started with GNUmed, python and plugins I recommend you read over the series GNUmed plugin development for the basics.

GNUmed plugin develeopment reloaded

Back in the days I was about to develop a GNUmed plugin for pacemaker clinics. While doing this I came across a publication describing a dataset for cardiac echos so I started to develop a plugin for cardiac echocardiography.

A GNUmed plugin consists of three files. When all files are present it is picked up by GNUmed and can be activated/added for a specific workplace in the GNUmed database so it is loaded at startup. Part 4, 5 and 6 of my older series covered that aspect. This time around I am going to create the files from scratch.

Those three files are a foo.wxg file, a foo.py file that is generated from the wxg file and a wrapper file to tell GNUmed about the plugin. Optionally a fourth file can be used to seperate the widget from the rest of the code. This not neccessary however.

The four files can be downloaded here as one zip file. The directory layout of the zipped content is identical to where the files should go (e.g. 'client\wxg', 'client\wxpython').

To activate the plugin open GNUmed and go to 'GNUmed'>'Master data'>'Workplace profiles'. Select 'GNUmed Default' or whatever workplace you want to configure and press 'edit' Select 'all plugins you want' and save your selection.

Restart GNUmed and go to the 'Cardiac echo plugin'. Up to now it is little more then a user interface. It does not do much. Next step is to read all the input fields and write it to an XML file. This XML file will then be stored in the database.






No comments: