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, Rob (Mr)\.br\Address:\.br\XX XX Street\.br\Tait\.br HUTT 5011\.br\Date of Birth:\.br\15.03.1967\.br\Telephone:\.br\(h) 330938 2684\.br\(m) 986 632 4590\.br\||||||F
This is output as below. Is there a proper way to render the escape sequences for the PDF <REF_I12.OBSERVATION> <OBX> <OBX.2>FT</OBX.2> <OBX.3> <CE.1>Notes</CE.1> <CE.2>Notes</CE.2> <CE.3>""</CE.3> </OBX.3> <OBX.4>""</OBX.4> <OBX.5>Dr Tan <escape V=".br"/>MB BS FRACS PhD<escape V=".br"/>Boul Hospital & Specialist Centre<escape V=".br"/>Phone (04)22569-7555<escape V=".br"/>Fax (04)22577-3451<escape V=".br"/>Client & Claim Details<escape V=".br"/>Claim Number<escape V=".br"/>1SG948213<escape V=".br"/>Full Name:<escape V=".br"/>XX, Rob (Mr)<escape V=".br"/>Address:<escape V=".br"/>XX XX Street<escape V= ".br"/>Tait<escape V=".br HUTT 5011"/>.brDate of Birth:<escape V=".br"/> 15.03.1967<escape V=".br"/>Telephone:<escape V=".br"/>(h) 330938 2684<escape V=".br"/>(m) 986 632 4590<escape V=".br"/> </OBX.5> <OBX.11>F</OBX.11> </OBX> </REF_I12.OBSERVATION> On Wed, Nov 5, 2014 at 12:43 PM, Chandan Datta <chandan.da...@auckland.ac.nz > wrote: > 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 which fields I > can omit and how the PDF visual layout looks like. If you have any > transform examples or something I can play with, please let me know. > > > On Wed, Nov 5, 2014 at 4:20 AM, James Agnew <jamesag...@gmail.com> wrote: > >> 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 >> became an unmaintainable mess. >> >> If I had to try and solve that particular problem today, I'd probably use >> Thymeleaf <http://www.thymeleaf.org/> templates and define a custom tag >> that allowed me to insert terser expressions into the HTML templates. But >> that may well be overkill if you just have a single transform you wanted to >> write.. >> >> Cheers, >> James >> >> On Tue, Nov 4, 2014 at 5:19 AM, Chandan Datta < >> chandan.da...@auckland.ac.nz> wrote: >> >>> 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...@gmail.com> wrote: >>> >>>> Sounds like a job for a plain XSL transformation >>>> >>>> On 4 November 2014 05:30, Chandan Datta <chandan.da...@auckland.ac.nz> >>>> wrote: >>>> >>>>> Thanks Christian. Yep, I think so. >>>>> >>>>> On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr < >>>>> christian....@gmail.com> wrote: >>>>> >>>>>> The XML that HAPI parses or renders is not our own invention but >>>>>> specified over HL7 as well as the pipe-encoded form. >>>>>> So I fear that if you want some custom XML representation of an HL7 >>>>>> message you need to do this yourself... >>>>>> >>>>>> best regards >>>>>> Christian >>>>>> >>>>>> 2014-10-30 1:14 GMT+01:00 Chandan Datta <chandan.da...@auckland.ac.nz >>>>>> >: >>>>>> >>>>>>> Hi HAPI devs, >>>>>>> >>>>>>> Is it possible to generate custom XML for a HL7 message using HAPI. >>>>>>> For example, >>>>>>> >>>>>>> Input: HL7 v2.4 header segment >>>>>>> >>>>>>> >>>>>>> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >>>>>>> >>>>>>> >>>>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>>>> >>>>>>> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >>>>>>> >>>>>>> <MSH> >>>>>>> >>>>>>> <MSH.1>*|*</MSH.1> >>>>>>> >>>>>>> <MSH.2>*^~\*&</MSH.2> >>>>>>> >>>>>>> <MSH.3> >>>>>>> >>>>>>> <HD.1>*SPM*</HD.1> >>>>>>> >>>>>>> </MSH.3> >>>>>>> >>>>>>> <MSH.4> >>>>>>> >>>>>>> <HD.1>*boulcott*</HD.1> >>>>>>> >>>>>>> </MSH.4> >>>>>>> >>>>>>> <MSH.6> >>>>>>> >>>>>>> <HD.1>*acceartp*</HD.1> >>>>>>> >>>>>>> </MSH.6> >>>>>>> >>>>>>> <MSH.7> >>>>>>> >>>>>>> <TS.1>*20110922000000*</TS.1> >>>>>>> >>>>>>> </MSH.7> >>>>>>> >>>>>>> <MSH.8>*PKI*</MSH.8> >>>>>>> >>>>>>> <MSH.9> >>>>>>> >>>>>>> <CM_MSG.1>*REF*</CM_MSG.1> >>>>>>> >>>>>>> <CM_MSG.2>*I12*</CM_MSG.2> >>>>>>> >>>>>>> </MSH.9> >>>>>>> >>>>>>> <MSH.10>*20110922091157*</MSH.10> >>>>>>> >>>>>>> <MSH.11> >>>>>>> >>>>>>> <PT.1>*P*</PT.1> >>>>>>> >>>>>>> </MSH.11> >>>>>>> >>>>>>> <MSH.12>*2.3*</MSH.12> >>>>>>> >>>>>>> </MSH> >>>>>>> >>>>>>> </REF_I12> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Instead I would like >>>>>>> >>>>>>> >>>>>>> >>>>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>>>> >>>>>>> <REFI12> >>>>>>> >>>>>>> <MSH> >>>>>>> >>>>>>> <FieldSeparator>*|*</FieldSeparator> >>>>>>> >>>>>>> <EncodingCharacters>*^~\*&</EncodingCharacters> >>>>>>> >>>>>>> <SendingApplication/> >>>>>>> >>>>>>> <SendingFacility/> >>>>>>> >>>>>>> <ReceivingFacility/> >>>>>>> >>>>>>> <DateTimeOfMessage/> >>>>>>> >>>>>>> <Security>*PKI*</Security> >>>>>>> >>>>>>> <MessageType/> >>>>>>> >>>>>>> <MessageControlID>*20110922091157*</MessageControlID> >>>>>>> >>>>>>> <ProcessingID/> >>>>>>> >>>>>>> <VersionID>*2.3 ZRD*</VersionID> >>>>>>> >>>>>>> <SequenceNumber>*0*</SequenceNumber> >>>>>>> >>>>>>> <AcceptAcknowledgementType/> >>>>>>> >>>>>>> <CharacterSet/> >>>>>>> >>>>>>> <PrincipalLanguageOfMessage/> >>>>>>> >>>>>>> </MSH> >>>>>>> >>>>>>> </REFI12> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Regards, >>>>>>> Chandan >>>>>>> Doctoral student,Robotics Research Group >>>>>>> University of Auckland, New Zealand >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Hl7api-devel mailing list >>>>>>> Hl7api-devel@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Chandan >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Hl7api-devel mailing list >>>>> Hl7api-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> Med venlig hilsen / Kind regards >>>> >>>> *Jens Kristian Villadsen* >>>> cand.polyt >>>> >>>> Stålhøjen 24 >>>> 8240 Risskov >>>> Denmark >>>> >>>> Mobile +4523373806 >>>> jenskristianvillad...@gmail.com >>>> jkiddo.dyndns.org >>>> >>> >>> >>> >>> -- >>> Regards, >>> Chandan >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7api-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> > > > -- > Regards, > Chandan > Doctoral student,Robotics Research Group > University of Auckland, New Zealand > -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand http://realworldrobotics.com Mobile : +64 20 4019 3210 SkypeIn : chandan.datta
------------------------------------------------------------------------------
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel