Sidebar

What does this error mean? [line: 157] MessageModelException: Unknown segment: 'und' in at line number 157

0 votes
930 views
asked Jul 5, 2013 by rich-c-2789 (16,180 points)
edited Jul 5, 2013 by sam-s-1510

What does this error mean?

[line: 157] MessageModelException: Unknown segment: 'und' in at line number 157

or

Unknown segment: 'und'

1 Answer

+1 vote
 
Best answer

This may happen if you do something like this:

var anUndefinedVariable;
var rxaSegment = qie.parseHL7String(
anUndefinedVariable);

or

var rxaSegment = qie.parseHL7String(someFunctionThatReturnsUndefined());

The 'und' is short for 'undefined'.  Passing an undefined variable or calling something that might return an undefined value will cause this.

 

See also:

What is a MessageModelException: Unknown segment: 'xxx' error?

answered Jul 5, 2013 by rich-c-2789 (16,180 points)
selected Jul 8, 2013 by sam-s-1510
commented Jul 5, 2013 by sam-s-1510 (2,820 points)
There must be something else going on with this.  I just copied and pasted the code above into a mapping function and it worked just fine.  Do you have more context regarding where this error was occurring?
commented Jul 8, 2013 by rich-c-2789 (16,180 points)
You are correct.  I adjusted the answer above to better reflect when this error might occur.
...