1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
1.1K views
by rich-c-2789 (17.6k points)
edited 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?

by rich-c-2789 (17.6k points)
selected by sam-s-1510
by sam-s-1510 (2.8k 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?
by rich-c-2789 (17.6k points)
You are correct.  I adjusted the answer above to better reflect when this error might occur.
...