Env :
Visual Studio 2013, Winform / C# / Framework 4.5, nHapi DLL 2.4.0.9, HL7 Version 2.3
I'm building a little windows application that read HL7 messages and send them to an Interface system. Everything is working just fine but I would like to know if it's possible to replace/add/modify a segment value : EVN 5.2 (Operator ID / Family name).
At the moment, I'm reading the content of the HL7 file on the computer, put the content in a string, parse the message, encode the message and return it.
public static String ParseMessage(String message)
{
var parser = new NHapi.Base.Parser.PipeParser();
var parsedMessage = parser.Parse(message);
/* I guess it's here that I should do the change for the EVN 5.2 ? But How ;-) */
var msgType = parsedMessage.GetStructureName();
var pipeDelimitedMessage = parser.Encode(parsedMessage);
return pipeDelimitedMessage;
}
Thanks everyone for you help
Richard