public class PreParser extends 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);
Constructor and Description |
---|
PreParser() |
Modifier and Type | Method and Description |
---|---|
static String[] |
getFields(String theMessageText,
String... thePathSpecs)
Extracts selected fields from a message.
|
public PreParser()
public static String[] getFields(String theMessageText, String... thePathSpecs) throws HL7Exception
theMessageText
- an unparsed message from which to get fieldsthePathSpecs
- 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).HL7Exception
Copyright © 2001–2017 University Health Network. All rights reserved.