From: Archie C. <ar...@de...> - 2004-12-15 21:32:41
|
Tripp, Bryan wrote: > If I understand correctly, your suggestion was to look at later versions of > the same message structure and switch versions if it looks like one of them > matches better. I'm not enthusiastic about this, because early adopters > (even long after the fact ;) sometimes incorporate segments from later > versions into their messages, and because I think that quietly correcting an > error can lead to deeper confusion than either failing, or assuming there is > no error and returning the literal result of the call. Actually I agree with you that trying a later version is not the best idea.. it's the right thing to do sometimes but not always, so it shouldn't be mandatory. > Assuming we're in try-to-parse-everything mode, if a non-Z segment appears > that is not expected anywhere in the message, HAPI will assume it's a legal > local extension and put it at the end of the current group. This approach > can yield unexpected results, but only if there is an error in the message. This would fine with me, but it doesn't seem like this is what HAPI currently does. Instead, at least in the example I saw, it put *all* segements following the unknown segment at the end of the message. In my example, the unkown segment caused the XML tags to get moved like this: ADT_A13/NK1 -> ADT_A13.IN1IN2IN3/NK1 ADT_A13/PV1 -> ADT_A13.IN1IN2IN3/PV1 ADT_A13/OBX -> ADT_A13.IN1IN2IN3/OBX In the actual HL7 message, NK1, PV1, OBX, etc. came after the unknown segment but otherwise in their rightful places. > Another option would be to decorate a parser with something that guesses > message structure and version. I.e. something you would use like this: new > VersionGuessingParserDecorator(new PipeParser()). How does that sound to > you? Something like that would be a better way to handle cases where people wanted to do "guessing".. i.e., you'd have to explicitly ask for it. I'd guess most people will eventually end up asking for it unfortunately :-) Thanks, -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com * Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. * |