how to parse HL7 Message using C# -


i'm receiving hl7 messages system 'a'. examples:

message-1:  msh|^~\&|his|medcenter|lis|medcenter|20060307110114||orm^o01|msgid20060307110114|p|2.3 pid|||12001||jones^john^^^mr.||19670824|m|||123 west st.^^denver^co^80020^usa||||||| pv1||o|op^pareg^||||2342^jones^bob|||op|||||||||2|||||||||||||||||||||||||20060307110111| orc|nw|20060307110114 obr|1|20060307110114||003038^urinalysis^l|||20060307110114   message-2:  msh|^~\&|a|b|c|d|201402141402||orm^o01|33987|d|2.5 pid|1|99989392|99989392||uhcmcdo^two^^^^||19810101|m|||5678 candy cane lane^^euclid^oh^44117^united states||(212)353-6048|(212)323-6078||||99576837||||nonhispan||||||||n pv1|1|o|320|r|c||49762^abouassaly^robert||||||||||||99576837||||||||||y|||||||||||||||201402141402||||||a49417331 in1|1|43||medicaid-oh: cuyahoga county dept of children & family services|3955 euclid ave^^cleveland^oh^44115-2505||(216)431-4500|||||||||uhcmcdo^two^|s|||||1||||||||||||||123456789001|||||||m gt1|1||uhcmcdo^two^^^||5678 candy cane lane^^euclid^oh^44117|(212) 353-6048||19810101|||s orc|nw||||||||20140214140256 obr|1|36358||gc1^non gyn - cytology|r||201403281402||||||||nongync^non gyn - cytology|49762^abouassaly^robert|||||||||||^^^^^r dg1|1|i9|v70.0|routine medical exam - v70.0 obx|1|tx|pth_site1^site a|1|left||||||f||||||| obx|2|tx|pth_spec1^specimen a||c-fna^fine needle aspiration||||||f||||||| 

using c# how can parse message? messages received system of type orm, oru, obx, orl, qbp, oul, rsp, ack, oml, error/invalid messages etc.

how can check hl7 message received error message or acknowlegment or valid hl7 message etc? if valid, need parse message , need display values of fields present in segments.

we using third party library merge healthcare (mergecom.hl7). writing parser lot of work , not recommend it. library reads message string c# object model, works pretty good. see http://www.merge.com/solutions/toolkits/merge-hl7-toolkit.aspx


Comments