Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.laborimport.bioanalytica
Class HL7

java.lang.Object
  extended by ch.elexis.laborimport.bioanalytica.HL7

public class HL7
extends java.lang.Object

This class parses a HL7 file containing lab results. It tries to comply with several possible Substandards of the HL7 and to return always reasonable values for each field.

Author:
Gerry

Constructor Summary
HL7(java.lang.String labor, java.lang.String kuerzel)
          We can force this hl7 to be attributed to a specific lab (if we know, who the sender should be) by providing a name and a short name.
 
Method Summary
 java.lang.String getComments()
          Extract all comments (NTE), global and OBX comments
 Result<Kontakt> getLabor()
          Find the lab issuing this file.
 Result<Patient> getPatient()
          Find the patient denoted by this HL7-record.
 Result<java.lang.String> load(java.io.File file)
          Load file into memory and break it up to separate lines.
static TimeTool makeTime(java.lang.String datestring)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HL7

public HL7(java.lang.String labor,
           java.lang.String kuerzel)
We can force this hl7 to be attributed to a specific lab (if we know, who the sender should be) by providing a name and a short name. If we pass null, the lab will be taken out of the file (if a sender is provided here)

Parameters:
labor - String
kuerzel - String
Method Detail

load

public Result<java.lang.String> load(java.io.File file)
Load file into memory and break it up to separate lines. All other methods should only be called after load was successful. To comply with some of the many standards around, we accept \n and \r and any combination thereof as field separators

Parameters:
file - the file
Returns:

getPatient

public Result<Patient> getPatient()
Find the patient denoted by this HL7-record. If it can't be found in the database, ask the user to choose one.

Returns:
the Patient or null if it has not been found, or an error indicating the problem

getLabor

public Result<Kontakt> getLabor()
Find the lab issuing this file. If we provided a lab name in ze constructor, ths will return that lab.

Returns:
the lab or null if it could not be found

getComments

public java.lang.String getComments()
Extract all comments (NTE), global and OBX comments

Returns:
a string containing all comments, separated by newlines

makeTime

public static TimeTool makeTime(java.lang.String datestring)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis