Menu Content/Inhalt
Startseite arrow Plugins arrow Diagnosis
Diagnosis Drucken
As with most of elexis, implementing a new diagnosis system is a matter of writing a plugin. We provide the plugin elexis-eigendiagnosen as an example on how to achieve this.

Plugin.xml

This eclipse-required file contains the plugin definition. It defines dependencies of ch.elxis, org.eclipse.core.runtime,org.eclipse.ui, ch.elexis.importer.dic, and org.eclipse.ui.forms.
To connect to elexis, it plugs into the extendsion points ch.elexis.PersistentReference and ch.elexis.Diagnosecode.

ch.elexis.eigendiagnosen.data.Eigendiagnose

This class defines the datatype for our diagnosis code system. As usual, it is derived from PersistentObject to delegate persitency to elexis. It defines the table to create and some accessor methods that will be used by the framework. Note that at least all in thios sample defined Methods are required for successfully plugging in a diagnosis system.

ch.elexis.eigendiagnosen.data.EigendiagnoseFactory

This is the factory method for our data class that creates the "magic" for creating objects from their representation in the database. It can (and should) always be defined exactly as shown here,


ch.elexis.eigendiagnosen.data.Importer

This is needed to import our code system from an external source into our database. We use a simple Table as external source that may be in form opf an Excek(tm) 97/XP file or a CSV file (see samples).

The Importer plugs into the Importer Extension point and exstends the ImporterPage abstract base class.
It consists mainly of to important methods:

public Composite createPage(Composite parent)
This method creates the Control that letts the user select a file to import.

public IStatus doImport(final IProgressMonitor monitor)
This does the work of importing.

ch.elexis.eigendiagnosen.views.CodeSelectorFactory

This class creates a Control to let the user find and select Objects of our class. We can rely heavily on the framework to do the hard wor, and so this class is quite trivial.


ch.elexis.eigendiagnosen.views.DetailDisplay

Here we present the user a detailed view on a selected code out of our codesystem. Again, mist of the work can be done by the framework and we can keep our class quite simple. Of course, one could create a more sophisticated view, but this is left as an exercise to the reader.


 
< zurück   weiter >