From: Archie C. <ar...@de...> - 2004-12-14 19:20:46
|
Tripp, Bryan wrote: > HAPI indeed won't give you what you want if the message doesn't have the > core structure that it declares in MSH-9, which is fine (and I think > unavoidable), but I agree that it should try to fail in that case. It's > hard to tell legal local additions from a structural problem ... the only > way I can think to do this is to fail if the resulting message is missing > required segments. If you can think of a better way please let me know. Yes, this definitely seems like a hard problem to get right in every case. In this particular case, the message contained an unexpected (and unknown) segment (PD1). HAPI tries to parse the message anyway, which is good, but I'm not sure I understand how the PD1 segment ended up where it did (after ADT_A13.IN1IN2IN3/IN3) and why it caused NK1, PV1, PV2, OBX, etc to all be skipped and added later in the wrong place. Although getting it "right" is all cases is probably impossible, it seems like the case of an "extra" unexpected segment is probably a common one and maybe the parse recovery strategy should have a special case for it.. ? > But are you saying that a PV1 got parsed into an NK1? That would be a bug > that I don't know about. The PV1 parsed as NK1 was my fault, due to a cut & paste problem when pasting the HL7 into the HAPI tester Swing app (extra line breaks were introduced due to screen wrap). What actually happens is that the PV1 XML tag gets put inside the ADT_A13.IN1IN2IN3 tag, after the NK1 tag (along with OBX, etc.). Sorry for the misinformation. 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. * |