ch.elexis.privatrechnung.data
Class Importer
java.lang.Object
ch.elexis.util.ImporterPage
ch.elexis.privatrechnung.data.Importer
public class Importer
- extends ImporterPage
A class to import codes from an external source to this code system. the external source must be
an CSV or Excel(tm) file with the fields:
parentCode,codeID,codeName,cost,price,time,validFrom,validUntil,factor
- parentCode: If this code system is organized as tree: codeID of the parent or 'NIL' if this
is a top level code. If this code system is a flat list, parentCode is always 'NIL'
- codeID: The (within this code system unique) identification of the code. e.g. 10.00.01 for al
Tarmed-style system
- codeName: the human understandable name of the code
- cost: the internal cost of this service (what do we have to pay for it), in cents/Rp
- price: the external cost of this service (what have cliebnts to pay us for it), in cents/Rp
- time: the average time needed (in minutes) for this service
- validFrom: the date as YYYYMMDD when this code with this price starts being valid
- validUntil: the date as YYYYMMDD when the validity of this entry expires
- factor: a multiplicator to apply to the price before calculating the end-user-price.
Sometimes referred to as "Taxpunktwert"
Please note: the codeID needs not to be a unique key. instead we might have several entries with
the same codeID, but different validity-dates and prices/factors. At a given date however, only
one ellement of each code should be valid.
This Importer will be displayed, when the user selects "Import" from the Details-View of the
codes of this plugin
Method Summary |
Composite |
createPage(Composite parent)
Create the page that will let the user select a file to import. |
IStatus |
doImport(IProgressMonitor monitor)
The import process starts when the user has selected a file and clicked "OK". |
java.lang.String |
getDescription()
return a description to display in the message area of the import dialog |
java.lang.String |
getTitle()
return a title to display in the title bar of the import dialog |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Importer
public Importer()
createPage
public Composite createPage(Composite parent)
- Create the page that will let the user select a file to import. For simplicity, we use the
default FileBasedImporter of our superclass.
- Specified by:
createPage
in class ImporterPage
- Parameters:
parent
- Achtung: Hat schon ein GridlLayout, darf nicht geƤndert werden.
doImport
public IStatus doImport(IProgressMonitor monitor)
throws java.lang.Exception
- The import process starts when the user has selected a file and clicked "OK". Warning: We can
not read fields of the page created in createPage here! (The page is already disposed when
doImport is called). If we have to transfer field values between createPage and doImport, we
must override collect(). Our file based importer saves the user input in results[0]
- Specified by:
doImport
in class ImporterPage
- Throws:
java.lang.Exception
getDescription
public java.lang.String getDescription()
- return a description to display in the message area of the import dialog
- Specified by:
getDescription
in class ImporterPage
getTitle
public java.lang.String getTitle()
- return a title to display in the title bar of the import dialog
- Specified by:
getTitle
in class ImporterPage
Copyright 2005-2011 by Gerry Weirich, Elexis