Re: [HAPI-devel] Custom XML output

2014-11-04 Thread Ian Vowles
There are quite a few format escape sequences in HL7. You may find it valuable to get your hands on a copy of the standard, and refer to chapter 2 (in the 2.3.1 standard chapter 2 section 10). Here you will find a detailed list of the possible escape sequences, and what they indicate. Then yo

Re: [HAPI-devel] Custom XML output

2014-11-04 Thread Chandan Datta
A followup question: For the HL7 OBX-5 ST field, I have an example segment OBX||FT|Notes^Notes^""|""|Dr Tan\.br\MB BS FRACS PhD\.br\Boul Hospital \T\ Specialist Centre\.br\Phone (04)22569-7555\.br\Fax (04)22577-3451\.br\Client \T\ Claim Details\.br\Claim Number\.br\1SG948213\.br\Full Name:\.br\XX,

Re: [HAPI-devel] Custom XML output

2014-11-04 Thread Chandan Datta
Thanks James Yes, this is related to my earlier email for generating human readable PDFs. I would like to use a template engine for that, but for a start couple of XSL-FOs that can generate PDFs would be great. I can then use something like Altova XmlSpy to play with the stylesheets to determine

Re: [HAPI-devel] Custom XML output

2014-11-04 Thread James Agnew
I'm guessing this is related to your other question around converting v2 to PDF? FWIW there are obviously a million ways you could try and handle this.. I participated in a project years ago where I helped write XSLT transforms from HL7 v2/XML to drive Apache FOP for generating PDFs. That quickly

Re: [HAPI-devel] Missing emails re. HAPI

2014-11-04 Thread Jens Villadsen
Hi James Will you also be attending the connectathon in Cleveland? On 4 November 2014 16:09, James Agnew wrote: > Hi All, > > Just a quick note, sorry for this- I discovered this weekend that the > email box my sourceforge email account and mailing lists were routed to > silently stopped accept

[HAPI-devel] Missing emails re. HAPI

2014-11-04 Thread James Agnew
Hi All, Just a quick note, sorry for this- I discovered this weekend that the email box my sourceforge email account and mailing lists were routed to silently stopped accepting most messages about 1.5 months ago. If anyone has sent me anything urgent in that time, you will need to resend. Cheers,

Re: [HAPI-devel] HL7 to XML

2014-11-04 Thread James Agnew
Hi Kathees, This is actually correct behaviour. It's a somewhat confusing aspect of HL7 v2 at first, but HL7 reuses some message structures for multiple message trigger events. For example, the ADT^A01 and ADT^A04 messages both need all of the same data fields, so HL7 decided to reuse the ADT^A01

Re: [HAPI-devel] Initiating the Hl7 class factory based on the MSH field

2014-11-04 Thread James Agnew
Hi Chandan, There are two good ways of doing this: you can use the Terser, which involves something along the lines of String version = new Terser(yourMsg).get("MSH-12"); or you can use the CanonicalModelClassFactory

Re: [HAPI-devel] Custom XML output

2014-11-04 Thread Chandan Datta
Thanks, I thought there might be some out-of-the-box human readability option. Since there are fields defined in the model definition. For example: http://hl7api.sourceforge.net/v25/apidocs/ca/uhn/hl7v2/model/v25/segment/PRD.html On Tue, Nov 4, 2014 at 10:11 PM, Jens Villadsen < jenskristianvillad

[HAPI-devel] HL7 to XML

2014-11-04 Thread Kathees Rajendram
Hi, We used the Hapi library to convert the hl7 message [1] to XML format [2]. I notice MDM_T02 comes as a root element in the XML. Shouldn't this be MDM_T10 like in the other cases? Is this a bug? Can someone explain why this is the case? [1] ER7 Message MSH|^~\\&|20141104095415.605+0530||MD

[HAPI-devel] HL7 to XML

2014-11-04 Thread Rajendram Kathees
Hi, We used the Hapi library to convert the HL7 message [1] to XML format [2]. I notice MDM_T02 comes as a root element in the XML. Shouldn't this be MDM_T10 like in the other cases? Is this a bug? Can someone explain why this is the case? [1] ER7 Message MSH|^~\\&|20141104095415.605+0530||MD

Re: [HAPI-devel] Custom XML output

2014-11-04 Thread Jens Villadsen
Sounds like a job for a plain XSL transformation On 4 November 2014 05:30, Chandan Datta wrote: > Thanks Christian. Yep, I think so. > > On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr > wrote: > >> The XML that HAPI parses or renders is not our own invention but >> specified over HL7 as well a