ca.uhn.hl7v2.preparser
Class ER7

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

public class ER7
extends java.lang.Object


Nested Class Summary
protected static class ER7.ER7SegmentHandler
           
protected static interface ER7.Handler
           
 
Method Summary
static void main(java.lang.String[] args)
           
static boolean parseMessage(java.util.Properties props, java.util.Vector msgMask, java.lang.String message)
          Parses message and dumps contents to props, with keys in the ZYX[a]-b[c]-d-e style.
protected static boolean parseMSHSegmentWhole(java.util.Properties props, java.util.Vector msgMask, EncodingCharacters encodingChars, java.lang.String segment)
          given segment, starting with "MSH", then encoding characters, etc...
protected static void parseSegmentGuts(ER7.Handler handler, java.lang.String guts, java.util.Vector nodeKey)
          recursively tokenize "guts" (a segment, or part of one) into tokens, according to separators (aka delimiters) which are different at each level of recursion, and to a recursive depth which is discovered through "handler" via handler.delim(int) and handler.specDepth() As tokens are found, they are reported to handler via handler.putDatum(), which presumably stashes them away somewhere.
protected static void parseSegmentWhole(java.util.Properties props, java.util.Map segmentId2nextRepIdx, java.util.Vector msgMask, EncodingCharacters encodingChars, java.lang.String segment)
          pass in a whole segment (of type other than MSH), including message type at the start, according to encodingChars, and we'll parse the contents and put them in props.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseMessage

public static boolean parseMessage(java.util.Properties props,
                                   java.util.Vector msgMask,
                                   java.lang.String message)
Parses message and dumps contents to props, with keys in the ZYX[a]-b[c]-d-e style.


parseMSHSegmentWhole

protected static boolean parseMSHSegmentWhole(java.util.Properties props,
                                              java.util.Vector msgMask,
                                              EncodingCharacters encodingChars,
                                              java.lang.String segment)
given segment, starting with "MSH", then encoding characters, etc... put MSH[0]-1[0]-1-1 (== MSH-1) and MSH[0]-2[0]-1-1 (== MSH-2) into props, if found, plus everything else found in 'segment'


parseSegmentWhole

protected static void parseSegmentWhole(java.util.Properties props,
                                        java.util.Map segmentId2nextRepIdx,
                                        java.util.Vector msgMask,
                                        EncodingCharacters encodingChars,
                                        java.lang.String segment)
pass in a whole segment (of type other than MSH), including message type at the start, according to encodingChars, and we'll parse the contents and put them in props.


parseSegmentGuts

protected static void parseSegmentGuts(ER7.Handler handler,
                                       java.lang.String guts,
                                       java.util.Vector nodeKey)
recursively tokenize "guts" (a segment, or part of one) into tokens, according to separators (aka delimiters) which are different at each level of recursion, and to a recursive depth which is discovered through "handler" via handler.delim(int) and handler.specDepth() As tokens are found, they are reported to handler via handler.putDatum(), which presumably stashes them away somewhere. We tell the handler about the location in the message via putDatum()'s key argument, which is a List of Integers representing the position in the parse tree (size() == depth of recursion). TODO: say more.


main

public static void main(java.lang.String[] args)


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