Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using NHapi v22 tool for sending HL7 messages. Issue is I'm not able to create component separator(^) and new line. Please tell me how to code for it in C#.

Following is the code:

MSH|^~\&|xyz|xyz|FLOW|FLOW|201601201525||ADT\S\A04|201601201525123456789|P|2.3|||NE|NE

I need to get like this-
ADT^A04



Thanks in Advance
Posted
Updated 20-Jan-16 1:12am
v2

1 solution

You could probably do it with String.Replace Method (System)[^].
 
Share this answer
 
Comments
KoushikGupta 20-Jan-16 8:26am    
I'm doing this way
NHapi.Model.V22.Message.ADT_A04 adtA04 = new NHapi.Model.V22.Message.ADT_A04();
adtA04.MSH.MessageType.MessageType.Value = "ADT^A04";
But its not creating.Even I tried what you answered me(string.replace).
Richard MacCutchan 20-Jan-16 10:25am    
Sorry but that does not give enough information. Please edit your question and add the full details of what you are trying to do and what results you see.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900