ca.uhn.hl7v2.preparser
Class PreParser

java.lang.Object
  extended by ca.uhn.hl7v2.preparser.PreParser

public class PreParser
extends java.lang.Object

Extracts specified fields from unparsed messages. This class is a facade for the ER7 and XML classes. Use it like this:

String message = null; //... your ER7 or XML message string goes here String[] fieldSpecs = {"MSH-9-1", "MSH-9-2", "MSH-12"}; String[] fields = PreParser.getFields(message, fieldSpecs);

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:37 $ by $Author: jamesagnew $
Author:
Bryan Tripp

Constructor Summary
PreParser()
           
 
Method Summary
static java.lang.String[] getFields(java.lang.String theMessageText, java.lang.String[] thePathSpecs)
          Extracts selected fields from a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreParser

public PreParser()
Method Detail

getFields

public static java.lang.String[] getFields(java.lang.String theMessageText,
                                           java.lang.String[] thePathSpecs)
                                    throws HL7Exception
Extracts selected fields from a message.

Parameters:
theMessageText - an unparsed message from which to get fields
thePathSpecs - Terser-like paths to fields in the message. See documentation for Terser. These paths are identical except that they start with the segment name (search flags and group names are to be omitted as they are not relevant with unparsed ER7 messages).
Returns:
field values corresponding to the given paths
Throws:
HL7Exception


Copyright © 2001-2011 University Health Network. All Rights Reserved.