From: Archie C. <ar...@de...> - 2004-12-15 22:12:40
|
Tripp, Bryan wrote: >>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. > > If you have an unexpected segment, it goes at the end of the current group > (or end of the first subgroup reached), which is the only legal option. > Then segments after it have to go after it, again the only legal option. > HAPI won't re-order them. What exactly do you mean by "legal"? It seems like the message is already illegal so trying to maintain any further legality is questionable... or else I'm misunderstanding things. I.e., I'm not sure it's worth messing up the legal segments just to make room for an illegal one (from the point of view of the XML output structure). > On second thought, maybe we should add another option to that previous list, > i.e. quietly drop unexpected segments. Would that help in your case, or did > you want access to that PD1? In this particular case dropping it would have been fine, as we don't look at PD1 segements in ADT^A13 messages (yet). Of course in general that may not be true. But the larget point is that ideally an unknown segment shouldn't "mess up" the rest of the message. I guess if the segment is unknown then just plain dropping it is a very reasonable thing to do. It's hard to say what is always right though, my experience with all the quirks of HL7 is limited. 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. * |