From: Tripp, B. <Bry...@uh...> - 2004-10-29 15:31:40
|
Hi,=20 The structure of each message is defined by a Java class (e.g. ca.uhn.hl7v2.model.v21.message.*). When HAPI parses a message, it tries = to put each segment in the right place in that class structure, but this = may not be where you would expect if the segments come in mis-ordered. For example if a non-repeating segment repeats, HAPI thinks it is the group = to which the segment belongs that has repeated. =20 You can make custom message classes to deal with local = message-structural curiosities. If you look at a couple of examples of standard classes in = the library it should be obvious how to do this. Then you have to register = your class with HAPI, as described in the JavaDocs for Parser.packageList() = and Parser.findMessageClass().=20 Regards,=20 Bryan=20 -----Original Message----- From: Shrock, Court [mailto:Sh...@in...] Sent: Thu 10/28/2004 1:51 PM To: 'hl7...@li...' Subject: RE: [HAPI-devel] Peculiar parse of a valid HL7 message in = TestPan el =20 I found that in this particular case, the order of the segments matters. The DG1 segment was being recognized were is existed in the message, but = a placeholder was being put immediately following the PV1 segment where = hl7api thought it should be. My next question is where is this structure = defined and can it be relaxed as I am receiving messages from another interface = and can't control the order of the segments? Thank you, Court -----Original Message----- From: Shrock, Court [mailto:Sh...@in...]=20 Sent: Thursday, October 28, 2004 10:47 AM To: 'hl7...@li...' Subject: [HAPI-devel] Peculiar parse of a valid HL7 message in TestPanel When using the HL7 message below, the TestPanel parses the message with = 2 DG1 segments, the first being an empty node and the second containing = the actual data. This is curious because a call to terser.get("/DG1-2") and terser.get("/DG1-4") return nothing with this particular message. I = have noticed that is doesn't just happen with the DG1 segments either. I've = seen happen with the PV1 segments as well. =20 Any ideas/leads from an experienced hand? =20 Thanks, Court =20 =20 =20 MSH|^~\&|ADM|SHM|ALL|ALL|200410271610||ADT^A05|ADM-HUB.1.48134|D|2.1 EVN|A05||||TWB PID|1|Z4935|Z000004983||TESTSHM^TWB^^^^|NINETYNINE,AGENT|19621212|M|DANG PID|1|Z4935|Z000004983||ER^N ICK^^^^|1|7856 W EAST^^SPOKANE^WA^99208|SPO-WA|509 789-0978|509 474-3131||D|AG|Z00006154|890-23-4568 NK1|1|NOK MOM |MO|4523 N SOUTH^^SPOKANE^WA^99205|890 123-4568 PV1|1|P|Z.7S^^|EL|||MABRO^Mabunga^Rogelio^^^^|NADDA^Nadig^Daniel^^^^||ME PV1|1|P|DN|| ||A|||LABSY^Labes^Sylvia^^^^|IN||MSCV|||||||||||||||||||SHM||PRE|||20041 ||A|||0281 610 IN1|1|MSC||MSC PREMERA|PO BOX 3048^^SPOKANE^WA^99220-3048||509 536-4500|||||20041201|20091203|||TESTSHM^TWB^^^^|SP||||||||||||||||||321 536-4500|||||20041201|20091203|||6549 87|123456789 GT1|1||TESTSHM^TWB^^^^||7856 W EAST^^SPOKANE^WA^99208|509 789-0978|||||SP|890-23-4568||||SHMC|W 101 8TH, BOX TAC F-9^^SPOKANE^WA^99220|509 474-3131||FT DG1|1|TX||test a23 ZV1|^^^^|AALSUE^Aalgard^Sue^^^^|DABRA^Dabalos^Rodolfo^A^^^|||||PTN^DAD^^ ZV1|^^|F A|7531 N SOUTH^^SPOKANE^WA^99203|758 632-4512|TESTER|TESTER|SACRED HEART MEDICAL CENTER|W 101 8TH, BOX TAC F-9^^SPOKANE^WA^99220 ------------------------------------------------------- This Newsletter Sponsored by: Macrovision=20 For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate=20 today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel ------------------------------------------------------- This Newsletter Sponsored by: Macrovision=20 For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate=20 today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel |