From: Tripp, B. <Bry...@uh...> - 2004-07-13 14:38:33
|
Hi Iouri, The instructions for making conformance classes are here: http://hl7api.sourceforge.net/conf/compiler.html Conformance profiles are normally written with the Messaging Workbench. Once you have one, you can use the HAPI tool to make corresponding classes. Alexei's suggestion is good though. If you go ahead with that, conformance profiles would also be a good source for these transforms. HAPI uses the HL7 database to generate the code that you download in the source_vXX.zip files, i.e. most of what is under ca.uhn.hl7v2.model.vXX. If you have this database it's very easy to make the classes (run the generate and compile-gen Ant tasks). It's an access DB, and it comes with forms for adding segments, etc. The problem is that it is expensive, so not many people have it. It's for sale at https://www.hl7.org/library/bookstore/ If there is interest, I'll ask the database creator (Frank Oemig) whether we could distribute an empty DB with the same structure for free. I don't know if the structure is considered intellectual property or just the contents. Bryan > -----Original Message----- > From: Iouri Leonov [mailto:iou...@ya...] > Sent: July 13, 2004 1:23 AM > To: hl7...@li... > Subject: RE: [HAPI-devel] How to use XML-binding to generate library > class es for hapi parser? > > > Hi Bryan, > > Thank you for your prompt and informative reply. > > Regarding the tool for generating Java classes from > HL7 conformance profiles. I am wondering what tool is > that? Is it available? Where could I see some docs to > figure out how to handle the tool? Is that tool > somehow related to WHA Office of Information Messaging > Workbench? > > The same 'how-to' song with HL7 database. You said > that 'the message classes are normally generated from > the HL7 database'. Do those classes relate somehow to > classes in ca.uhn.hl7v2.model.vxx.message package? > Well, I am very green both with hapi framework and > with HL7 in general. Hence I do not have much of an > idea about that database schema nor about > tools/techniques for generating from HL7 database > records hapi-compliant Java classes (messages, > segments, datatypes). Is there a way to provide me > with a link to info about this 'database HL7 record - > Java class' technique. > > Thanks again Bryan, > > Cheers, > > Iouri > > > --- "Tripp, Bryan" <Bry...@uh...> wrote: > > Hi Iouri, > > > > No, we don't have that. We do have a tool that > > generates Java classes from > > HL7 conformance profiles. These aren't message > > classes, but wrappers that > > further constrain underlying message classes to > > agree with the profile. But > > depending on how you want to use it this might work > > just as well for you. > > > > I should also point out that HAPI handles unexpected > > segments and fields > > automatically, so normally you don't need to make > > corresponding custom > > classes (although it does make some things more > > convenient). > > > > Also, the message classes are normally generated > > from the HL7 database, so > > if you have access to that, it's just a matter of > > adding some entries to it. > > I guess you could also make your own database with > > the same structure, if > > you didn't have the standard one and wanted to make > > a lot of custom message > > classes. > > > > Are any of the above satisfactory? > > > > Bryan > > > > -----Original Message----- > > From: Iouri Leonov > > To: hl7...@li... > > Sent: 12/07/2004 2:17 PM > > Subject: [HAPI-devel] How to use XML-binding to > > generate library classes for > > hapi parser? > > > > Good day developers. > > > > Recently I've started playing with hapi framework. I > > have a question > > relating to configuration of messages. > > > > Let' say we have a very common scenario - a user > > wants his custom > > segment > > ZUSER with some custom datatype MY_DT. I see the > > only way to do it - > > make > > new Java files. I have to create a new ZUSER.java in > > segment package > > and a > > new MY_DT.java in datatype package. Then I have to > > go to message package > > and > > change message ADT_x.java file in order to make it > > work with these new > > segment and datatype. Job that definitely requires > > skills of a Java > > programmer. > > > > My question relates to ways of descriptive > > programming. Is there a way > > in > > the current hapi implementations to describe the > > content of my new > > segment > > and datatype not in .java file but rather in some > > XML file or in w3 XML > > Schema file then run that xml instance through a > > binding parser which > > will > > generate classes ZUSER.class and MY_DT.class which > > can be used directly > > by > > Pipe parser? Something in line with JAXB - XML > > binding. If there is a > > way, > > then how to do it, if there's none - any idea how to > > make it happen? > > > > Cheers, > > > > Iouri Leonov > > XML Developer > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by Black Hat Briefings & > > Training. > > Attend Black Hat Briefings & Training, Las Vegas > > July 24-29 - > > digital self defense, top technical experts, no > > vendor pitches, > > unmatched networking opportunities. Visit > > www.blackhat.com > > _______________________________________________ > > 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. > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by Black Hat Briefings & > > Training. > > Attend Black Hat Briefings & Training, Las Vegas > > July 24-29 - > > digital self defense, top technical experts, no > > vendor pitches, > > unmatched networking opportunities. Visit > > www.blackhat.com > > _______________________________________________ > > Hl7api-devel mailing list > > Hl7...@li... > > > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > > > > > > __________________________________ > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile phone. > http://mobile.yahoo.com/maildemo > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > 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. |