#7 If MSH-3 (Sending App) is set, then MSH-9 will be blank

v2.0
closed
nobody
Parser (14)
5
2007-11-07
2007-10-12
mikepose
No

It seems to me there is a bug in the PipeParser, line 605 (doEncode method):

string msgStructure = Terser.Get(msh, 3, 0, 1, 1);
if (msgStructure == null)
{
//Create the MsgType and Trigger Event if not there
string messageTypeFullname = source.getStructureName();
int i=messageTypeFullname.IndexOf("_");
if (i > 0)
{
string type = messageTypeFullname.Substring(0, i);
string triggerEvent = messageTypeFullname.Substring(i+1);
Terser.Set(msh, 9, 0, 1, 1, type);
Terser.Set(msh, 9, 0, 2, 1, triggerEvent);
}
else
{
Terser.Set(msh, 9, 0, 1, 1, messageTypeFullname);
}

}

This will get the messagestructure from MSH-3 (Sending Application) and then skip the initialization of the MSH-9 segment, which contains the message type.
The fix is simple, just change it to:
string msgStructure = Terser.Get(msh, 9, 0, 1, 1);

Discussion

  • ChadC
    ChadC
    2007-11-07

    • status: open --> closed
     
  • ChadC
    ChadC
    2007-11-07

    Logged In: YES
    user_id=1522633
    Originator: NO

    Fixed in version 2.0.2