Package ca.uhn.hl7v2.preparser
Class ER7
java.lang.Object
ca.uhn.hl7v2.preparser.ER7
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static interface -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic booleanparseMessage(Properties props, List<DatumPath> msgMask, String message) Parses message and dumps contents to props, with keys in the ZYX[a]-b[c]-d-e style.protected static booleanparseMSHSegmentWhole(Properties props, List<DatumPath> msgMask, EncodingCharacters encodingChars, String segment) given segment, starting with "MSH", then encoding characters, etc...protected static voidparseSegmentGuts(ER7.Handler handler, String guts, List<Integer> 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 voidparseSegmentWhole(Properties props, Map<String, Integer> segmentId2nextRepIdx, List<DatumPath> msgMask, EncodingCharacters encodingChars, 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.
-
Method Details
-
parseMessage
Parses message and dumps contents to props, with keys in the ZYX[a]-b[c]-d-e style. -
parseMSHSegmentWhole
protected static boolean parseMSHSegmentWhole(Properties props, List<DatumPath> msgMask, EncodingCharacters encodingChars, 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(Properties props, Map<String, Integer> segmentId2nextRepIdx, List<DatumPath> msgMask, EncodingCharacters encodingChars, 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
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
-