>From what I noticed, both are ADT^A01messages. What you mentioned seem right, i.e. Parse the message, check for MSH.5 being some string, and do different things based on the result. MSH.5 can be accessed by doing a msg.getMSH().getReceivingApplication().getNamespaceID().getValue()
If you want to check for its presence throughout the message, you better not parse the message with HAPI. R, rahul On Nov 2, 2011, at 10:18 AM, Ryan Golhar wrote: > Hi - I'm trying to parse two different types of messages but am unsure of how > to do this. I'm still new to HL7. I'm getting 2 messages that look like the > following: > > MSH|^~\&|SCM|SCM|ADT||20111025051836||ADT^A01|9000907168703310|D|2.3 > ZID|005495449^^^MRNNB|JONES^ROBERT|19990406|M|20111025051200|SDS^PREOP^01^NB||DocLast,DocFirst|038076823 > > MSH|^~\&|SCM|SCM|NB_LST_ORD_OUT||20111025130810||ADT^A01|9007152744101100|D|2.3 > ZID|005495449^^^MRNNB|JONES^ROBERT^^|19990406|M|20111025051200|PACU^PACUN^08^NB > > > I really only want to handle first type of messages. The second type I want > to ignore. How can I distinguish the messages types using the API. Right > now, I would just check if the string "NB_LST_ORD_OUT" is present in the > message. > > Ryan > ------------------------------------------------------------------------------ > RSA® Conference 2012 > Save $700 by Nov 18 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________ > Hl7api-devel mailing list > Hl7api-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hl7api-devel ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel