From: Tripp, B. <Bry...@uh...> - 2004-05-26 14:27:20
|
Hi Matthew, Yes, it sounds like you need a custom message class. The steps are as follows: 1. Download the HAPI message library source for the HL7 version you are using. 2. Make new copies of the message class closest to what you need, and of the group(s) on the path to the TXA. 3. In the constructor of your copy of TXA's parent group, add the TXA segment wherever you want it in the child order (using AbstractGroup.add(). 4. Point to your modified group in your copy of the message and any other parent groups (i.e. change the add() calls in these classes to add your versions). 5. The above steps are enough to allow you create and encode messages in the custom format. If you also want to parse them, follow the instructions in the JavaDocs for Parser.packageList() to register your message class with the parsers. Let me know if any of the above is unclear. Best, Bryan > -----Original Message----- > From: mg...@mc... [mailto:mg...@mc...] > Sent: May 25, 2004 12:20 PM > To: Hl7...@li... > Subject: [HAPI-devel] Further TXA questions > > > >Hi Matthew, > > > >There are a couple of ways to do this, but the simplest is to use > > Group.addNonstandardSegment(String name). For example: > > > >ORU_R01 r01 = new ORU_R01; > >r01.addNonstandardSegment("TXA"); > >//then access it like this ... > >TXA txa = (TXA) ro1.get("TXA"); > > > >Another option is to create a custom message class, but that is more > >involved. If you would like details let me know. > > > >Best, > >Bryan > > Bryan, > > I have taken the "addNonstandardSegment" approach that you recommended > above. Unfortunately, what happens in this case is that the > TXA segment is > added after the OBX segments. I am trying to communicate with a system > that requires that the TXA segment come first, followed by > multiple OBX > segments, each of type TX, containing the text of the report. > (Actually I > suppose this does make a certain amount of sense since the TXA is > supposed to be sort of transciption header, and the OBX > segments contain > the body of the "transcript"). > > Is there any way to change the order so that the TXA segment > appears in > the message before the OBX segments? Perhaps I will need > details on the > custom message class after all. > > Thanks much, > > Matthew Fleming > mg...@mc... > > > >[-----Original Message----- > >From: mgf@mc... > >To: hl7api-devel@li... > >Sent: 09/05/2004 3:44 PM > >Subject: [HAPI-devel] TXA segment in ORU message > > > >Folks, > > > >I need to send pathology reports to an application which > unfortunately > >expects them in a rather peculiar format. The message is supposed to > >include a TXA segment (followed by multiple OBX segments of > type TX, one > >for each paragraph in the report; sheesh). Anyhow, I am new > to HAPI and > >would appreciate some guidance as to how to include the TXA > segment in > >the > >ORU message. I can see that there is a TXA class, but it is > apparently > >not > >possible to obtain an instance of this class by calling any of the > >ORU_R01 > >class" get... methods. > > > >Thanks very much! > > > >Matthew Fleming, MD > >Laboratory of Dermatopathology > >Dept. of Dermatology > >Medical College of Wisconsin > >Milwaukee, WI > >mgf@mc > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... > Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. |